Treehopper C# API
CharacterDisplay Class Referenceabstract

Represents displays that can print strings of alphanumeric characters on one or more lines More...

Inheritance diagram for CharacterDisplay:
ICharacterDisplay Hd44780 SevenSegmentDisplay GroveI2cLcd

Public Member Functions

 CharacterDisplay (int Columns, int Rows)
 Construct a character display More...
 
Task SetCursorPosition (int left, int top)
 Set left/right cursor position More...
 
Task WriteLine (dynamic value)
 Write a line of text, advancing the cursor to the next line More...
 
async Task Write (dynamic value)
 Write text More...
 
Task Clear ()
 Clear the display and reset the cursor to (0,0) More...
 

Protected Member Functions

abstract Task clear ()
 Clear the display. More...
 
abstract Task updateCursorPosition ()
 internally updates the current cursor position More...
 
abstract Task write (dynamic value)
 write text at the current cursor position More...
 

Properties

Collection< string > History = new Collection<string>() [get]
 History of previously-written lines from the display More...
 
Collection< string > Lines = new Collection<string>() [get]
 Current lines of the display More...
 
int Columns [get]
 Number of columns of the display More...
 
int Rows [get]
 Number of rows of the display More...
 
int CursorLeft [get, set]
 Cursor left position More...
 
int CursorTop [get, set]
 Cursor top position More...
 

Detailed Description

Represents displays that can print strings of alphanumeric characters on one or more lines

Constructor & Destructor Documentation

◆ CharacterDisplay()

CharacterDisplay ( int  Columns,
int  Rows 
)

Construct a character display

Parameters
ColumnsNumber of columns
RowsNumber of rows

Member Function Documentation

◆ SetCursorPosition()

Task SetCursorPosition ( int  left,
int  top 
)

Set left/right cursor position

Parameters
leftThe left position
topThe top position
Returns
An awaitable task that completes once the cursor is updated

Implements ICharacterDisplay.

◆ WriteLine()

Task WriteLine ( dynamic  value)

Write a line of text, advancing the cursor to the next line

Parameters
valuethe text to write
Returns
An awaitable task that completes when finished

Implements ICharacterDisplay.

◆ Write()

async Task Write ( dynamic  value)

Write text

Parameters
valuethe text to write
Returns
An awaitable task that completes when finished

Implements ICharacterDisplay.

◆ Clear()

Task Clear ( )

Clear the display and reset the cursor to (0,0)

Returns
An awaitable task that completes when finished

Implements ICharacterDisplay.

◆ clear()

abstract Task clear ( )
protectedpure virtual

Clear the display.

The driver is expected to reset the cursor to home

Implemented in Hd44780, and SevenSegmentDisplay.

◆ updateCursorPosition()

abstract Task updateCursorPosition ( )
protectedpure virtual

internally updates the current cursor position

Returns

Implemented in Hd44780, and SevenSegmentDisplay.

◆ write()

abstract Task write ( dynamic  value)
protectedpure virtual

write text at the current cursor position

Parameters
valuethe data to write
Returns
An awaitable task that completes when finished

Implemented in Hd44780, and SevenSegmentDisplay.

Property Documentation

◆ History

Collection<string> History = new Collection<string>()
get

History of previously-written lines from the display

◆ Lines

Collection<string> Lines = new Collection<string>()
get

Current lines of the display

◆ Columns

int Columns
get

Number of columns of the display

◆ Rows

int Rows
get

Number of rows of the display

◆ CursorLeft

int CursorLeft
getset

Cursor left position

◆ CursorTop

int CursorTop
getset

Cursor top position


The documentation for this class was generated from the following file: