Class ConsoleDriver
Base class for Terminal.Gui ConsoleDriver implementations.
public abstract class ConsoleDriver
- Inheritance
-
ConsoleDriver
- Derived
- Inherited Members
Remarks
There are currently four implementations: - CursesDriver (for Unix and Mac) - WindowsDriver - NetDriver that uses the .NET Console API - FakeConsole for unit testing.
Properties
- Clipboard
Get the operating system clipboard.
- CurrentAttribute
The Attribute that will be used for the next AddRune(Rune) or AddStr(string) call.
- SupportsTrueColor
Gets whether the ConsoleDriver supports TrueColor output.
Methods
- EnsureCursorVisibility()
Determines if the terminal cursor should be visible or not and sets it accordingly.
- GetCursorVisibility(out CursorVisibility)
Gets the terminal cursor visibility.
- GetVersionInfo()
Returns the name of the driver and relevant library version information.
- IsRuneSupported(Rune)
Tests if the specified rune is supported by the driver.
- MakeColor(in Color, in Color)
Makes an Attribute.
- Move(int, int)
Updates Col and Row to the specified column and row in Contents. Used by AddRune(Rune) and AddStr(string) to determine where to add content.
- OnKeyDown(Key)
Called when a key is pressed down. Fires the KeyDown event. This is a precursor to OnKeyUp(Key).
- OnKeyUp(Key)
Called when a key is released. Fires the KeyUp event.
- OnMouseEvent(MouseEventArgs)
Called when a mouse event occurs. Fires the MouseEvent event.
- SendKeys(char, ConsoleKey, bool, bool, bool)
Simulates a key press.
- SetCursorVisibility(CursorVisibility)
Sets the terminal cursor visibility.
- Suspend()
Suspends the application (e.g. on Linux via SIGTSTP) and upon resume, resets the console driver.
- UpdateScreen()
Redraws the physical screen with the contents that have been queued up via any of the printing commands.
Events
- ClearedContents
Raised each time ClearContents() is called. For benchmarking.
- KeyUp
Event fired when a key is released.
- MouseEvent
Event fired when a mouse event occurs.
- SizeChanged
The event fired when the terminal is resized.