HandlerDispatcher.kl¶
Interfaces¶
HandlerDispatcher (interface)¶
バージョン 2.0.1 で追加.
HandlerDispatcher interface declares the methods to manages several handlers and to create a manipulation tree. In the manipulation tree, dispatchers are the nodes used to organize the manipulation system and propagate the events througt it.
Functions¶
activateDispatcher ! ( in Key key, io Boolean isAccepted ) | |
activateHandlers ! ( io Key key, io Boolean switchDisableNone, io Boolean switchDisableOthers, io Boolean switchDisableAll, io Boolean isAccepted ) | |
Ref<EventHandler> | getActiveHandler ? () |
String | getHandlerName ? ( in Ref<EventHandler> handler ) |
Boolean | hasHandler ? ( in String name ) |
processKeyEvent ! ( io Event event ) | |
processMouseEvent ! ( io Event event ) | |
registerHandler ! ( in String name, io Ref<EventHandler> handler ) | |
sceneChanged ! () | |
setActiveHandler ! ( in Ref<EventHandler> handler ) | |
setActiveHandler ! ( in String name ) | |
unregisterHandler ! ( in Ref<EventHandler> handler ) | |
unregisterHandler ! ( in String name ) |
Functions in detail¶
HandlerDispatcher.activateDispatcher! ( in Key key, io Boolean isAccepted )
Activates a specific dispatcher within the manipulation tree and its parents and children dispatcher. Must be called from the manipualtion-tree root dispatcher.
注釈
This is applied to the manipulation tree leaves, e.g. the tools.
HandlerDispatcher.activateHandlers! ( io Key key, io Boolean switchDisableNone, io Boolean switchDisableOthers, io Boolean switchDisableAll, io Boolean isAccepted )
Activates one or several handlers within this dispatcher stack. Recursive call that visit the whole manipulation tree. Must be called from the manipualtion-tree root dispatcher.
注釈
This is applied to the manipulation tree leaves, e.g. the tools.
Ref<EventHandler> HandlerDispatcher.getActiveHandler? ()
Gets a reference to the current handler.
String HandlerDispatcher.getHandlerName? ( in Ref<EventHandler> handler )
Gets the handler’s name.
Boolean HandlerDispatcher.hasHandler? ( in String name )
Gets true if a handler with the given name has been registered.
HandlerDispatcher.processKeyEvent! ( io Event event )
Process a key event + manages tool switching.
HandlerDispatcher.processMouseEvent! ( io Event event )
Process a mouse event.
HandlerDispatcher.registerHandler! ( in String name, io Ref<EventHandler> handler )
Registers a new handler with a given name.
HandlerDispatcher.sceneChanged! ()
Updates the manipulation-tree as the scene might have changed.
HandlerDispatcher.setActiveHandler! ( in Ref<EventHandler> handler )
Activates a specific handler in the stack. It will receive the events.
HandlerDispatcher.setActiveHandler! ( in String name )
Activates a specific handler in the stack. It will receive the events.
HandlerDispatcher.unregisterHandler! ( in Ref<EventHandler> handler )
Unregisters an existing handler.
HandlerDispatcher.unregisterHandler! ( in String name )
Unregisters an existing handler.