|
💻 TermColor User Manual
|


Classes | |
| struct | CharAttributes |
| struct | CharInfo |
| struct | CharUnion |
| struct | Coord |
| struct | SmallRect |
Public Member Functions | |
| Win32TermBuffer (int width, int height) | |
| void | Clear () |
| void | Clear< TColorValue > (char c, 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 offsetX, int offsetY) |
Public Member Functions inherited from TermColor.ITerminalBuffer | |
| void | SetPoint< TColorValue > (int x, int y, char ch, in TColorValue foreground, in TColorValue background) |
Static Public Attributes | |
| const int | STD_OUTPUT_HANDLE = -11 |
| const uint | ENABLE_VIRTUAL_TERMINAL_PROCESSING = 4 |
Package Functions | |
| static IntPtr | GetStdHandle (int nStdHandle) |
| static SafeFileHandle | CreateFile (string fileName, [MarshalAs(UnmanagedType.U4)] uint fileAccess, [MarshalAs(UnmanagedType.U4)] uint fileShare, IntPtr securityAttributes, [MarshalAs(UnmanagedType.U4)] FileMode creationDisposition, [MarshalAs(UnmanagedType.U4)] int flags, IntPtr template) |
| static bool | WriteConsoleOutput (SafeFileHandle hConsoleOutput, CharInfo[] lpBuffer, Coord dwBufferSize, Coord dwBufferCoord, ref SmallRect lpWriteRegion) |
| static bool | SetConsoleMode (IntPtr hConsoleHandle, uint dwMode) |
| static bool | GetConsoleMode (IntPtr hConsoleHandle, out uint lpMode) |
Static Package Functions | |
| static void | EnableVTProcessing () |
Static Package Attributes | |
| static bool | EnableVTProcessingThrows = true |
Properties | |
| int | Length [get] |
| int | Width [get] |
| int | Height [get] |
Properties inherited from TermColor.ITerminalBuffer | |
| int | Width [get] |
| int | Height [get] |
Text buffer capable of storing color data. Supports only 16 color mode. Data internally represented as a binary structure ready to be passed to Windows Console API. Outputs colored text via Windows Console API.
|
inline |
Creates new ConsoleBuffer with given size.
| void TermColor.Win32TermBuffer.Clear | ( | ) |
Fill the buffer with empty characters and default colors.
Implements TermColor.ITerminalBuffer.
|
inline |
Fill the buffer with given (char, IColor, IColor) tuple.
| TColorValue | Type of the color. |
| c | The character to clear with. |
| foreground | Foreground color. |
| background | Background color. |
Implements TermColor.ITerminalBuffer.
| TColorValue | : | IColor |
|
inline |
Forward the contents of the buffer to an output device. Win32TermBuffer can output only to Windows Console, therefore the device must be Console.Out.
| output | Forward the contents of the buffer to an output device. Must be Console.Out, otherwise exception is thrown. |
| ArgumentException |
Implements TermColor.ITerminalBuffer.
|
inline |
Forward the contents of the buffer to an output device at a specific offset. Win32TermBuffer can output only to Windows Console, therefore the device must be Console.Out.
| output | Forward the contents of the buffer to an output device at a specific offset. Must be Console.Out, otherwise exception is thrown. |
| ArgumentException |
Implements TermColor.ITerminalBuffer.
|
inline |
Write background color to one point in the buffer. Rows and columns are numbered from the top left starting at zero.
| x | Column number. |
| y | Row number. |
| background | Background color of the character. |
Implements TermColor.ITerminalBuffer.
| TColorValue | : | IColor |
|
inline |
Write a character to one point in the buffer. Rows and columns are numbered from the top left starting at zero.
| x | Column number. |
| y | Row number. |
| ch | The character to write. |
Implements TermColor.ITerminalBuffer.
|
inline |
Write foreground color to one point in the buffer. Rows and columns are numbered from the top left starting at zero.
| x | Column number. |
| y | Row number. |
| foreground | Foreground color of the character. |
Implements TermColor.ITerminalBuffer.
| TColorValue | : | IColor |