Home
  • Products
  • Solutions
  • Support
  • Company
  • Products
  • Solutions
  • Support
  • Company
Community PCB Design Allegro PCB Editor and PCB SKILL Orcad PCB Designer. form -> mouseActivity

Stats

  • State Not Answered
  • Replies 4
  • Subscribers 150
  • Views 547
  • Members are here 0
More Content

Orcad PCB Designer. form -> mouseActivity

JuriV
JuriV 2 months ago

Hello everybody,

I want to select some items in the form by Mouse Click. Thats could be done by "axlFormListGetSelItems".
Now I want to check the Mouse Activity in the Form.

If the mouse in the Form - "Active"
If the mouse outside of the Form - "Not Active"

I have found the function "form->mouseActivity". My suggestion was, the function give me a "t" if mouse inside of the form, and "nil" if outside of the form.
How this function could be used?

Is it possible to use in the loop?

like:

while(form->mouseActivity = t ) do ..... 

Best regards

JuriV

  • Reply
  • Cancel
  • Cancel
Parents
  • B Bruekers
    0 B Bruekers 2 months ago

    Check the axlFormSetMouseActive() documentation and look at the example in  <cdsroot>/share/pcb/examples/form/basic.

    In the form callback you check for form->mouseActivity.

    • Cancel
    • Up 0 Down
    • Reply
    • Verify Answer
    • Cancel
  • JuriV
    0 JuriV 2 months ago in reply to B Bruekers

    This is my procedure "test", which creates the FORM "test.form" and contain the procedure "Test _Action"

    procedure (test)
      test_form = axlFormCreate( (gensym) "test.form" nil 'Test_Action t)
    );end procedure

    In the procedure "test_Action" I want check if mouse is active in the form. In the form - the Action 1 should be executes, if not in the form - Action 2:

    procedure (Test_Action)

    if the mouse in the Form - "Active"

    ...Action1
    If the mouse outside of the Form - "Not Active"
    ...Action 2
    );end procedure

    Unfortunately I don't understoode how the mouse activity (click or if the mouse cursor in the FORM) in the FORM could be check. The first Idea was  test.form->mouseActivity. But how it should be implemented? There are not comments In the SKILL reference regarding the option ->MouseActivity.

    Regards

    JuriV

    • Cancel
    • Up 0 Down
    • Reply
    • Verify Answer
    • Cancel
  • B Bruekers
    0 B Bruekers 2 months ago in reply to JuriV

    I'm not sure why you want to know when the mouse is not on the form.

    The callback function is only called when there is an activity on the form, so mouse en keyboard input.

    So, you can use the mouse position to show some helptip or other information when hovering over an item.

    procedure (test ()
      test_form = axlFormCreate( (gensym) "test.form" nil 'Test_Action t)
        axlFormSetMouseActive(test_form)
    );end procedure


    procedure (Test_Action  (fw)
        cond(
            (fw->mouseActive  print("mouse on form"))
            (t
                  print("callback on form, but no mouse activity")
            )
        )
    );end procedure

    • Cancel
    • Up 0 Down
    • Reply
    • Verify Answer
    • Cancel
  • JuriV
    0 JuriV 2 months ago in reply to B Bruekers

    Thanks,

    I will try it

    • Cancel
    • Up 0 Down
    • Reply
    • Verify Answer
    • Cancel
Reply
  • JuriV
    0 JuriV 2 months ago in reply to B Bruekers

    Thanks,

    I will try it

    • Cancel
    • Up 0 Down
    • Reply
    • Verify Answer
    • Cancel
Children
No Data
Cadence Guidelines

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2023 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information