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

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

Public Member Functions

 View (modm::gui::GuiViewStack *stack, uint8_t identifier, modm::gui::Dimension dimension)
 
virtual void update ()
 
virtual bool hasChanged () = 0
 hasChanged indicates the current displayed view has changed. This function prevents unnecessary drawing of the display More...
 
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.
 
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.
 
virtual void onRemove ()
 onRemove will be called right before the view gets deleted, can be reimplemented to reset external data.
 
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.
 

Protected Attributes

modm::gui::GuiViewStackstack
 
Dimension dimension
 
WidgetContainer widgets
 
modm::gui::ColorPalette colorpalette
 
const uint8_t identifier
 
bool alive
 

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::gui::View::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.
bool modm::gui::View::isAlive ( ) const
inline

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.


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