Hi Ole-Morten, As of 1.9.x onwards all EventHandlers including CameraManipulators get all events whether handled or not, in keeping with the Chain of Responsibility Design Pattern.
The reason for passing on all events is that it permits a fuller range of usage models the blanket ignoring of events would deny, as the OSG is a general purpose toolkit this capability is important and not one I'm about to throw away on a whim. Now I do roughly understand the problem you are trying to tackle, but doing a blanket reject even for just a single manipulator is the wrong way to do it, if users want to ignore already handled events in an event handler then this should be optional, and even then possibly in a limited way. For instance your event handler might still want to get frame events, but not already handled mouse events, in these case the check should be local to the event switch case. Even this more limited scope still should be optional for most camera manipulators. Might I suggest considering adding an option to discard already handle events, and to local the use of this to just events that make sense to ignore in this case. Feel free to code this up. Robert. On 9/12/07, Ole-Morten Duesund <[EMAIL PROTECTED]> wrote: > I'm doing some work which requires the ability to set a focus "widget" > for events that go into an osgGA::GUIEventHandler. Among other things I > want to be able to meaningfully use DRAG events. > > This all works very well as long as my cameramanipulator ignores events > where getHandled() is true. This seems to be the case for most > manipulators but not the NodeTrackerManipulator. > > Attached is a fix for this, and if there's interest I'll do a fix for > the rest of the osgGA::Manipulator that don't already behave this way. > > Ideally I would like to see osgViewer::Viewer::eventTraversal() modified > to not send "used" events to the cameramanipulator at all. > I'd be happy to produce a fix for that as well but I can imagine at > least some cases where you'd like the manipulator to receive events no > matter what. Any thoughts on this? > > - Ole-Morten Duesund > > _______________________________________________ > osg-submissions mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org > > > _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
