ConsoleDriver Class

Definition

Line 77 of cmsxk/Console.cm

Constructors & Destructor

static ConsoleDriver()
private ConsoleDriver()

Member Functions

private void AddCharToInputBuffer(uchar c)
public void BeginObeyColorStrings()
private void DeliverInputLine()
public inline nothrow bool Echo() const
public void EndObeyColorStrings()
public inline nothrow bool Eof() const
private String<uchar> GetCharsFromInputBuffer()
public void GetConsoleColors(ConsoleColor& foregroundColor, ConsoleColor& backgroundColor)
public inline nothrow void* GetConsoleInputHandle()
public inline nothrow void* GetConsoleOutputHandle()
public void GetDimensions()
public void GetDimensions(int& rows, int& cols)
public nothrow String<char> GetLine() const
private void HandleBackspace()
private void HandleChar(uchar c)
private void HandleDelete()
private void HandleEnd()
private void HandleEnter()
private void HandleEof()
private void HandleHome()
private void HandleLeft()
private void HandleRight()
public nothrow bool HasLine() const
public static ConsoleDriver& Instance()
public void InterruptService()
public void KeyPressed(uchar c)
public void PopColors()
public void PushColors(ConsoleColor foregroundColor, ConsoleColor backgroundColor)
public inline nothrow void ResetEof()
public void SetConsoleColors(ConsoleColor foregroundColor, ConsoleColor backgroundColor)
private void SetCursorPos(int x, int y)
public inline nothrow void SetEcho(bool echo_)
public void Stop()
private void UpdateLine()
private void Write(const String<uchar>& u)
public void WriteToConsole(byte* buffer, long count)
public void WriteWithColors(const String<uchar>& u)

Member Variables

private Stack<ushort> attributeStack
private ushort attributes
private void* consoleInputHandle
private void* consoleOutputHandle
private int cursorPosX
private int cursorPosY
private bool echo
private bool eof
private String<uchar> inputBuffer
private Mutex inputBufferMutex
private static UniquePtr<ConsoleDriver> instance
private String<uchar> line
private List<String<uchar>> lines
private Machine& machine
private bool obeyColorStrings
private int outputEndCursorPosX
private int outputEndCursorPosY
private int pos
private int screenSizeX
private int screenSizeY
private UnicodeEngine unicodeEngine

Constructor& Destructor Details

ConsoleDriver Static Constructor

static ConsoleDriver()

Definition
Line 79 of cmsxk/Console.cm


ConsoleDriver Constructor

private ConsoleDriver()

Definition
Line 86 of cmsxk/Console.cm


Member Function Details

AddCharToInputBuffer Member Function

private void AddCharToInputBuffer(uchar c)

Definition
Line 449 of cmsxk/Console.cm


BeginObeyColorStrings Member Function

public void BeginObeyColorStrings()

Definition
Line 173 of cmsxk/Console.cm


DeliverInputLine Member Function

private void DeliverInputLine()

Definition
Line 286 of cmsxk/Console.cm


Echo Member Function

public inline nothrow bool Echo()

Definition
Line 124 of cmsxk/Console.cm


EndObeyColorStrings Member Function

public void EndObeyColorStrings()

Definition
Line 177 of cmsxk/Console.cm


Eof Member Function

public inline nothrow bool Eof()

Definition
Line 116 of cmsxk/Console.cm


GetCharsFromInputBuffer Member Function

private String<uchar> GetCharsFromInputBuffer()

Definition
Line 454 of cmsxk/Console.cm


GetConsoleColors Member Function

public void GetConsoleColors(ConsoleColor& foregroundColor, ConsoleColor& backgroundColor)

Definition
Line 148 of cmsxk/Console.cm


GetConsoleInputHandle Member Function

public inline nothrow void* GetConsoleInputHandle()

Definition
Line 140 of cmsxk/Console.cm


GetConsoleOutputHandle Member Function

public inline nothrow void* GetConsoleOutputHandle()

Definition
Line 144 of cmsxk/Console.cm


GetDimensions Member Function

public void GetDimensions()

Definition
Line 109 of cmsxk/Console.cm


GetDimensions Member Function

public void GetDimensions(int& rows, int& cols)

Definition
Line 103 of cmsxk/Console.cm


GetLine Member Function

public nothrow String<char> GetLine()

Definition
Line 136 of cmsxk/Console.cm


HandleBackspace Member Function

private void HandleBackspace()

Definition
Line 416 of cmsxk/Console.cm


HandleChar Member Function

private void HandleChar(uchar c)

Definition
Line 429 of cmsxk/Console.cm


HandleDelete Member Function

private void HandleDelete()

Definition
Line 406 of cmsxk/Console.cm


HandleEnd Member Function

private void HandleEnd()

Definition
Line 376 of cmsxk/Console.cm


HandleEnter Member Function

private void HandleEnter()

Definition
Line 344 of cmsxk/Console.cm


HandleEof Member Function

private void HandleEof()

Definition
Line 356 of cmsxk/Console.cm


HandleHome Member Function

private void HandleHome()

Definition
Line 368 of cmsxk/Console.cm


HandleLeft Member Function

private void HandleLeft()

Definition
Line 384 of cmsxk/Console.cm


HandleRight Member Function

private void HandleRight()

Definition
Line 395 of cmsxk/Console.cm


HasLine Member Function

public nothrow bool HasLine()

Definition
Line 132 of cmsxk/Console.cm


Instance Static Member Function

public static ConsoleDriver& Instance()

Definition
Line 82 of cmsxk/Console.cm


InterruptService Member Function

public void InterruptService()

Definition
Line 257 of cmsxk/Console.cm


KeyPressed Member Function

public void KeyPressed(uchar c)

Definition
Line 252 of cmsxk/Console.cm


PopColors Member Function

public void PopColors()

Definition
Line 168 of cmsxk/Console.cm


PushColors Member Function

public void PushColors(ConsoleColor foregroundColor, ConsoleColor backgroundColor)

Definition
Line 163 of cmsxk/Console.cm


ResetEof Member Function

public inline nothrow void ResetEof()

Definition
Line 120 of cmsxk/Console.cm


SetConsoleColors Member Function

public void SetConsoleColors(ConsoleColor foregroundColor, ConsoleColor backgroundColor)

Definition
Line 153 of cmsxk/Console.cm


SetCursorPos Member Function

private void SetCursorPos(int x, int y)

Definition
Line 461 of cmsxk/Console.cm


SetEcho Member Function

public inline nothrow void SetEcho(bool echo_)

Definition
Line 128 of cmsxk/Console.cm


Stop Member Function

public void Stop()

Definition
Line 98 of cmsxk/Console.cm


UpdateLine Member Function

private void UpdateLine()

Definition
Line 467 of cmsxk/Console.cm


Write Member Function

private void Write(const String<uchar>& u)

Definition
Line 209 of cmsxk/Console.cm


WriteToConsole Member Function

public void WriteToConsole(byte* buffer, long count)

Definition
Line 181 of cmsxk/Console.cm


WriteWithColors Member Function

public void WriteWithColors(const String<uchar>& u)

Definition
Line 216 of cmsxk/Console.cm