Hello again, Jeremy,
I'm digging into this topic of the EventHandlers for the Widgets. Before
implementing my own EventHandler for what I'm trying to do, I'm looking at how
does MouseHandler works to see if I can use it.
In an effort to track down what happens when the MouseHandler enters into
action after a mouse action, I can see the responsibility is passed to the
WindowManager. For instance, by looking at _handleMouseReleased:
Code:
bool WindowManager::_handleMouseReleased(float x, float y, bool& down) {
down = false;
if(!_lastPush) return false;
Event ev(this, EVENT_MOUSE_RELEASE);
setEventFromInterface(ev, _lastPush);
bool handled = _lastPush->callMethodAndCallbacks(ev);
_lastPush = 0;
return handled;
}
An object of type EventInterface is in charge of executing
callMethodAndCallbacks, which at last calls a virtual method mouseRelease, that
can be overriden.
I'm confused about the use of the term "callback" in the EventInterface. Is
this a callback or an event triggered from the event handler? Or maybe it's
used for both?
I want to develop an EventHandler separate from the widget itself. Can I extend
your code in some manner to achieve this, or should I go for a totally custom
EventHandler?
Thank you!
Daniel
------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=41671#41671
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org