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 Button
  • UP_BUTTON Up Button
  • DOWN_BUTTON Down Button
  • LEFT_BUTTON LeftButton
  • RIGHT_BUTTON Right Button
  • SELECT_BUTTON Select Button
  • BACK_BUTTON Back Button
  • EXIT_BUTTON Exit Button
  • USER_BUTTON0 User button 0
  • USER_BUTTON1 User button 1
  • USER_BUTTON2 User button 2
  • USER_BUTTON3 User button 3
  • USER_BUTTON4 User button 4
  • USER_BUTTON5 User button 5
  • USER_BUTTON6 User button 6
  • USER_BUTTON7 User button 7
  • USER_BUTTON8 User button 8
  • USER_BUTTON9 User button 9
  • USER_BUTTON10 User button 10
  • USER_BUTTON11 User button 11
  • USER_BUTTON12 User button 12
  • USER_BUTTON13 User button 13
  • USER_BUTTON14 User button 14
  • USER_BUTTON15 User button 15

Button definitions


enum event_type
  • NONE
  • SETUP This event is called at startup after all objects have been constructed
  • ENTER This event is called when the element becomes active
  • UPDATE This event is called in a loop while the element is active
  • BUTTON_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 network
  • SIGNAL_RECEIVED This event is called when the process receives a signal
  • SIGNAL
  • APPLICATION This event is application specific where the data is specified by the application
  • LIST_ITEM_SELECTED Select an item in a list
  • LIST_ITEM_ACTUATED Actuate an item in a list
  • LIST_ACTUATED Select an item in a list or menu
  • LIST_ACTUATE
  • LIST_UP Scroll up in a list or menu
  • LIST_DOWN Scroll down in a list or menu
  • SCROLL_UP Scroll up (same as LIST_UP)
  • SCROLL_DOWN Scroll down (same as LIST_DOWN)
  • MENU_BACK Go back in the menu
  • TAB_LEFT Slide to the tab on the left
  • TAB_RIGHT Slide to the tab on the left
  • MENU_ACTUATED Select the item in the menu
  • MENU_ACTUATE
  • EXIT The application transitioned to a new element (last event on current element)

The event type


X

Thanks for Coming!

Subscribe to news and updates