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?
while(form->mouseActivity = t ) do .....
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.
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:
if the mouse in the Form - "Active"
...Action1If 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.
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 procedureprocedure (Test_Action (fw) cond( (fw->mouseActive print("mouse on form")) (t print("callback on form, but no mouse activity") ) ));end procedure
I will try it