modm API documentation
modm::StandardMenu< Allocator > Class Template Reference

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

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

Inheritance diagram for modm::StandardMenu< Allocator >:
modm::AbstractMenu< Allocator > modm::AbstractView< Allocator > modm::IAbstractView

Public Member Functions

 StandardMenu (modm::ViewStack< Allocator > *stack, uint8_t identifier)
 
 StandardMenu (modm::ViewStack< Allocator > *stack, uint8_t identifier, const char *title)
 
void addEntry (const char *text, MenuEntryCallback< Allocator > 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::GraphicDisplaydisplay ()
 
uint8_t getIdentifier ()
 getIdentifier of the view.
 
modm::ViewStack< Allocator > * getViewStack ()
 
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.
 

Protected Typedefs

template<typename T >
using EntryList = modm::DoublyLinkedList< MenuEntry< T > >
 

Protected Attributes

EntryList< Allocator > entries
 

Detailed Description

template<typename Allocator = std::allocator<IAbstractView>>
class modm::StandardMenu< Allocator >

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::IAbstractView::isAlive ( ) const
inheritedinline

isAlive tells the ViewStack if it should remove this screen.

Returns
template<typename Allocator = std::allocator<IAbstractView>>
virtual void modm::StandardMenu< Allocator >::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
template<typename Allocator = std::allocator<IAbstractView>>
void modm::StandardMenu< Allocator >::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 file: