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

Fork of LcdWindow by Hendrik Lipka

Embed: (wiki syntax)

« Back to documentation index

Terminal Class Reference

Terminal Class Reference

A windows class which uses an internal buffer to provide automatic scrolling. More...

#include <terminal.h>

Inherits Window.

Public Member Functions

 Terminal (Window *window)
virtual void writeText (const unsigned int column, const unsigned int row, const char text[])
 works like the normal writeText method, but also stores the written text into the internal buffer (which makes it subject to scrolling)
virtual void addText (const char text[])
 write the given text into the last line (at the first position)
virtual int getColumns ()
virtual int getRows ()
virtual void clear ()
 clears the window
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
void disableDisplay ()
 disable Output on Display
void enableDisplay ()
 Enable Output on Display.
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

A windows class which uses an internal buffer to provide automatic scrolling.

The buffer is initially filled with spaces.

Definition at line 33 of file terminal.h.


Constructor & Destructor Documentation

Terminal ( Window window )
Parameters:
windowthe parent window

Definition at line 27 of file terminal.cpp.


Member Function Documentation

void addText ( const char  text[] ) [virtual]

write the given text into the last line (at the first position)

Parameters:
textthe text to write

Definition at line 70 of file terminal.cpp.

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 45 of file terminal.cpp.

void clear (  ) [virtual]

clears the window

Implements Window.

Definition at line 97 of file terminal.cpp.

void disableDisplay (  )

disable Output on Display

Definition at line 107 of file terminal.cpp.

void enableDisplay (  )

Enable Output on Display.

Definition at line 115 of file terminal.cpp.

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

Implements Window.

Definition at line 50 of file terminal.h.

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

Implements Window.

Definition at line 51 of file terminal.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]

works like the normal writeText method, but also stores the written text into the internal buffer (which makes it subject to scrolling)

Implements Window.

Definition at line 57 of file terminal.cpp.