Basically i glued Peter Drescher and Simon Ford libs in a GraphicsDisplay class, then derived TFT or LCD class (which inherits Protocols class), then the most derived ones (Inits), which are per-display and are the only part needed to be adapted to diff hw.
Fork of UniGraphic by
TextDisplay Class Reference
A common base class for Text displays. More...
#include <TextDisplay.h>
Inherited by GraphicsDisplay.
Public Member Functions | |
TextDisplay (const char *name=NULL) | |
Create a TextDisplay interface. | |
virtual void | character (int column, int row, int c)=0 |
output a character at the given position | |
virtual int | rows ()=0 |
return number of rows on TextDisplay | |
virtual int | columns ()=0 |
return number of columns on TextDisplay | |
virtual bool | claim (FILE *stream) |
redirect output from a stream (stoud, sterr) to display | |
virtual void | cls () |
clear the entire screen | |
virtual void | locate (int column, int row) |
locate the cursor at a character position. | |
virtual void | foreground (uint16_t colour) |
set the foreground color | |
virtual void | background (uint16_t colour) |
set the background color |
Detailed Description
A common base class for Text displays.
Definition at line 23 of file TextDisplay.h.
Constructor & Destructor Documentation
TextDisplay | ( | const char * | name = NULL ) |
Create a TextDisplay interface.
- Parameters:
-
name The name used in the path to access the strean through the filesystem
Definition at line 8 of file TextDisplay.cpp.
Member Function Documentation
void background | ( | uint16_t | colour ) | [virtual] |
set the background color
- Note:
- this method may be overridden in a derived class.
- Parameters:
-
color is color to use for background drawing.
Definition at line 61 of file TextDisplay.cpp.
virtual void character | ( | int | column, |
int | row, | ||
int | c | ||
) | [pure virtual] |
output a character at the given position
- Parameters:
-
column column where charater must be written row where character must be written c the character to be written to the TextDisplay
- Note:
- this method may be overridden in a derived class.
Implemented in GraphicsDisplay.
bool claim | ( | FILE * | stream ) | [virtual] |
redirect output from a stream (stoud, sterr) to display
- Parameters:
-
stream stream that shall be redirected to the TextDisplay
- Note:
- this method may be overridden in a derived class.
- Returns:
- true if the claim succeeded.
Definition at line 65 of file TextDisplay.cpp.
void cls | ( | void | ) | [virtual] |
clear the entire screen
- Note:
- this method may be overridden in a derived class.
Reimplemented in LCD, TFT, TFT932x, and GraphicsDisplay.
Definition at line 41 of file TextDisplay.cpp.
virtual int columns | ( | ) | [pure virtual] |
return number of columns on TextDisplay
- Returns:
- number of columns
- Note:
- this method must be supported in the derived class.
Implemented in GraphicsDisplay.
void foreground | ( | uint16_t | colour ) | [virtual] |
set the foreground color
- Note:
- this method may be overridden in a derived class.
- Parameters:
-
color is color to use for foreground drawing.
Definition at line 57 of file TextDisplay.cpp.
void locate | ( | int | column, |
int | row | ||
) | [virtual] |
locate the cursor at a character position.
Based on the currently active font, locate the cursor on screen.
- Note:
- this method may be overridden in a derived class.
- Parameters:
-
column is the horizontal offset from the left side. row is the vertical offset from the top.
Reimplemented in GraphicsDisplay.
Definition at line 48 of file TextDisplay.cpp.
virtual int rows | ( | ) | [pure virtual] |
return number of rows on TextDisplay
- Returns:
- number of rows
- Note:
- this method must be supported in the derived class.
Implemented in GraphicsDisplay.
Generated on Wed Jul 13 2022 21:19:23 by 1.7.2