Search Results for

Show / Hide Table of Contents

# Class FakeDriver

Implements a mock ConsoleDriver for unit testing

##### Inheritance

System.Object
ConsoleDriver
FakeDriver

##### Inherited Members

ConsoleDriver.TerminalResized
ConsoleDriver.MakePrintable(Rune)
ConsoleDriver.SetTerminalResized(Action)
ConsoleDriver.DrawWindowTitle(Rect, ustring, Int32, Int32, Int32, Int32, TextAlignment)
ConsoleDriver.Diagnostics
ConsoleDriver.DrawWindowFrame(Rect, Int32, Int32, Int32, Int32, Boolean, Boolean)
ConsoleDriver.DrawFrame(Rect, Int32, Boolean)
ConsoleDriver.Clip
ConsoleDriver.HLine
ConsoleDriver.VLine
ConsoleDriver.Stipple
ConsoleDriver.Diamond
ConsoleDriver.ULCorner
ConsoleDriver.LLCorner
ConsoleDriver.URCorner
ConsoleDriver.LRCorner
ConsoleDriver.LeftTee
ConsoleDriver.RightTee
ConsoleDriver.TopTee
ConsoleDriver.BottomTee
ConsoleDriver.Checked
ConsoleDriver.UnChecked
ConsoleDriver.Selected
ConsoleDriver.UnSelected
ConsoleDriver.RightArrow
ConsoleDriver.LeftArrow
ConsoleDriver.DownArrow
ConsoleDriver.UpArrow
ConsoleDriver.LeftDefaultIndicator
ConsoleDriver.RightDefaultIndicator
ConsoleDriver.LeftBracket
ConsoleDriver.RightBracket
ConsoleDriver.OnMeterSegment
ConsoleDriver.OffMeterSegement
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()

###### Namespace: Terminal.Gui

###### Assembly: Terminal.Gui.dll

##### Syntax

    public class FakeDriver : ConsoleDriver

### Constructors

#### FakeDriver()

##### Declaration

    public FakeDriver()

### Properties

#### Cols

##### Declaration

    public override int Cols { get; }

##### Property Value

Type | Description
--- | ---
System.Int32 |

##### Overrides

ConsoleDriver.Cols

#### HeightAsBuffer

##### Declaration

    public override bool HeightAsBuffer { get; set; }

##### Property Value

Type | Description
--- | ---
System.Boolean |

##### Overrides

ConsoleDriver.HeightAsBuffer

#### Rows

##### Declaration

    public override int Rows { get; }

##### Property Value

Type | Description
--- | ---
System.Int32 |

##### Overrides

ConsoleDriver.Rows

#### Top

##### Declaration

    public override int Top { get; }

##### Property Value

Type | Description
--- | ---
System.Int32 |

##### Overrides

ConsoleDriver.Top

### Methods

#### AddRune(Rune)

##### Declaration

    public override void AddRune(Rune rune)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Rune | rune |

##### Overrides

ConsoleDriver.AddRune(Rune)

#### AddStr(ustring)

##### Declaration

    public override void AddStr(ustring str)

##### Parameters

Type | Name | Description
--- | --- | ---
NStack.ustring | str |

##### Overrides

ConsoleDriver.AddStr(ustring)

#### CookMouse()

##### Declaration

    public override void CookMouse()

##### Overrides

ConsoleDriver.CookMouse()

#### End()

##### Declaration

    public override void End()

##### Overrides

ConsoleDriver.End()

#### EnsureCursorVisibility()

##### Declaration

    public override bool EnsureCursorVisibility()

##### Returns

Type | Description
--- | ---
System.Boolean |

##### Overrides

ConsoleDriver.EnsureCursorVisibility()

#### GetAttribute()

##### Declaration

    public override Attribute GetAttribute()

##### Returns

Type | Description
--- | ---
Attribute |

##### Overrides

ConsoleDriver.GetAttribute()

#### GetCursorVisibility(out CursorVisibility)

##### Declaration

    public override bool GetCursorVisibility(out CursorVisibility visibility)

##### Parameters

Type | Name | Description
--- | --- | ---
CursorVisibility | visibility |

##### Returns

Type | Description
--- | ---
System.Boolean |

##### Overrides

ConsoleDriver.GetCursorVisibility(out CursorVisibility)

#### Init(Action)

##### Declaration

    public override void Init(Action terminalResized)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Action | terminalResized |

##### Overrides

ConsoleDriver.Init(Action)

#### MakeAttribute(Color, Color)

##### Declaration

    public override Attribute MakeAttribute(Color fore, Color back)

##### Parameters

Type | Name | Description
--- | --- | ---
Color | fore |
Color | back |

##### Returns

Type | Description
--- | ---
Attribute |

##### Overrides

ConsoleDriver.MakeAttribute(Color, Color)

#### Move(Int32, Int32)

##### Declaration

    public override void Move(int col, int row)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int32 | col |
System.Int32 | row |

##### Overrides

ConsoleDriver.Move(Int32, Int32)

#### 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

Type | Name | Description
--- | --- | ---
MainLoop | mainLoop |
System.Action<KeyEvent> | keyHandler |
System.Action<KeyEvent> | keyDownHandler |
System.Action<KeyEvent> | keyUpHandler |
System.Action<MouseEvent> | mouseHandler |

##### Overrides

ConsoleDriver.PrepareToRun(MainLoop, Action<KeyEvent>, Action<KeyEvent>, Action<KeyEvent>, Action<MouseEvent>)

#### Refresh()

##### Declaration

    public override void Refresh()

##### Overrides

ConsoleDriver.Refresh()

#### SetAttribute(Attribute)

##### Declaration

    public override void SetAttribute(Attribute c)

##### Parameters

Type | Name | Description
--- | --- | ---
Attribute | c |

##### Overrides

ConsoleDriver.SetAttribute(Attribute)

#### SetColors(ConsoleColor, ConsoleColor)

##### Declaration

    public override void SetColors(ConsoleColor foreground, ConsoleColor background)

##### Parameters

Type | Name | Description
--- | --- | ---
System.ConsoleColor | foreground |
System.ConsoleColor | background |

##### Overrides

ConsoleDriver.SetColors(ConsoleColor, ConsoleColor)

#### SetColors(Int16, Int16)

##### Declaration

    public override void SetColors(short foregroundColorId, short backgroundColorId)

##### Parameters

Type | Name | Description
--- | --- | ---
System.Int16 | foregroundColorId |
System.Int16 | backgroundColorId |

##### Overrides

ConsoleDriver.SetColors(Int16, Int16)

#### SetCursorVisibility(CursorVisibility)

##### Declaration

    public override bool SetCursorVisibility(CursorVisibility visibility)

##### Parameters

Type | Name | Description
--- | --- | ---
CursorVisibility | visibility |

##### Returns

Type | Description
--- | ---
System.Boolean |

##### Overrides

ConsoleDriver.SetCursorVisibility(CursorVisibility)

#### StartReportingMouseMoves()

##### Declaration

    public override void StartReportingMouseMoves()

##### Overrides

ConsoleDriver.StartReportingMouseMoves()

#### StopReportingMouseMoves()

##### Declaration

    public override void StopReportingMouseMoves()

##### Overrides

ConsoleDriver.StopReportingMouseMoves()

#### Suspend()

##### Declaration

    public override void Suspend()

##### Overrides

ConsoleDriver.Suspend()

#### UncookMouse()

##### Declaration

    public override void UncookMouse()

##### Overrides

ConsoleDriver.UncookMouse()

#### UpdateCursor()

##### Declaration

    public override void UpdateCursor()

##### Overrides

ConsoleDriver.UpdateCursor()

#### UpdateScreen()

##### Declaration

    public override void UpdateScreen()

##### Overrides

ConsoleDriver.UpdateScreen()