💻 TermColor User Manual
Public Member Functions | Properties | List of all members
TermColor.ITerminalBuffer Interface Reference
Inheritance diagram for TermColor.ITerminalBuffer:
Inheritance graph
[legend]

Public Member Functions

void SetPoint< TColorValue > (int x, int y, char ch, in TColorValue foreground, in TColorValue background)
 
void SetChar (int x, int y, char ch)
 
void SetForeground< TColorValue > (int x, int y, in TColorValue color)
 
void SetBackground< TColorValue > (int x, int y, in TColorValue color)
 
void Flush (TextWriter output)
 
void Flush (TextWriter output, int offsetLeft, int offsetTop)
 
void Clear< TColorValue > (char c, in TColorValue foreground, in TColorValue background)
 
void Clear ()
 

Properties

int Width [get]
 
int Height [get]
 

Detailed Description

Two dimensional buffer of triplets (char, IColor, IColor). Color might be internally represented as a specific implementation of IColor. Can be flushed out to other buffers or to a display device.

Member Function Documentation

◆ Clear()

void TermColor.ITerminalBuffer.Clear ( )

Fill the buffer with empty characters and default colors.

Implemented in TermColor.Win32TermBuffer, TermColor.Terminal, and TermColor.AnsiTermBuffer< TColor >.

◆ Clear< TColorValue >()

void TermColor.ITerminalBuffer.Clear< TColorValue > ( char  c,
in TColorValue  foreground,
in TColorValue  background 
)

Fill the buffer with given (char, IColor, IColor) tuple.

Template Parameters
TColorValueType of the color.
Parameters
cThe character to clear with.
foregroundForeground color.
backgroundBackground color.

Implemented in TermColor.AnsiTermBuffer< TColor >, TermColor.Win32TermBuffer, and TermColor.Terminal.

Type Constraints
TColorValue :IColor 

◆ Flush() [1/2]

void TermColor.ITerminalBuffer.Flush ( TextWriter  output)

Forward the contents of the buffer to an output device.

Parameters
outputThe output device.

Implemented in TermColor.Win32TermBuffer, TermColor.Terminal, and TermColor.AnsiTermBuffer< TColor >.

◆ Flush() [2/2]

void TermColor.ITerminalBuffer.Flush ( TextWriter  output,
int  offsetLeft,
int  offsetTop 
)

Forward the contents of the buffer to an output device at a specific offset.

Parameters
outputThe output device.

Implemented in TermColor.Win32TermBuffer, TermColor.AnsiTermBuffer< TColor >, and TermColor.Terminal.

◆ SetBackground< TColorValue >()

void TermColor.ITerminalBuffer.SetBackground< TColorValue > ( int  x,
int  y,
in TColorValue  color 
)

Write background color to one point in the buffer. Rows and columns are numbered from the top left starting at zero.

Parameters
xColumn number.
yRow number.
backgroundBackground color of the character.

Implemented in TermColor.Win32TermBuffer, TermColor.Terminal, and TermColor.AnsiTermBuffer< TColor >.

Type Constraints
TColorValue :IColor 

◆ SetChar()

void TermColor.ITerminalBuffer.SetChar ( int  x,
int  y,
char  ch 
)

Write a character to one point in the buffer. Rows and columns are numbered from the top left starting at zero.

Parameters
xColumn number.
yRow number.
chThe character to write.

Implemented in TermColor.Win32TermBuffer, TermColor.Terminal, and TermColor.AnsiTermBuffer< TColor >.

◆ SetForeground< TColorValue >()

void TermColor.ITerminalBuffer.SetForeground< TColorValue > ( int  x,
int  y,
in TColorValue  color 
)

Write foreground color to one point in the buffer. Rows and columns are numbered from the top left starting at zero.

Parameters
xColumn number.
yRow number.
foregroundForeground color of the character.

Implemented in TermColor.Win32TermBuffer, TermColor.Terminal, and TermColor.AnsiTermBuffer< TColor >.

Type Constraints
TColorValue :IColor 

◆ SetPoint< TColorValue >()

void TermColor.ITerminalBuffer.SetPoint< TColorValue > ( int  x,
int  y,
char  ch,
in TColorValue  foreground,
in TColorValue  background 
)
inline

Write a character, foreground and background color to one point in the buffer. Rows and columns are numbered from the top left starting at zero.

Template Parameters
TColorValueType of the color.
Parameters
xColumn number.
yRow number.
chThe character to write.
foregroundForeground color of the character.
backgroundBackground color of the character.
Type Constraints
TColorValue :IColor 

Property Documentation

◆ Height

int TermColor.ITerminalBuffer.Height
get

Number of rows of the buffer.

◆ Width

int TermColor.ITerminalBuffer.Width
get

Nuber of columns of the buffer.


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