Module OsgGA.Gui_event_handler


module Gui_event_handler: sig .. end
Gui_event_handler provides a basic interface for any class which wants to handle a GUI Events.

The GUIEvent is supplied by a GUIEventAdapter. Feedback resulting from the handle method is supplied by a OsgGA.Gui_action_adapter, which allows the Gui_event_handler to ask the GUI to take some action in response to an incoming event.

For example, consider a Trackball Viewer class which takes mouse events and manipulates a scene camera in response. The Trackball Viewer is a Gui_event_handler, and receives the events via the handle method. If the user 'throws' the model, the Trackball Viewer class can detect this via the incoming events, and request that the GUI set up a timer callback to continually redraw the view. This request is made via the OsgGA.Gui_action_adapter class.


type t 
osgGA::GUIEventHandler holder. GUI event handler type can be used in OsgViewer.Viewer.add_event_handler.
val create : (OsgGA.Gui_event_adapter.t ->
OsgGA.Gui_action_adapter.t -> Osg.Object.t -> Osg.Node_visitor.t -> bool) ->
t
create custom Gui_event_handler with overloaded handle(ea, aa) method
val create2 : (OsgGA.Gui_event_adapter.t -> OsgGA.Gui_action_adapter.t -> bool) ->
t
create custom Gui_event_handler with overloaded handle(ea, aa) method