Class FakeDriver
Implements a mock ConsoleDriver for unit testing
Inheritance
System.Object
FakeDriver
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: Terminal.Gui.dll
Syntax
public class FakeDriver : ConsoleDriver
Constructors
|
Improve this Doc
View Source
FakeDriver()
Declaration
Properties
|
Improve this Doc
View Source
Clipboard
Declaration
public override IClipboard Clipboard { get; }
Property Value
Overrides
|
Improve this Doc
View Source
Cols
Declaration
public override int Cols { get; }
Property Value
Type |
Description |
System.Int32 |
|
Overrides
|
Improve this Doc
View Source
Contents
Assists with testing, the format is rows, columns and 3 values on the last column: Rune, Attribute and Dirty Flag
Declaration
public override int[,, ] Contents { get; }
Property Value
Type |
Description |
System.Int32[,,] |
|
Overrides
|
Improve this Doc
View Source
HeightAsBuffer
Declaration
public override bool HeightAsBuffer { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Overrides
|
Improve this Doc
View Source
Left
Declaration
public override int Left { get; }
Property Value
Type |
Description |
System.Int32 |
|
Overrides
|
Improve this Doc
View Source
Rows
Declaration
public override int Rows { get; }
Property Value
Type |
Description |
System.Int32 |
|
Overrides
|
Improve this Doc
View Source
Top
Declaration
public override int Top { get; }
Property Value
Type |
Description |
System.Int32 |
|
Overrides
Methods
|
Improve this Doc
View Source
AddRune(Rune)
Declaration
public override void AddRune(Rune rune)
Parameters
Type |
Name |
Description |
System.Rune |
rune |
|
Overrides
|
Improve this Doc
View Source
AddStr(ustring)
Declaration
public override void AddStr(ustring str)
Parameters
Type |
Name |
Description |
NStack.ustring |
str |
|
Overrides
|
Improve this Doc
View Source
CookMouse()
Declaration
public override void CookMouse()
Overrides
|
Improve this Doc
View Source
End()
Declaration
public override void End()
Overrides
|
Improve this Doc
View Source
EnsureCursorVisibility()
Declaration
public override bool EnsureCursorVisibility()
Returns
Type |
Description |
System.Boolean |
|
Overrides
|
Improve this Doc
View Source
GetAttribute()
Declaration
public override Attribute GetAttribute()
Returns
Overrides
|
Improve this Doc
View Source
GetColors(Int32, out Color, out Color)
Declaration
public override bool GetColors(int value, out Color foreground, out Color background)
Parameters
Type |
Name |
Description |
System.Int32 |
value |
|
Color |
foreground |
|
Color |
background |
|
Returns
Type |
Description |
System.Boolean |
|
Overrides
|
Improve this Doc
View Source
GetCursorVisibility(out CursorVisibility)
Declaration
public override bool GetCursorVisibility(out CursorVisibility visibility)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Overrides
|
Improve this Doc
View Source
Init(Action)
Declaration
public override void Init(Action terminalResized)
Parameters
Type |
Name |
Description |
System.Action |
terminalResized |
|
Overrides
|
Improve this Doc
View Source
MakeAttribute(Color, Color)
Declaration
public override Attribute MakeAttribute(Color fore, Color back)
Parameters
Returns
Overrides
|
Improve this Doc
View Source
MakeColor(Color, Color)
Declaration
public override Attribute MakeColor(Color foreground, Color background)
Parameters
Type |
Name |
Description |
Color |
foreground |
|
Color |
background |
|
Returns
Overrides
|
Improve this Doc
View Source
Move(Int32, Int32)
Declaration
public override void Move(int col, int row)
Parameters
Type |
Name |
Description |
System.Int32 |
col |
|
System.Int32 |
row |
|
Overrides
|
Improve this Doc
View Source
PrepareToRun(MainLoop, Action<KeyEvent>, Action<KeyEvent>, Action<KeyEvent>, Action<MouseEvent>)
Declaration
public override void PrepareToRun(MainLoop mainLoop, Action<KeyEvent> keyHandler, Action<KeyEvent> keyDownHandler, Action<KeyEvent> keyUpHandler, Action<MouseEvent> mouseHandler)
Parameters
Overrides
|
Improve this Doc
View Source
Refresh()
Declaration
public override void Refresh()
Overrides
|
Improve this Doc
View Source
ResizeScreen()
Declaration
public override void ResizeScreen()
Overrides
|
Improve this Doc
View Source
SendKeys(Char, ConsoleKey, Boolean, Boolean, Boolean)
Declaration
public override void SendKeys(char keyChar, ConsoleKey key, bool shift, bool alt, bool control)
Parameters
Type |
Name |
Description |
System.Char |
keyChar |
|
System.ConsoleKey |
key |
|
System.Boolean |
shift |
|
System.Boolean |
alt |
|
System.Boolean |
control |
|
Overrides
|
Improve this Doc
View Source
SetAttribute(Attribute)
Declaration
public override void SetAttribute(Attribute c)
Parameters
Overrides
|
Improve this Doc
View Source
SetBufferSize(Int32, Int32)
Declaration
public void SetBufferSize(int width, int height)
Parameters
Type |
Name |
Description |
System.Int32 |
width |
|
System.Int32 |
height |
|
|
Improve this Doc
View Source
SetColors(ConsoleColor, ConsoleColor)
Declaration
public override void SetColors(ConsoleColor foreground, ConsoleColor background)
Parameters
Type |
Name |
Description |
System.ConsoleColor |
foreground |
|
System.ConsoleColor |
background |
|
Overrides
|
Improve this Doc
View Source
SetColors(Int16, Int16)
Declaration
public override void SetColors(short foregroundColorId, short backgroundColorId)
Parameters
Type |
Name |
Description |
System.Int16 |
foregroundColorId |
|
System.Int16 |
backgroundColorId |
|
Overrides
|
Improve this Doc
View Source
SetCursorVisibility(CursorVisibility)
Declaration
public override bool SetCursorVisibility(CursorVisibility visibility)
Parameters
Returns
Type |
Description |
System.Boolean |
|
Overrides
|
Improve this Doc
View Source
SetWindowPosition(Int32, Int32)
Declaration
public void SetWindowPosition(int left, int top)
Parameters
Type |
Name |
Description |
System.Int32 |
left |
|
System.Int32 |
top |
|
|
Improve this Doc
View Source
SetWindowSize(Int32, Int32)
Declaration
public void SetWindowSize(int width, int height)
Parameters
Type |
Name |
Description |
System.Int32 |
width |
|
System.Int32 |
height |
|
|
Improve this Doc
View Source
StartReportingMouseMoves()
Declaration
public override void StartReportingMouseMoves()
Overrides
|
Improve this Doc
View Source
StopReportingMouseMoves()
Declaration
public override void StopReportingMouseMoves()
Overrides
|
Improve this Doc
View Source
Suspend()
Declaration
public override void Suspend()
Overrides
|
Improve this Doc
View Source
UncookMouse()
Declaration
public override void UncookMouse()
Overrides
|
Improve this Doc
View Source
UpdateCursor()
Declaration
public override void UpdateCursor()
Overrides
|
Improve this Doc
View Source
UpdateOffScreen()
Declaration
public override void UpdateOffScreen()
Overrides
|
Improve this Doc
View Source
UpdateScreen()
Declaration
public override void UpdateScreen()
Overrides