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, Border)
    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.BlocksMeterSegment
    ConsoleDriver.ContinuousMeterSegment
    ConsoleDriver.HDLine
    ConsoleDriver.VDLine
    ConsoleDriver.ULDCorner
    ConsoleDriver.LLDCorner
    ConsoleDriver.URDCorner
    ConsoleDriver.LRDCorner
    ConsoleDriver.HRLine
    ConsoleDriver.VRLine
    ConsoleDriver.ULRCorner
    ConsoleDriver.LLRCorner
    ConsoleDriver.URRCorner
    ConsoleDriver.LRRCorner
    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

    Clipboard

    Declaration
    public override IClipboard Clipboard { get; }
    Property Value
    Type Description
    IClipboard
    Overrides
    ConsoleDriver.Clipboard

    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

    Left

    Declaration
    public override int Left { get; }
    Property Value
    Type Description
    System.Int32
    Overrides
    ConsoleDriver.Left

    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()

    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
    ConsoleDriver.GetColors(Int32, out Color, out Color)

    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()

    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
    ConsoleDriver.SendKeys(Char, ConsoleKey, Boolean, Boolean, Boolean)

    SetAttribute(Attribute)

    Declaration
    public override void SetAttribute(Attribute c)
    Parameters
    Type Name Description
    Attribute c
    Overrides
    ConsoleDriver.SetAttribute(Attribute)

    SetBufferSize(Int32, Int32)

    Declaration
    public void SetBufferSize(int width, int height)
    Parameters
    Type Name Description
    System.Int32 width
    System.Int32 height

    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)

    SetWindowPosition(Int32, Int32)

    Declaration
    public void SetWindowPosition(int left, int top)
    Parameters
    Type Name Description
    System.Int32 left
    System.Int32 top

    SetWindowSize(Int32, Int32)

    Declaration
    public void SetWindowSize(int width, int height)
    Parameters
    Type Name Description
    System.Int32 width
    System.Int32 height

    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()
    In This Article
    Back to top Generated by DocFX