modm API documentation
modm::AbstractView Class Referenceabstract

The AbstractView class is the base class for all screens handled by the ViewStack class. More...

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

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

Public Member Functions

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

Public Attributes

const uint8_t identifier
 
bool alive
 

Friends

class ViewStack
 

Detailed Description

The AbstractView class is the base class for all screens handled by the ViewStack class.

Author
Thorsten Lajewski

Constructor & Destructor Documentation

modm::AbstractView::AbstractView ( modm::ViewStack stack,
uint8_t  identifier 
)
Parameters
stackpointer to the stack, the screen should be displayed on.
identifiercan be used to determine which screen is the currently displayed on the graphicDisplay

Member Function Documentation

virtual bool modm::AbstractView::hasChanged ( )
pure 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

isAlive tells the ViewStack if it should remove this screen.

Returns

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