WoopsiUI::ScrollingTextBox Class Reference
#include <scrollingtextbox.h>
List of all members.
Detailed Description
Gadget containing a MultiLineTextBox and a vertical scrollbar. Exposed methods are more or less identical to the methods exposed by the MultiLineTextBox to ensure that the two are interchangeable.
Constructor & Destructor Documentation
WoopsiUI::ScrollingTextBox::ScrollingTextBox |
( |
s16 |
x, |
|
|
s16 |
y, |
|
|
u16 |
width, |
|
|
u16 |
height, |
|
|
const char * |
text, |
|
|
u32 |
flags, |
|
|
s16 |
maxRows = 0 , |
|
|
FontBase * |
font = NULL | |
|
) |
| | |
Constructor.
- Parameters:
-
| x | The x co-ordinate of the text box, relative to its parent. |
| y | The y co-ordinate of the text box, relative to its parent. |
| width | The width of the textbox. |
| height | The height of the textbox. |
| text | Pointer to a string to display in the textbox. |
| flags | Standard gadget flag options. |
| maxRows | The maximum number of rows the textbox can track. Adding text beyond this number will cause rows at the start of the text to be forgotten; text is essentially stored as a queue, and adding to the back of a full queue causes the front items to be popped off. Setting this to 0 will make the textbox track only the visible rows. |
| font | The font to use in this text box. |
virtual WoopsiUI::ScrollingTextBox::~ScrollingTextBox |
( |
|
) |
[inline, protected, virtual] |
WoopsiUI::ScrollingTextBox::ScrollingTextBox |
( |
const ScrollingTextBox & |
scrollingTextBox |
) |
[inline, protected] |
Copy constructor is protected to prevent usage.
Member Function Documentation
virtual void WoopsiUI::ScrollingTextBox::appendText |
( |
const char |
text |
) |
[virtual] |
Append new text to the end of the current text displayed in the textbox.
- Parameters:
-
virtual void WoopsiUI::ScrollingTextBox::appendText |
( |
const char * |
text |
) |
[virtual] |
Append new text to the end of the current text displayed in the textbox.
- Parameters:
-
virtual void WoopsiUI::ScrollingTextBox::draw |
( |
Rect |
clipRect |
) |
[virtual] |
Draw the region of the textbox within the clipping rect. Should not be called directly.
- Parameters:
-
| clipRect | The clipping rect to limit drawing to. |
Reimplemented from WoopsiUI::Gadget.
virtual const u16 WoopsiUI::ScrollingTextBox::getCurrentPage |
( |
|
) |
const [virtual] |
Returns the current page.
- Returns:
- The current page.
- See also:
- getPageCount().
virtual const u16 WoopsiUI::ScrollingTextBox::getPageCount |
( |
|
) |
const [virtual] |
Returns the number of "pages" that the text spans. A page is defined as the amount of text that can be displayed within the textbox at one time.
- Returns:
- The page count.
virtual const Text* WoopsiUI::ScrollingTextBox::getText |
( |
|
) |
const [virtual] |
Returns a pointer to the Text object that contains the wrapped text used in the textbox. It is used as the pre-processed data source for the textbox, and should not be altered.
- Returns:
- Pointer to the Text object.
virtual void WoopsiUI::ScrollingTextBox::handleScrollEvent |
( |
const GadgetEventArgs & |
e |
) |
[virtual] |
virtual void WoopsiUI::ScrollingTextBox::handleValueChangeEvent |
( |
const GadgetEventArgs & |
e |
) |
[virtual] |
virtual bool WoopsiUI::ScrollingTextBox::resize |
( |
u16 |
width, |
|
|
u16 |
height | |
|
) |
| | [virtual] |
Resize the textbox to the new dimensions.
- Parameters:
-
| width | The new width. |
| height | The new height. |
- Returns:
- True if the resize was successful.
Reimplemented from WoopsiUI::Gadget.
virtual void WoopsiUI::ScrollingTextBox::setFont |
( |
FontBase * |
font |
) |
[virtual] |
Set the font used in the textbox.
- Parameters:
-
| font | Pointer to the new font. |
Reimplemented from WoopsiUI::Gadget.
virtual void WoopsiUI::ScrollingTextBox::setText |
( |
const char |
text |
) |
[virtual] |
Set the text displayed in the textbox.
- Parameters:
-
| text | Character to display. |
virtual void WoopsiUI::ScrollingTextBox::setText |
( |
const char * |
text |
) |
[virtual] |
Set the text displayed in the textbox.
- Parameters:
-
Set the horizontal alignment of text within the textbox.
- Parameters:
-
| alignment | The horizontal position of the text. |
Set the vertical alignment of text within the textbox.
- Parameters:
-
| alignment | The vertical position of the text. |
Member Data Documentation
The documentation for this class was generated from the following file:
- C:/Documents and Settings/Administrator/Desktop/woopsi-src-0.40/Woopsi/libwoopsi/include/scrollingtextbox.h