# IConsoleWindow Struct Reference

Inheritance diagram for IConsoleWindow:

## Public Member Functions

virtual void | OnPaint ()
| The window must be repainted.
virtual void | OnHundredthTick ()
| Called once every 100 (game) ticks.
virtual void | OnMouseLoop ()
| Called for every mouse loop run, which is at least once per (game) tick.
virtual EventState | OnKeyPress (uint16 key, uint16 keycode)
| A key has been pressed.

## Data Fields

int | line_height
int | line_offset

## Static Public Attributes

static int | scroll = 0

## Detailed Description

Definition at line 168 of file console_gui.cpp.

## Member Function Documentation

virtual EventState IConsoleWindow::OnKeyPress | ( | uint16 | key,
|  | uint16 | keycode |
| ) |  |  | `[inline, virtual]`

A key has been pressed.

Parameters:

  | key | the Unicode value of the key.
  | keycode | the untranslated key code including shift state.

Returns:
  ES_HANDLED if the key press has been handled and no other window should receive the event.

Reimplemented from Window.

Definition at line 227 of file console_gui.cpp.

References Textbuf::buf, CS_ALPHANUMERAL, DeleteTextBufferAll(), DeleteTextBufferChar(), Window::ES_HANDLED, Window::ES_NOT_HANDLED, Window::height, IConsoleCmdExec(), IConsoleHistoryAdd(), IConsoleHistoryNavigate(), IConsolePrintF(), InsertTextBufferChar(), InsertTextBufferClipboard(), IsValidChar(), MarkWholeScreenDirty(), MoveTextBufferPos(), Window::SetDirty(), and IConsoleLine::size.

virtual void IConsoleWindow::OnPaint | ( |  | ) | `[inline, virtual]`

The window must be repainted.

Note:
  This method should not change any state, it should only use drawing functions.

Reimplemented from Window.

Definition at line 189 of file console_gui.cpp.

References Textbuf::buf, Textbuf::caret, Textbuf::caretxoffs, DrawString(), IConsoleLine::Get(), GfxFillRect(), Window::height, Window::left, max(), IConsoleLine::previous, SA_FORCE, SA_LEFT, Window::top, Textbuf::width, and Window::width.

The documentation for this struct was generated from the following file:

- src/console_gui.cpp