Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of RA8875 by
TextDisplay Class Reference
A text display class that supports character based presentation. More...
#include <TextDisplay.h>
Inherited by GraphicsDisplay.
Public Member Functions | |
| TextDisplay (const char *name=NULL) | |
| Create a TextDisplay interface. | |
| virtual int | character (int x, int y, 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 if columns on TextDisplay | |
| virtual bool | claim (FILE *stream) |
| redirect output from a stream (stoud, sterr) to display | |
| virtual RetCode_t | cls ()=0 |
| clear screen | |
| virtual RetCode_t | locate (textloc_t column, textloc_t row)=0 |
| locate the cursor at a character position. | |
| virtual RetCode_t | foreground (color_t color)=0 |
| set the foreground color | |
| virtual RetCode_t | background (color_t color)=0 |
| set the background color | |
Detailed Description
A text display class that supports character based presentation.
Definition at line 26 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 display through the stdio stream.
Definition at line 22 of file TextDisplay.cpp.
Member Function Documentation
| virtual RetCode_t background | ( | color_t | color ) | [pure virtual] |
set the background color
- Note:
- this method may be overridden in a derived class.
- Parameters:
-
color is color to use for background drawing.
- Returns:
- error code.
Implemented in RA8875.
| virtual int character | ( | int | x, |
| int | y, | ||
| int | c | ||
| ) | [pure virtual] |
output a character at the given position
- Note:
- this method may be overridden in a derived class.
- Parameters:
-
x position in pixels y position in pixels c the character to be written to the TextDisplay
- Returns:
- number of pixels to advance the cursor which could be the cell width for non-proportional characters, or the actual character width for proportional characters.
Implemented in GraphicsDisplay.
| bool claim | ( | FILE * | stream ) | [virtual] |
redirect output from a stream (stoud, sterr) to display
- Note:
- this method may be overridden in a derived class.
- Parameters:
-
stream that shall be redirected to the TextDisplay
- Returns:
- true if the claim succeeded.
Definition at line 95 of file TextDisplay.cpp.
| RetCode_t cls | ( | void | ) | [pure virtual] |
clear screen
- Note:
- this method may be overridden in a derived class.
- Returns:
- error code.
Implemented in GraphicsDisplay, and RA8875.
Definition at line 58 of file TextDisplay.cpp.
| virtual int columns | ( | ) | [pure virtual] |
return number if columns on TextDisplay
- Note:
- this method may be overridden in a derived class.
- Returns:
- number of text rows for the display for the currently active font.
Implemented in GraphicsDisplay, and RA8875.
| virtual RetCode_t foreground | ( | color_t | color ) | [pure virtual] |
set the foreground color
- Note:
- this method may be overridden in a derived class.
- Parameters:
-
color is color to use for foreground drawing.
- Returns:
- error code.
Implemented in RA8875.
| RetCode_t locate | ( | textloc_t | column, |
| textloc_t | row | ||
| ) | [pure 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.
- Returns:
- error code.
Implemented in RA8875.
Definition at line 68 of file TextDisplay.cpp.
| virtual int rows | ( | ) | [pure virtual] |
return number of rows on TextDisplay
- Note:
- this method may be overridden in a derived class.
- Returns:
- number of text rows for the display for the currently active font.
Implemented in GraphicsDisplay, and RA8875.
Generated on Tue Jul 12 2022 21:36:16 by
1.7.2
