Class ConsoleDriver | Terminal.Gui v1 (original) (raw)
Namespace
Assembly
Terminal.Gui.dll
ConsoleDriver is an abstract class that defines the requirements for a console driver.
There are currently three implementations: CursesDriver (for Unix and Mac), WindowsDriver, and NetDriver that uses the .NET Console API.
public abstract class ConsoleDriver
Inheritance
ConsoleDriver
Derived
Inherited Members
Fields
Blocks Segment indicator for meter views (e.g. ProgressBar.
The bottom tee.
Checkmark.
Continuous Segment indicator for meter views (e.g. ProgressBar.
Diamond character
Down Arrow.
Horizontal double line character.
Horizontal line character.
Horizontal line character for rounded corners.
Lower left corner
Lower left double corner
Lower left rounded corner
Lower right corner
Lower right double corner
Lower right rounded corner
Left Arrow.
Left frame/bracket (e.g. '[' for Button).
Left indicator for default action (e.g. for Button).
Left tee
Right Arrow.
Right frame/bracket (e.g. ']' for Button).
Right indicator for default action (e.g. for Button).
Right tee
Selected mark.
Stipple pattern
The handler fired when the terminal is resized.
Top tee
Upper left corner
Upper left double corner
Upper left rounded corner
Upper right corner
Upper right double corner
Upper right rounded corner
Un-checked checkmark.
Un-selected selected mark.
Up Arrow.
Vertical double line character.
Vertical line character.
Vertical line character for rounded corners.
Properties
Controls the current clipping region that AddRune/AddStr is subject to.
Get the operation system clipboard.
The current number of columns in the terminal.
The format is rows, columns and 3 values on the last column: Rune, Attribute and Dirty Flag
The current attribute the driver is using.
Set flags to enable/disable ConsoleDriver diagnostics.
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.
Draws a frame on the specified region with the specified padding around the frame.
DrawWindowFrame(Rect, int, int, int, int, bool, bool, Border)
Draws a frame for a window with padding and an optional visible border inside the padding.
DrawWindowTitle(Rect, ustring, int, int, int, int, TextAlignment)
Draws the title for a Window-style view incorporating padding.
Ends the execution of the console driver.
Ensure the cursor visibility
Gets the current Attribute.
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
Ensures all Attributes in ColorSchemes are correctly initialized by the driver.
IsValidContent(int, int, Rect)
Ensures that the column and line are in a valid range from the size of the driver.
Make the attribute for the foreground and background colors.
Make the Colors for the ColorScheme.
Ensures a Rune is not a control character and can be displayed by translating characters below 0x20 to equivalent, printable, Unicode chars.
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
Set the handler when the terminal is resized.
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.