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

Stack which handles the displaying of views on the graphic display. More...

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

Inheritance diagram for modm::ViewStack< Allocator >:
modm::CommunicatingViewStack< Allocator >

Public Member Functions

 ViewStack (modm::GraphicDisplay *display, const Allocator allocator=Allocator ())
 
modm::AbstractView< Allocator > * get ()
 get the top view from the stack More...
 
void push (modm::AbstractView< Allocator > *view)
 push new view on top of stack the new view will be displayed instead of the old one More...
 
modm::GraphicDisplaygetDisplay ()
 getDisplay access underlying GraphicDisplay
 
void pop ()
 pop remove top view from the stack. The removed view is deleted
 
virtual void update ()
 
void shortButtonPress (modm::MenuButtons::Button button)
 shortButtonPress pass the button press to the current top view More...
 

Protected Attributes

modm::GraphicDisplaydisplay
 
modm::Stack< modm::AbstractView< Allocator > *, modm::LinkedList< modm::AbstractView< Allocator > * > > stack
 
Allocator allocator
 

Detailed Description

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

Stack which handles the displaying of views on the graphic display.

This class also deallocates the views passed to the stack.

Author
Thorsten Lajewski

Member Function Documentation

template<typename Allocator = std::allocator<IAbstractView>>
modm::AbstractView<Allocator>* modm::ViewStack< Allocator >::get ( )
inline

get the top view from the stack

Returns
pointer to view from stack
template<typename Allocator = std::allocator<IAbstractView>>
void modm::ViewStack< Allocator >::push ( modm::AbstractView< Allocator > *  view)
inline

push new view on top of stack the new view will be displayed instead of the old one

Parameters
viewnext displayed view
template<typename Allocator = std::allocator<IAbstractView>>
void modm::ViewStack< Allocator >::shortButtonPress ( modm::MenuButtons::Button  button)
inline

shortButtonPress pass the button press to the current top view

Parameters
buttonthe pressed button

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