mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-26 15:57:56 +01:00
* Add test for TextField cursor position * Add comment and one more assert * Fix cursor position at the end * Remove unused local field --------- Co-authored-by: BDisp <bd.bdisp@gmail.com>
34 lines
884 B
C#
34 lines
884 B
C#
using System.Drawing;
|
|
using Terminal.Gui;
|
|
|
|
namespace TerminalGuiFluentTesting;
|
|
|
|
internal class FakeOutput : IConsoleOutput
|
|
{
|
|
public IOutputBuffer LastBuffer { get; set; }
|
|
public Size Size { get; set; }
|
|
|
|
/// <inheritdoc/>
|
|
public void Dispose () { }
|
|
|
|
/// <inheritdoc/>
|
|
public void Write (ReadOnlySpan<char> text) { }
|
|
|
|
/// <inheritdoc/>
|
|
public void Write (IOutputBuffer buffer) { LastBuffer = buffer; }
|
|
|
|
/// <inheritdoc/>
|
|
public Size GetWindowSize () { return Size; }
|
|
|
|
/// <inheritdoc/>
|
|
public void SetCursorVisibility (CursorVisibility visibility) { }
|
|
|
|
/// <inheritdoc/>
|
|
public void SetCursorPosition (int col, int row) { CursorPosition = new Point (col, row); }
|
|
|
|
/// <summary>
|
|
/// The last value set by calling <see cref="SetCursorPosition"/>
|
|
/// </summary>
|
|
public Point CursorPosition { get; private set; }
|
|
}
|