Class zebkit.ui.event.EventManager
extends <zebkit.ui.event.Manager>
<zebkit.ui.event>

Event manager class. One of the key zebkit manager that is responsible for distributing various events in zebkit UI. The manager provides possibility to catch and handle UI events globally. Below is list event types that can be caught with the event manager:

  • Key events:

    • "keyTyped"
    • "keyReleased"
    • "keyPressed"
  • Pointer events:

    • "pointerDragged"
    • "pointerDragStarted"
    • "pointerDragEnded"
    • "pointerMoved"
    • "pointerClicked"
    • "pointerDoubleClicked"
    • "pointerPressed"
    • "pointerReleased"
    • "pointerEntered"
    • "pointerExited"
  • Focus event:

    • "focusLost"
    • "focusGained"
  • Component events:

    • "compSized"
    • "compMoved"
    • "compEnabled"
    • "compShown"
    • "compAdded"
    • "compRemoved"
  • Window events:

    • "winOpened"
    • "winActivated"
  • Menu events:

    • "menuItemSelected'
  • Shortcut events:

    • "shortcutFired"

Current events manager is available with "zebkit.ui.events"

Constructor:
zebkit.ui.event.EventManager ( )

Example:
// catch all pointer pressed events that are triggered by zebkit UI
zebkit.ui.events.on("pointerPressed", function(e) {
    // handle event
    ...
});



protected <Boolean> fire (id, e)

Fire event with the given id


Parameters:
Returns: <Boolean>

boolean flag that indicates if a event handling has been interrupted on one of a stage:

  • Suppressed by a target component
  • By a global listener
  • By a target component event listener

public <zebkit.ui.event.EventManager> events

Event manager reference. The reference can be used to register listeners that can get all events of the given type that are fired by zebkit UI. For instance you can catch all pointer pressed events as follow: