Display text on LCD displays (even on multiple ones). Allow to create windows (frames) on display, and to combine them (split, add, duplicate, scroll). See http://mbed.org/users/hlipka/notebook/lcdwindow/ for more information.

Dependents:   Mbell

Embed: (wiki syntax)

« Back to documentation index

Window Class Reference

the base window class, which proves the interface for all common methods. More...

#include <window.h>

Inherited by MultiWindow, SubWindow, TeeWindow, Terminal, TextLCDAdapter, and TextLCDBase.

Public Member Functions

virtual void writeText (const unsigned int column, const unsigned int row, const char text[])=0
 write text into the window, at the given position.
virtual int getRows ()=0
virtual int getColumns ()=0
virtual void clear ()=0
 clears the window
virtual void locate (int column, int row)
 set (internal) cursor to a screen column and row
virtual void character (int column, int row, int c)=0
 writes a character to the specified position must be public because it is used during delegation
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)

Protected Member Functions

 Window ()
 base constructor initializes the _guard semaphore needed for syncing parallel writes

Detailed Description

the base window class, which proves the interface for all common methods.

Definition at line 35 of file window.h.


Constructor & Destructor Documentation

Window (  ) [protected]

base constructor initializes the _guard semaphore needed for syncing parallel writes

Definition at line 52 of file window.cpp.


Member Function Documentation

virtual void character ( int  column,
int  row,
int  c 
) [pure 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

Implemented in DogmLCDSPI, HD44780LCD8bit, KS0108LCD8bit, MultiWindow, SED1335TextLCD, SubWindow, TeeWindow, Terminal, and TextLCDAdapter.

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

Implemented in TextLCDBase, MultiWindow, SubWindow, TeeWindow, Terminal, and TextLCDAdapter.

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

Implemented in TextLCDBase, MultiWindow, SubWindow, TeeWindow, Terminal, and TextLCDAdapter.

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

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,
  ... 
)

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 )

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.

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

write text into the window, at the given position.

this doesn't change the internal cursor position Implementations should check for the length of the text and shorten it accordingly. columns the column where to write row the line where to write text the text to write

Implemented in DogmLCDSPI, HD44780LCD8bit, KS0108LCD8bit, MultiWindow, SED1335TextLCD, SubWindow, TeeWindow, and Terminal.