modm API documentation
modm::StandardMenu Class Referenceabstract

StandardMenu provides a vertical list of entry. More...

#include <modm/ui/menu/standard_menu.hpp>

Inheritance diagram for modm::StandardMenu:
modm::AbstractMenu modm::AbstractView

Public Member Functions

 StandardMenu (modm::ViewStack *stack, uint8_t identifier)
 
 StandardMenu (modm::ViewStack *stack, uint8_t identifier, const char *title)
 
void addEntry (const char *text, MenuEntryCallback func)
 addEntry adds a new option to the displayed list
 
void setTitle (const char *text)
 setTitle set the title of the menu displayed on top of the list
 
virtual void shortButtonPress (modm::MenuButtons::Button button)
 shortButtonPress handles normal button actions
 
virtual bool hasChanged ()
 hasChanged, returns true if the screen has to be redrawn
 
virtual void draw ()
 draw the screen
 
virtual void selectedEntryFunction (uint8_t selected)
 selectedEntryFunction can be reimplemented to allow side effects each time one Entry selected. This function always gets called after Button UP or Button DOWN was pressed. More...
 
void setUpdateTime (uint16_t ms)
 setUpdateTime changes the time for redrawing the screen, this is important for scrolling texts, because it determines the scroll speed More...
 
modm::ColorGraphicDisplaydisplay ()
 
uint8_t getIdentifier ()
 getIdentifier of the view.
 
modm::ViewStackgetViewStack ()
 
bool isAlive () const
 isAlive tells the ViewStack if it should remove this screen. More...
 
virtual void onRemove ()
 onRemove will be called right before the view gets deleted, can be reimplemented to reset external data.
 
void remove ()
 remove the view from the screen. The viewStack handles the deletion.
 
virtual void update ()
 update The update function of the top most display gets called as often as possible. Only the update of the top view in each ViewStack gets called.
 

Public Attributes

bool alive
 
const uint8_t identifier
 

Protected Typedefs

typedef modm::DoublyLinkedList< MenuEntryEntryList
 

Protected Attributes

EntryList entries
 

Detailed Description

StandardMenu provides a vertical list of entry.

Controls: Down - next Entry Up - previous Entry Left - remove Standard Menu from stack Right - select chosen entry.

Author
Thorsten Lajewski

Member Function Documentation

bool modm::AbstractView::isAlive ( ) const
inherited

isAlive tells the ViewStack if it should remove this screen.

Returns
void modm::StandardMenu::selectedEntryFunction ( uint8_t  selected)
virtual

selectedEntryFunction can be reimplemented to allow side effects each time one Entry selected. This function always gets called after Button UP or Button DOWN was pressed.

Parameters
selected
void modm::StandardMenu::setUpdateTime ( uint16_t  ms)
inline

setUpdateTime changes the time for redrawing the screen, this is important for scrolling texts, because it determines the scroll speed

Parameters
ms

The documentation for this class was generated from the following files: