Fork of LCD-Window which works with Enhanced TextLCD from Wim

Fork of LcdWindow by Hendrik Lipka

Embed: (wiki syntax)

« Back to documentation index

MultiWindow Class Reference

MultiWindow Class Reference

Class for combining multiple windows into a single one (by stacking them on top of each other). More...

#include <multiwindow.h>

Inherits Window.

Public Member Functions

 MultiWindow (vector< Window * > lcds)
virtual void writeText (const unsigned int column, const unsigned int row, const char text[])
 writes text to the parent window which contains the given line
virtual int getColumns ()
virtual int getRows ()
virtual void clear ()
 clears all parent windows
virtual void character (int column, int row, int c)
 writes a character to the specified position must be public because it is used during delegation
virtual void locate (int column, int row)
 set (internal) cursor to a screen column and row
int putc (int c)
 Write a character to the LCD, on the position specified by the cursor sets the cursor to the next position, and wraps (from right to left, next line, and from bottom back to top)
int printf (const char *format,...)
 Write a formated string to the LCD, on the position specified by the cursor does wrap around (as specified by putc)

Detailed Description

Class for combining multiple windows into a single one (by stacking them on top of each other).

It is assumed that all windows are of the same width (but they might be of different height).

Definition at line 37 of file multiwindow.h.


Constructor & Destructor Documentation

MultiWindow ( vector< Window * >  lcds )
Parameters:
lcdsthe vector of windows to stack. Aggregated height is calculated as sum of all heights

Definition at line 26 of file multiwindow.cpp.


Member Function Documentation

void character ( int  column,
int  row,
int  c 
) [virtual]

writes a character to the specified position must be public because it is used during delegation

Parameters:
columnThe horizontal position from the left, indexed from 0
rowThe vertical position from the top, indexed from 0
cthe character

Implements Window.

Definition at line 36 of file multiwindow.cpp.

void clear (  ) [virtual]

clears all parent windows

Implements Window.

Definition at line 64 of file multiwindow.cpp.

virtual int getColumns (  ) [virtual]
Parameters:
returnsthe width of the window

Implements Window.

Definition at line 48 of file multiwindow.h.

virtual int getRows (  ) [virtual]
Parameters:
returnsthe height of the window

Implements Window.

Definition at line 49 of file multiwindow.h.

void locate ( int  column,
int  row 
) [virtual, inherited]

set (internal) cursor to a screen column and row

Parameters:
columnThe horizontal position from the left, indexed from 0
rowThe vertical position from the top, indexed from 0

Definition at line 26 of file window.cpp.

int printf ( const char *  format,
  ... 
) [inherited]

Write a formated string to the LCD, on the position specified by the cursor does wrap around (as specified by putc)

Parameters:
formatA printf-style format string, followed by the variables to use in formating the string.

Reimplemented in TextLCDAdapter.

int putc ( int  c ) [inherited]

Write a character to the LCD, on the position specified by the cursor sets the cursor to the next position, and wraps (from right to left, next line, and from bottom back to top)

Parameters:
cThe character to write to the display

Reimplemented in TextLCDAdapter.

void writeText ( const unsigned int  column,
const unsigned int  row,
const char  text[] 
) [virtual]

writes text to the parent window which contains the given line

Implements Window.

Definition at line 51 of file multiwindow.cpp.