Class FakeDriver | Terminal.Gui v1 (original) (raw)
Implements a mock ConsoleDriver for unit testing
public class FakeDriver : ConsoleDriver
Inheritance
FakeDriver
Inherited Members
Constructors
Fields
Properties
Get the operation system clipboard.
The current number of columns in the terminal.
Assists with testing, the format is rows, columns and 3 values on the last column: Rune, Attribute and Dirty Flag
If false (the default) the height of the Terminal.Gui application (Rows) tracks to the height of the visible console view when the console is resized. In this case scrolling in the console will be disabled and all Rows will remain visible.
If true then height of the Terminal.Gui application Rows only tracks the height of the visible console view when the console is made larger (the application will only grow in height, never shrink). In this case console scrolling is enabled and the contents (Rows high) will scroll as the console scrolls.
This API is deprecated and has no impact when enabled.
The current left in the terminal.
The current number of rows in the terminal.
The current top in the terminal.
Methods
Adds the specified rune to the display at the current cursor position.
Adds the str
to the display at the cursor position.
Enables the cooked event processing from the mouse driver. Not implemented by any driver: See Issue #2300.
Ends the execution of the console driver.
Ensure the cursor visibility
FromVKPacketToKConsoleKeyInfo(ConsoleKeyInfo)
GetColors(int, out Color, out Color)
Gets the foreground and background colors based on the value.
GetCursorVisibility(out CursorVisibility)
Retreive the cursor caret visibility
Initializes the driver
Make the attribute for the foreground and background colors.
Make the Colors for the ColorScheme.
Moves the cursor to the specified column and row.
PrepareToRun(MainLoop, Action, Action, Action, Action)
Prepare the driver and set the key and mouse events handlers.
Updates the screen to reflect all the changes that have been done to the display buffer
Resizes the clip area when the screen is resized.
SendKeys(char, ConsoleKey, bool, bool, bool)
Allows sending keys without typing on a keyboard.
Selects the specified attribute as the attribute to use for future calls to AddRune and AddString.
SetColors(ConsoleColor, ConsoleColor)
Set Colors from limit sets of colors. Not implemented by any driver: See Issue #2300.
Advanced uses - set colors to any pre-set pairs, you would need to init_color that independently with the R, G, B values. Not implemented by any driver: See Issue #2300.
SetCursorVisibility(CursorVisibility)
Change the cursor caret visibility
Start of mouse moves.
Stop reporting mouses moves.
Suspend the application, typically needs to save the state, suspend the app and upon return, reset the console driver.
Disables the cooked event processing from the mouse driver. At startup, it is assumed mouse events are cooked. Not implemented by any driver: See Issue #2300.
Updates the location of the cursor position
Reset and recreate the contents and the driver buffer.
Redraws the physical screen with the contents that have been queued up via any of the printing commands.