class::ui::List

class ui::List
  : public ui::LinkedElement
  : public ui::ListAttr

The List class makes a list of elements that are drawn in a vertical list. This is the primary Element used in menus.

Summary

List(

LinkedElement * parent
)

LinkedElement & at(

list_attr_size_t i
)

LinkedElement & current()

void draw_item_to_scale(

const draw::DrawingScaledAttr & attr,
sg_size_t x_offset,
list_attr_size_t item
)

virtual void draw_to_scale(

const draw::DrawingScaledAttr & attr
)

virtual Element * handle_event(

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

protected list_attr_size_t m_draw_animation_item

protected list_attr_size_t m_draw_animation_offset

protected draw::Animation m_scroll_animation

protected chrono::Timer m_scroll_timer

protected i8 m_select_top_bottom

protected void animate_scroll(

i8 dir,
const draw::DrawingAttr & attr
)

protected void handle_down_button_actuation(

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

protected void handle_select_button_actuation(

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

protected void handle_up_button_actuation(

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

protected void init(

void
)

Members

List(

LinkedElement * parent
)


LinkedElement & at(

list_attr_size_t i
)

Return a points to item i in the list


LinkedElement & current()

Return a pointer to the currently selected item


void draw_item_to_scale(

const draw::DrawingScaledAttr & attr,
sg_size_t x_offset,
list_attr_size_t item
)


virtual void draw_to_scale(

const draw::DrawingScaledAttr & attr
)

This methods draws the drawing on the specified attributes.

Parameters

  • attr Specifies the bitmap, point and area to draw the drawing

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.


protected list_attr_size_t m_draw_animation_item

protected list_attr_size_t m_draw_animation_offset

protected draw::Animation m_scroll_animation

protected chrono::Timer m_scroll_timer

protected i8 m_select_top_bottom

protected void animate_scroll(

i8 dir,
const draw::DrawingAttr & attr
)


protected void handle_down_button_actuation(

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


protected void handle_select_button_actuation(

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


protected void handle_up_button_actuation(

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


protected void init(

void
)


X

Thanks for Coming!

Subscribe to news and updates