#include <controls32.h>
Public Member Functions | |
ScrollWindow (SegManager *segMan, const Common::Rect &gameRect, const Common::Point &position, const reg_t planeObj, const uint8 defaultForeColor, const uint8 defaultBackColor, const GuiResourceId defaultFontId, const TextAlign defaultAlignment, const int16 defaultBorderColor, const uint16 maxNumEntries) | |
reg_t | add (const Common::String &text, const GuiResourceId fontId, const int16 foreColor, const TextAlign alignment, const bool scrollTo) |
reg_t | modify (const reg_t id, const Common::String &text, const GuiResourceId fontId, const int16 foreColor, const TextAlign alignment, const bool scrollTo) |
void | show () |
void | hide () |
Ratio | where () const |
void | go (const Ratio location) |
void | home () |
void | end () |
void | upArrow () |
void | downArrow () |
void | pageUp () |
void | pageDown () |
const reg_t | getBitmap () const |
A scrollable text window.
reg_t Sci::ScrollWindow::add | ( | const Common::String & | text, |
const GuiResourceId | fontId, | ||
const int16 | foreColor, | ||
const TextAlign | alignment, | ||
const bool | scrollTo | ||
) |
Adds a new text entry to the window. If fontId
, foreColor
, or alignment
are -1
, the ScrollWindow's default values will be used.
reg_t Sci::ScrollWindow::modify | ( | const reg_t | id, |
const Common::String & | text, | ||
const GuiResourceId | fontId, | ||
const int16 | foreColor, | ||
const TextAlign | alignment, | ||
const bool | scrollTo | ||
) |
Modifies an existing text entry with the given ID. If fontId
, foreColor
, or alignment
are -1
, the ScrollWindow's default values will be used.
void Sci::ScrollWindow::show | ( | ) |
Shows the ScrollWindow if it is not already visible.
void Sci::ScrollWindow::hide | ( | ) |
Hides the ScrollWindow if it is currently visible.
Ratio Sci::ScrollWindow::where | ( | ) | const |
Gets the number of lines that the content of a ScrollWindow is scrolled upward, as a ratio of the total number of lines of content.
void Sci::ScrollWindow::go | ( | const Ratio | location | ) |
Scrolls the window to a specific location.
void Sci::ScrollWindow::home | ( | ) |
Scrolls the window to the top.
void Sci::ScrollWindow::end | ( | ) |
Scrolls the window to the bottom.
void Sci::ScrollWindow::upArrow | ( | ) |
Scrolls the window up one line.
void Sci::ScrollWindow::downArrow | ( | ) |
Scrolls the window down one line.
void Sci::ScrollWindow::pageUp | ( | ) |
Scrolls the window up by one page.
void Sci::ScrollWindow::pageDown | ( | ) |
Scrolls the window down by one page.
|
inline |
Gets a reference to the in-memory bitmap that is used to render the text in the ScrollWindow.