class::ev::Event
class ev::Event
: public api::InfoObject
This class defines action-able events (such as button presses) that occur within ui::EventLoop and are handled by ui::Element::handle_event().
The event includes the type and a pointer to an object associated with the event. For example, events of type Event::SIGNAL will include a pointer to a sys::Signal object.
Summary
Event()
[Event](#classev_1_1_event_1a93f81f8d55b3287389dd6db850ca3d3e)(
enum event_type type,
void * object
)
[Event](#classev_1_1_event_1a72dec654a714b1be499dff7ec87131e9)(
enum event_type type,
ev::Button * button
)
[Event](#classev_1_1_event_1ad02b532227bbf8a8cbb79e3fc12f1d1f)(
enum event_type type,
ui::Element * element
)
void * application() const
ev::Button * button() const
ui::Element * element() const
EventHandler * event_handler() const
ui::ListItem * list_item() const
void set_event(
enum event_type t,
void * object
)
void set_event(
enum event_type t,
ev::Button * button
)
void set_type(
enum event_type v
)
sys::Signal * signal() const
enum event_type type() const
enum @5
enum button_id
enum event_type
Members
Event()
Event(
enum event_type type,
void * object
)
Construct a new event with the specified type and object
Event(
enum event_type type,
ev::Button * button
)
Constructs a new event referencing a button.
Parameters
type
The type of event (should be one of BUTTON_* events)button
A pointer to the button which caused the event.
Event(
enum event_type type,
ui::Element * element
)
void * application() const
ev::Button * button() const
Accesses the button associated with the event.
Returns
A pointer to the button or zero if the event is not a button event.
ui::Element * element() const
EventHandler * event_handler() const
ui::ListItem * list_item() const
void set_event(
enum event_type t,
void * object
)
void set_event(
enum event_type t,
ev::Button * button
)
void set_type(
enum event_type v
)
sys::Signal * signal() const
Accesses the signal associated with the event.
Returns
A pointer to the signal if type is Event::SIGNAL or zero if not.
enum event_type type() const
enum @5
FLAG_IS_BUTTON
BUTTON_FLAG
FLAG_IS_LIST_ITEM
LIST_ITEM_FLAG
FLAG_IS_EVENT_HANDLER
FLAG_IS_ELEMENT
enum button_id
NO_BUTTON
No ButtonUP_BUTTON
Up ButtonDOWN_BUTTON
Down ButtonLEFT_BUTTON
LeftButtonRIGHT_BUTTON
Right ButtonSELECT_BUTTON
Select ButtonBACK_BUTTON
Back ButtonEXIT_BUTTON
Exit ButtonUSER_BUTTON0
User button 0USER_BUTTON1
User button 1USER_BUTTON2
User button 2USER_BUTTON3
User button 3USER_BUTTON4
User button 4USER_BUTTON5
User button 5USER_BUTTON6
User button 6USER_BUTTON7
User button 7USER_BUTTON8
User button 8USER_BUTTON9
User button 9USER_BUTTON10
User button 10USER_BUTTON11
User button 11USER_BUTTON12
User button 12USER_BUTTON13
User button 13USER_BUTTON14
User button 14USER_BUTTON15
User button 15
Button definitions
enum event_type
NONE
SETUP
This event is called at startup after all objects have been constructedENTER
This event is called when the element becomes activeUPDATE
This event is called in a loop while the element is activeBUTTON_ACTUATED
This event is called when a button is actuated (pressed and released). Use button() to access button details.BUTTON_ACTUATION
BUTTON_HELD
This event is called when a button is held. Use button() to access button details.BUTTON_HOLD
BUTTON_PRESSED
This event is called when a button is pressed. Use button() to access button details.BUTTON_RELEASED
This event is called when a button is released. Use button() to access button details.NETWORK_DATA
This event is called when data arrives on the networkSIGNAL_RECEIVED
This event is called when the process receives a signalSIGNAL
APPLICATION
This event is application specific where the data is specified by the applicationLIST_ITEM_SELECTED
Select an item in a listLIST_ITEM_ACTUATED
Actuate an item in a listLIST_ACTUATED
Select an item in a list or menuLIST_ACTUATE
LIST_UP
Scroll up in a list or menuLIST_DOWN
Scroll down in a list or menuSCROLL_UP
Scroll up (same as LIST_UP)SCROLL_DOWN
Scroll down (same as LIST_DOWN)MENU_BACK
Go back in the menuTAB_LEFT
Slide to the tab on the leftTAB_RIGHT
Slide to the tab on the leftMENU_ACTUATED
Select the item in the menuMENU_ACTUATE
EXIT
The application transitioned to a new element (last event on current element)
The event type