template <uint16_t W, uint16_t H>

Public Functions

mono::ui::ConsoleView::ConsoleView(geo::Point pos)

Construct a new ConsoleView, for viewing console output on the screen.

void mono::ui::ConsoleView::WriteLine(String txt)

Write a string to the console, and append a new line.

  • txt -

    The string to write to the console

virtual void mono::ui::ConsoleView::repaint()

Repaint the view content, using the View::painter.

Re-paint the view content. This method should be called when the view content has changed. You can call this method directly, but it might cause graphics artifacts because the display is not double buffered. Instead you should schedule a repaint by calling the scheduleRepaint() method. This method will schedule the repaint, right after the next display update.

The display system will not schedule any repaints automatically. The view does not contain any state information, so you or other classes utilizing view must schedule repaints.

In subclasses of View, this method must be overwritten.

int mono::ui::ConsoleView::lineLength()

Get the width of a line in characters.

<# description #>

Number of characters in one line

int mono::ui::ConsoleView::consoleLines()

Get the number lines in the console.

<# description #>

Numeber of text lines on the console view.

Protected Attributes

TextBuffer<(W-4)/5, (H-4)/9> mono::ui::ConsoleView::textBuffer

Text buffer that hold the visible text in the console. When the console scrolls, the text in the buffer is overwritten.

bool mono::ui::ConsoleView::scrolls

Becomes true when the console text has reached the bottom line of its view rectangle. And all text appending from now on, causes the console to scroll.