Class Event
Event class
Usage:
e: Event!
Tables
event.eventsDef | a table of event constants. |
Methods
event\new () | constructor |
event\getEvent (ename) | getter for an event from event constants table. |
event\drop () | drops all the handlers of an event instance. |
event\on (name, callback, target) | attaches a handler to an event. |
event\dispatch (name, ...) | runs the callback associated to an event name. |
event\remove (event, id) | removes an event handler. |
Tables
- event.eventsDef
-
a table of event constants.
Fields:
- UI_MOUSE_DOWN
- UI_MOUSE_UP
- UI_MOUSE_MOVE
- UI_MOUSE_ENTER
- UI_MOUSE_LEAVE
- UI_WHELL_MOVE
- UI_CLICK
- UI_DB_CLICK
- UI_DB_CLICK
- UI_FOCUS
- UI_UN_FOCUS
- UI_KEY_DOWN
- UI_KEY_UP
- UI_TEXT_INPUT
- UI_TEXT_CHANGE
- UI_DRAW
- UI_MOVE
- UI_ON_ADD
- UI_ON_REMOVE
- UI_ON_SCROLL
- UI_ON_SELECT
- TIMER_DONE
Methods
- event\new ()
- constructor
- event\getEvent (ename)
-
getter for an event from event constants table.
Parameters:
- ename string
Returns:
- event\drop ()
- drops all the handlers of an event instance.
- event\on (name, callback, target)
-
attaches a handler to an event.
Parameters:
Returns:
-
table
handler
- event\dispatch (name, ...)
-
runs the callback associated to an event name.
Parameters:
Returns:
-
boolean
- event\remove (event, id)
-
removes an event handler.
Parameters: