Canvas widgets: Difference between revisions

Jump to navigation Jump to search
m
Line 119: Line 119:


=== Picking & Widget Callbacks {{Pending}} ===
=== Picking & Widget Callbacks {{Pending}} ===
{{Progressbar|40}}
{{Progressbar|50}}


For mouse handling I like the idea of having event handlers (eg. click, drag, hover, etc.). So instead of just one property holding the events of the whole dialog/canvas I want to forward the event to the corresponding element by using picking or maybe for a first step just bounding box checking with the current mouse position. It would still just set the three properties like before (button, x, y) but we could add an helper function which adds a listener to the button property and calls a function with all three parameters if the event was triggered. (I always want to keep the basic idea of only communicatingvia the property tree).
For mouse handling I like the idea of having event handlers (eg. click, drag, hover, etc.). So instead of just one property holding the events of the whole dialog/canvas I want to forward the event to the corresponding element by using picking or maybe for a first step just bounding box checking with the current mouse position. It would still just set the three properties like before (button, x, y) but we could add an helper function which adds a listener to the button property and calls a function with all three parameters if the event was triggered. (I always want to keep the basic idea of only communicatingvia the property tree).

Navigation menu