BaseHandlerDispatcher (object)¶
バージョン 2.0.1 で追加.
BaseHandlerDispatcher manages a set of handler and dispatches events to the currently active handler. Handlers are registered in a HandlerDispatcher that manages their activation. The active handler receives events as they are propagated from the host application. It provides a registration system to add/remove handlers.
Members¶
Boolean | enabled | Handler is enabled. |
Key | enableKey | Enable key. |
HandlerExclusivity | handlerExclusivity | Handler exclusivity. |
Boolean | isIndependent | HandlerExclusivity local override. |
Boolean | takeAllEvents | It true, the handler takes all the events. |
Boolean | alwaysEnabled | It true, the handler takes all the events. |
Boolean | isOwnedByDispatcher | Checks if the handler is owned by a handlerDispatcher. In most of the cases, the dispatcher owns the handlers. However, it’s not true in DFG graphs where the handlers are owns by the nodes. |
Ref<HandlerDispatcher> | dispatcher | Reference to the dispatcher. |
Ref<BaseHandler>[String] | handlers | Dictionary of reference to all the registered handlers. |
BaseHandler[String] | ownedHandlers | Dictionary of owned handlers. |
Methods¶
BaseHandlerDispatcher ( in BaseHandlerDispatcher other ) | |
BaseHandlerDispatcher ( in Boolean isOwnedByDispatcher ) | |
BaseHandlerDispatcher ( in Key enableKey, in Boolean isOwnedByDispatcher ) | |
BaseHandlerDispatcher () | |
activateDispatcher ! ( in Key key, io Boolean isAccepted ) | |
activateHandlers ! ( io Key key, io Boolean switchDisableNone, io Boolean switchDisableOthers, io Boolean switchDisableAll, io Boolean isAccepted ) | |
activateHandlertype_DisableAllHandlers ! ( in Key key ) | |
activateHandlertype_DisableNoneHandlers ! ( in Key key ) | |
activateHandlertype_DisableOthersHandlers ! ( in Key key ) | |
checkHandlersEnableKeyAndName ? ( in String name, in Key key, in Boolean fromDispatcher, io Boolean hasKey, io Boolean hasName ) | |
BaseHandlerDispatcher | clone ? () |
disable ! () | |
enable ! () | |
Ref<EventHandler> | getActiveHandler ? () |
HandlerDescription | getDescription ? () |
Ref<EventHandler> | getHandler ? ( in String name ) |
String | getHandlerName ? ( in Ref<EventHandler> handler ) |
Ref<HandlerDispatcher> | getRootDispatcher ? () |
Boolean | hasHandler ? ( in String name ) |
init ! ( in Key enableKey, in Boolean isOwnedByDispatcher ) | |
onEvent ! ( io Event event ) | |
processKeyEvent ! ( io Event event ) | |
processMouseEvent ! ( io Event event ) | |
registerHandler ! ( in String name, io EventHandler handler ) | |
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 ) | |
~BaseHandlerDispatcher () |
Methods in detail¶
BaseHandlerDispatcher ( in BaseHandlerDispatcher other )
copy constructor
BaseHandlerDispatcher ( in Boolean isOwnedByDispatcher )
Constructs a BaseHandlerDispatcher with HandlerDisableOther exclusivity and no key to activate.
isOwnedByDispatcher | If true, owned by the dispatcher when registered. |
BaseHandlerDispatcher ( in Key enableKey, in Boolean isOwnedByDispatcher )
Constructs a BaseHandlerDispatcher with HandlerDisableNone exclusivity.
enableKey | Key that enables/disables the dispatcher. |
isOwnedByDispatcher | If true, owned by the dispatcher when registered. |
default constructor
BaseHandlerDispatcher.activateDispatcher! ( in Key key, io Boolean isAccepted )
Implementation of HandlerDispatcher.
BaseHandlerDispatcher.activateHandlers! ( io Key key, io Boolean switchDisableNone, io Boolean switchDisableOthers, io Boolean switchDisableAll, io Boolean isAccepted )
Implementation of HandlerDispatcher.
BaseHandlerDispatcher.activateHandlertype_DisableAllHandlers! ( in Key key )
Activates the DisableAllHandlers exlusivity type handlers.
注釈
This is applied to the manipulation tree leaves, e.g. the tools.
key | A enable key-stroke. |
BaseHandlerDispatcher.activateHandlertype_DisableNoneHandlers! ( in Key key )
Activates the DisableNoneHandlers exlusivity type handlers.
注釈
This is applied to the manipulation tree leaves, e.g. the tools.
key | A enable key-stroke. |
BaseHandlerDispatcher.activateHandlertype_DisableOthersHandlers! ( in Key key )
Activates the DisableOthersHandlers exlusivity type handlers.
注釈
This is applied to the manipulation tree leaves, e.g. the tools.
key | A enable key-stroke. |
BaseHandlerDispatcher.checkHandlersEnableKeyAndName? ( in String name, in Key key, in Boolean fromDispatcher, io Boolean hasKey, io Boolean hasName )
Checks if
BaseHandlerDispatcher BaseHandlerDispatcher.clone? ()
clone method
BaseHandlerDispatcher.disable! ()
Implementation of EventHandler.
BaseHandlerDispatcher.enable! ()
Implementation of EventHandler.
Ref<EventHandler> BaseHandlerDispatcher.getActiveHandler? ()
Implementation of HandlerDispatcher.
HandlerDescription BaseHandlerDispatcher.getDescription? ()
Implementation of EventHandler.
Ref<EventHandler> BaseHandlerDispatcher.getHandler? ( in String name )
Gets the handler registered under with the given name.
name | Handler’s name. |
String BaseHandlerDispatcher.getHandlerName? ( in Ref<EventHandler> handler )
Implementation of HandlerDispatcher.
Ref<HandlerDispatcher> BaseHandlerDispatcher.getRootDispatcher? ()
Gets the root dispatcher.
Boolean BaseHandlerDispatcher.hasHandler? ( in String name )
Implementation of HandlerDispatcher.
BaseHandlerDispatcher.init! ( in Key enableKey, in Boolean isOwnedByDispatcher )
Initializes a BaseHandlerDispatcher, independent and doesn’t take all the events.
enableKey | Key that enables/disables the dispatcher. |
isOwnedByDispatcher | If true, owned by the dispatcher when registered. |
BaseHandlerDispatcher.onEvent! ( io Event event )
Implementation of EventHandler.
BaseHandlerDispatcher.processKeyEvent! ( io Event event )
Implementation of HandlerDispatcher.
BaseHandlerDispatcher.processMouseEvent! ( io Event event )
Implementation of HandlerDispatcher.
BaseHandlerDispatcher.registerHandler! ( in String name, io EventHandler handler )
Implementation of HandlerDispatcher.
BaseHandlerDispatcher.registerHandler! ( in String name, io Ref<EventHandler> handler )
Implementation of HandlerDispatcher.
BaseHandlerDispatcher.sceneChanged! ()
Implementation of HandlerDispatcher.
BaseHandlerDispatcher.setActiveHandler! ( in Ref<EventHandler> handler )
Implementation of HandlerDispatcher.
BaseHandlerDispatcher.setActiveHandler! ( in String name )
Implementation of HandlerDispatcher.
BaseHandlerDispatcher.unregisterHandler! ( in Ref<EventHandler> handler )
Implementation of HandlerDispatcher.
BaseHandlerDispatcher.unregisterHandler! ( in String name )
Implementation of HandlerDispatcher.
Destructor.