modm API documentation
modm::gui::View Class Referenceabstract

#include <modm/ui/gui/view.hpp>

Inheritance diagram for modm::gui::View:
modm::AbstractView

Public Member Functions

 View (modm::gui::GuiViewStack *stack, uint8_t identifier, modm::gui::Dimension dimension)
 
virtual void update ()
 
virtual void preUpdate ()
 
virtual void postUpdate ()
 
virtual void draw ()
 Draw determine the output on the Graphic Display.
 
bool pack (Widget *w, const modm::glcd::Point &coord)
 Add widget to view.
 
void remove ()
 Remove the view from the screen. The viewStack handles the deletion.
 
void setColorPalette (ColorPalette &cp)
 Set color palette for every contained widget.
 
ColorPalettegetColorPalette ()
 
void markDirty ()
 
void markDrawn ()
 
modm::gui::GuiViewStackgetViewStack ()
 
modm::ColorGraphicDisplaydisplay ()
 
uint8_t getIdentifier ()
 getIdentifier of the view.
 
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.
 
virtual void shortButtonPress (modm::MenuButtons::Button button)
 shortButtonPress handle the action for the pressed button
 

Public Attributes

bool alive
 
const uint8_t identifier
 

Protected Attributes

modm::gui::GuiViewStackstack
 
Dimension dimension
 
WidgetContainer widgets
 
modm::gui::ColorPalette colorpalette
 

Friends

class GuiViewStack
 

Detailed Description

The View class is the base class for all screens handled by the ViewStack class

Author
Thorsten Lajewski

Constructor & Destructor Documentation

modm::gui::View::View ( modm::gui::GuiViewStack stack,
uint8_t  identifier,
modm::gui::Dimension  dimension 
)
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 ( )
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
void modm::gui::View::update ( )
virtual

May be called as often as possible. Handles input events located in the parent GuiViewStack.

Reimplemented from modm::AbstractView.


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