class::ui::Menu

class ui::Menu
  : public ui::LinkedElement

This class implements a menu with navigation to the left and right including animations (if supported by the system).

You must provide another ui::ElementLinked object to be the starting element. Menu::handle_event() handles these events to navigate between linked elements:

Summary

Menu()

LinkedElement & current()

virtual void draw(

const draw::DrawingAttr & attr
)

virtual Element * handle_event(

const Event & event,
const draw::DrawingAttr & attr
)

void set_current(

Element & v
)

Members

Construct a new Menu object


LinkedElement & current()

Access a reference to the current element


virtual void draw(

const draw::DrawingAttr & attr
)

This method draws the object using the specified drawing attributes.

The attributes specify which bitmap to draw on, what size to draw, and where to draw. The dimensions and position are scaled to fit on the bitmap.


virtual Element * handle_event(

const Event & event,
const draw::DrawingAttr & attr
)

Handles an event sent by the event loop.

Parameters

  • event The event that should be handled

  • attr The draw::DrawingAttr to use to update the display based on the event.


void set_current(

Element & v
)

Set the reference of the current element


X

Thanks for Coming!

Subscribe to news and updates