modm API documentation
modm::ScrollableText Class Reference

The ScrollableText class scrolls the text if the required space of the string is less than the available. More...

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

Public Member Functions

 ScrollableText (const char *text, uint16_t space)
 
 ScrollableText (const ScrollableText &text)
 
ScrollableText & operator= (const ScrollableText &text)
 
bool needsScrolling ()
 
const char * getText ()
 getText return the part of the text which should be displayed next More...
 
void toogle ()
 toogle the scrolling
 
void scroll ()
 start scrolling the text
 
void pause ()
 pause scrolling the text
 
void setToStart ()
 setToStart getText returns the beginning of the text next time.
 
bool isPaused ()
 isPaused determines if the text is currently scrolling. More...
 

Detailed Description

The ScrollableText class scrolls the text if the required space of the string is less than the available.

Author
Thorsten Lajewski
Warning
This class only works in combination with modm::font::FixedWidth5x8

Constructor & Destructor Documentation

modm::ScrollableText::ScrollableText ( const char *  text,
uint16_t  space 
)
Parameters
textstring which should be displayed on the Graphic Display
spacenumber of letters, which can be displayed at once

Member Function Documentation

const char * modm::ScrollableText::getText ( )

getText return the part of the text which should be displayed next

If the text needs scrolling and the scrolling is not paused, each call to this function returns another part of the text which is displaced by one letter.

Returns
part of the text
bool modm::ScrollableText::isPaused ( )
inline

isPaused determines if the text is currently scrolling.

Returns
bool modm::ScrollableText::needsScrolling ( )
inline

determines if the text can be displayed without scrolling


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