Class ConsoleDriver
ConsoleDriver is an abstract class that defines the requirements for a console driver. One implementation if the CursesDriver, and another one uses the .NET Console one.
Inheritance
Namespace: Terminal
Assembly: Terminal.dll
Syntax
public abstract class ConsoleDriver
Constructors
ConsoleDriver()
Declaration
protected ConsoleDriver ();
Properties
Clip
Controls the current clipping region that AddCh/AddStr is subject to.
Declaration
public Terminal.Rect Clip { get; set; }
Property Value
Type | Description |
---|---|
Rect | The clip. |
Cols
The current number of columns in the terminal.
Declaration
public abstract int Cols { get; }
Property Value
Type | Description |
---|---|
System.Int32 | To be added. |
Rows
The current number of rows in the terminal.
Declaration
public abstract int Rows { get; }
Property Value
Type | Description |
---|---|
System.Int32 | To be added. |
Methods
AddCh(Int32)
Adds the specified rune to the display at the current cursor position
Declaration
public abstract void AddCh (int rune);
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | ch | To be added. |
AddSpecial(SpecialChar)
Declaration
public abstract void AddSpecial (Terminal.SpecialChar ch);
Parameters
Type | Name | Description |
---|---|---|
SpecialChar | ch | To be added. |
AddStr(String)
Adds the specified
Declaration
public abstract void AddStr (string str);
Parameters
Type | Name | Description |
---|---|---|
System.String | str | String. |
DrawFrame(Rect, Boolean)
Declaration
public abstract void DrawFrame (Terminal.Rect region, bool fill);
Parameters
Type | Name | Description |
---|---|---|
Rect | region | To be added. |
System.Boolean | fill | To be added. |
End()
Ends the execution of the console driver.
Declaration
public abstract void End ();
Init(Action)
Initializes the driver
Declaration
public abstract void Init (Action terminalResized);
Parameters
Type | Name | Description |
---|---|---|
System.Action | terminalResized | Method to invoke when the terminal is resized. |
Move(Int32, Int32)
Moves the cursor to the specified column and row.
Declaration
public abstract void Move (int col, int row);
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | col | Column to move the cursor to. |
System.Int32 | row | Row to move the cursor to. |
PrepareToRun(MainLoop, Action<KeyEvent>, Action<MouseEvent>)
Declaration
public abstract void PrepareToRun (Mono.Terminal.MainLoop mainLoop, Action<Terminal.KeyEvent> target, Action<Terminal.MouseEvent> mouse);
Parameters
Type | Name | Description |
---|---|---|
MainLoop | mainLoop | To be added. |
System.Action<KeyEvent> | target | To be added. |
System.Action<MouseEvent> | mouse | To be added. |
RedrawTop()
Declaration
public abstract void RedrawTop ();
Refresh()
Updates the screen to reflect all the changes that have been done to the display buffer
Declaration
public abstract void Refresh ();
SetAttribute(Attribute)
Declaration
public abstract void SetAttribute (Terminal.Attribute c);
Parameters
Type | Name | Description |
---|---|---|
Attribute | c | To be added. |
SetColors(ConsoleColor, ConsoleColor)
Declaration
public abstract void SetColors (ConsoleColor foreground, ConsoleColor background);
Parameters
Type | Name | Description |
---|---|---|
System.ConsoleColor | foreground | To be added. |
System.ConsoleColor | background | To be added. |
SetColors(Int16, Int16)
Declaration
public abstract void SetColors (short foreColorId, short backgroundColorId);
Parameters
Type | Name | Description |
---|---|---|
System.Int16 | foreColorId | To be added. |
System.Int16 | backgroundColorId | To be added. |
StartReportingMouseMoves()
Declaration
public abstract void StartReportingMouseMoves ();
StopReportingMouseMoves()
Declaration
public abstract void StopReportingMouseMoves ();
Suspend()
Suspend the application, typically needs to save the state, suspend the app and upon return, reset the console driver.
Declaration
public abstract void Suspend ();