ScummVM API documentation
Sci::ScrollWindow Class Reference

#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
 

Detailed Description

A scrollable text window.

Member Function Documentation

◆ add()

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.

◆ modify()

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.

◆ show()

void Sci::ScrollWindow::show ( )

Shows the ScrollWindow if it is not already visible.

◆ hide()

void Sci::ScrollWindow::hide ( )

Hides the ScrollWindow if it is currently visible.

◆ where()

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.

◆ go()

void Sci::ScrollWindow::go ( const Ratio  location)

Scrolls the window to a specific location.

◆ home()

void Sci::ScrollWindow::home ( )

Scrolls the window to the top.

◆ end()

void Sci::ScrollWindow::end ( )

Scrolls the window to the bottom.

◆ upArrow()

void Sci::ScrollWindow::upArrow ( )

Scrolls the window up one line.

◆ downArrow()

void Sci::ScrollWindow::downArrow ( )

Scrolls the window down one line.

◆ pageUp()

void Sci::ScrollWindow::pageUp ( )

Scrolls the window up by one page.

◆ pageDown()

void Sci::ScrollWindow::pageDown ( )

Scrolls the window down by one page.

◆ getBitmap()

const reg_t Sci::ScrollWindow::getBitmap ( ) const
inline

Gets a reference to the in-memory bitmap that is used to render the text in the ScrollWindow.


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