modm API documentation
modm::AbstractMenu Class Referenceabstract

The AbstractMenu class is the same as the AbstractView class, except it forces the developer to reimplement the handling of button presses. More...

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

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

Public Member Functions

 AbstractMenu (modm::ViewStack *stack, uint8_t identifier)
 
virtual void shortButtonPress (modm::MenuButtons::Button button) = 0
 shortButtonPress handle the action for the pressed button
 
modm::ColorGraphicDisplaydisplay ()
 
virtual void draw () = 0
 draw determine the output on the Graphic Display
 
uint8_t getIdentifier ()
 getIdentifier of the view.
 
modm::ViewStackgetViewStack ()
 
virtual bool hasChanged () = 0
 hasChanged indicates the current displayed view has changed. This function prevents unnecessary drawing of the display More...
 
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
 

Detailed Description

The AbstractMenu class is the same as the AbstractView class, except it forces the developer to reimplement the handling of button presses.

Author
Thorsten Lajewski

Member Function Documentation

virtual bool modm::AbstractView::hasChanged ( )
inheritedpure virtual

hasChanged indicates the current displayed view has changed. This function prevents unnecessary drawing of the display

Returns
if true the display has to be redrawn.

Implemented in modm::StandardMenu, and modm::ChoiceMenu.

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

isAlive tells the ViewStack if it should remove this screen.

Returns

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