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...
 
- Public Member Functions inherited from modm::AbstractMenu
 AbstractMenu (modm::ViewStack *stack, uint8_t identifier)
 
- Public Member Functions inherited from modm::AbstractView
 AbstractView (modm::ViewStack *stack, uint8_t identifier)
 
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.
 
bool isAlive () const
 isAlive tells the ViewStack if it should remove this screen. More...
 
void remove ()
 remove the view from the screen. The viewStack handles the deletion.
 
uint8_t getIdentifier ()
 getIdentifier of the view.
 
modm::ColorGraphicDisplaydisplay ()
 
virtual void onRemove ()
 onRemove will be called right before the view gets deleted, can be reimplemented to reset external data.
 
modm::ViewStackgetViewStack ()
 

Protected Typedefs

typedef modm::DoublyLinkedList< MenuEntryEntryList
 

Protected Attributes

EntryList entries
 

Additional Inherited Members

- Public Attributes inherited from modm::AbstractView
const uint8_t identifier
 
bool alive
 

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

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: