EventHandler (interface)¶
Functions¶
disable ! () | |
enable ! () | |
HandlerDescription | getDescription ? () |
Ref<HandlerDispatcher> | getDispatcher ? () |
Key | getEnableKey ? () |
HandlerExclusivity | getExclusivity ? () |
Boolean | hasKey ? ( in Key key ) |
Boolean | isAlwaysEnabled ? () |
Boolean | isEnabled ? () |
Boolean | isIndependent ? () |
Boolean | isOwnedByDispatcher ? () |
onEvent ! ( io Event event ) | |
setAlwaysEnabled ! ( in Boolean alwaysEnabled ) | |
setDispatcher ! ( in Ref<HandlerDispatcher> dispatcher ) | |
setEnableKey ! ( in Key key ) | |
setExclusivity ! ( in HandlerExclusivity handlerExclusivity ) | |
setIndependent ! ( in Boolean independent ) | |
setTakeAllEvents ! ( in Boolean takeAllEvents ) | |
Boolean | takeAllEvents ? () |
Functions in detail¶
EventHandler.disable! ()
Disables the handler.
EventHandler.enable! ()
Enables the handler so it receives the events.
HandlerDescription EventHandler.getDescription? ()
Gets the handler description, see HandlerDescription.
Ref<HandlerDispatcher> EventHandler.getDispatcher? ()
Gets a reference to the dispatcher.
Key EventHandler.getEnableKey? ()
Gets the key that enable the handler.
HandlerExclusivity EventHandler.getExclusivity? ()
Gets the exclusivity of the handler, see HandlerConstants
.
Boolean EventHandler.hasKey? ( in Key key )
Checks if the handler has the key.
key | Key to check. |
Boolean EventHandler.isAlwaysEnabled? ()
Checks if the handler is alwaysEnabled.
Boolean EventHandler.isEnabled? ()
Checks if the handler is enabled.
Boolean EventHandler.isIndependent? ()
Checks if the handler is independent, see HandlerConstants
.
Boolean EventHandler.isOwnedByDispatcher? ()
Checks if the handler is owned by the dispatcher.
EventHandler.onEvent! ( io Event event )
Process the event.
event | The user event |
EventHandler.setAlwaysEnabled! ( in Boolean alwaysEnabled )
If true, the handler is always enabled.
EventHandler.setDispatcher! ( in Ref<HandlerDispatcher> dispatcher )
Sets a reference to the dispatcher.
dispatcher | A reference to an HandlerDispatcher. |
EventHandler.setEnableKey! ( in Key key )
Sets the key that enable the handler.
EventHandler.setExclusivity! ( in HandlerExclusivity handlerExclusivity )
Sets the exclusivity of the handler, see HandlerConstants
.
handlerExclusivity | Tool‘s new exclusivity. |
EventHandler.setIndependent! ( in Boolean independent )
Sets if the handler is affected by other handlers HandlerExclusivity, see HandlerConstants
.
It’s a local override to HandlerExclusivity.
independent | If true the handler is not changed (enabled/disabled) when switching to another handler. |
EventHandler.setTakeAllEvents! ( in Boolean takeAllEvents )
Forces this handlers to receive all the events.
takeAllEvents | If true, accept all the events. |
Boolean EventHandler.takeAllEvents? ()
Checks if the handler takes all the events, see HandlerConstants
.