# WoopsiUI::TextBoxBase Class Reference

`#include <textboxbase.h>`

Inheritance diagram for WoopsiUI::TextBoxBase:

List of all members.

## Public Member Functions
virtual void | showCursor ()=0
virtual void | hideCursor ()=0
virtual void | setText (const WoopsiString &text)=0
virtual void | appendText (const WoopsiString &text)=0
virtual void | removeText (const u32 startIndex)=0
virtual void | removeText (const u32 startIndex, const u32 count)=0
virtual void | insertText (const WoopsiString &text, const u32 index)=0
virtual void | insertTextAtCursor (const WoopsiString &text)=0
virtual void | moveCursorToPosition (const s32 position)=0
virtual const s32 | getCursorPosition () const =0
virtual bool | opensKeyboard () const =0
virtual void | disableKeyboardPopup ()=0
virtual void | enableKeyboardPopup ()=0

## Detailed Description

Defines the interface that textbox-like classes should implement.

## Member Function Documentation

virtual void WoopsiUI::TextBoxBase::appendText | ( | const WoopsiString & | text | ) | `[pure virtual]`

Append new text to the end of the current text displayed in the label.

Parameters:

  | text | String to append.

Implemented in WoopsiUI::MultiLineTextBox, WoopsiUI::ScrollingTextBox, and WoopsiUI::TextBox.

virtual void WoopsiUI::TextBoxBase::disableKeyboardPopup | ( |  | ) | `[pure virtual]`

Disables the keyboard popup when double-clicked.

Implemented in WoopsiUI::MultiLineTextBox, WoopsiUI::ScrollingTextBox, and WoopsiUI::TextBox.

virtual void WoopsiUI::TextBoxBase::enableKeyboardPopup | ( |  | ) | `[pure virtual]`

Enables the keyboard popup when double-clicked.

Implemented in WoopsiUI::MultiLineTextBox, WoopsiUI::ScrollingTextBox, and WoopsiUI::TextBox.

virtual const s32 WoopsiUI::TextBoxBase::getCursorPosition | ( |  | ) | const`[pure virtual]`

Get the cursor position. This is the index within the string that the cursor is currently positioned over.

Returns:
  position The cursor position.

Implemented in WoopsiUI::MultiLineTextBox, WoopsiUI::ScrollingTextBox, and WoopsiUI::TextBox.

virtual void WoopsiUI::TextBoxBase::hideCursor | ( |  | ) | `[pure virtual]`

Hides the cursor.

Implemented in WoopsiUI::MultiLineTextBox, WoopsiUI::ScrollingTextBox, and WoopsiUI::TextBox.

virtual void WoopsiUI::TextBoxBase::insertText | ( | const WoopsiString & | text,
|  | const u32 | index |
| ) |  |  | `[pure virtual]`

Insert text at the specified index.

Parameters:

  | text | The text to insert.
  | index | Index at which to insert the text.

Implemented in WoopsiUI::MultiLineTextBox, WoopsiUI::ScrollingTextBox, and WoopsiUI::TextBox.

virtual void WoopsiUI::TextBoxBase::insertTextAtCursor | ( | const WoopsiString & | text | ) | `[pure virtual]`

Insert text at the current cursor position.

Parameters:

  | text | The text to insert.

Implemented in WoopsiUI::MultiLineTextBox, WoopsiUI::ScrollingTextBox, and WoopsiUI::TextBox.

virtual void WoopsiUI::TextBoxBase::moveCursorToPosition | ( | const s32 | position | ) | `[pure virtual]`

Move the cursor to the text position specified. 0 indicates the start of the string. If position is greater than the length of the string, the cursor is moved to the end of the string.

Parameters:

  | position | The new cursor position.

Implemented in WoopsiUI::MultiLineTextBox, WoopsiUI::ScrollingTextBox, and WoopsiUI::TextBox.

virtual bool WoopsiUI::TextBoxBase::opensKeyboard | ( |  | ) | const`[pure virtual]`

Check if the textbox opens the keyboard popup when double-clicked.

Returns:
  True if the keyboard pops up; false if not.

Implemented in WoopsiUI::MultiLineTextBox, WoopsiUI::ScrollingTextBox, and WoopsiUI::TextBox.

virtual void WoopsiUI::TextBoxBase::removeText | ( | const u32 | startIndex,
|  | const u32 | count |
| ) |  |  | `[pure virtual]`

Remove specified number of characters from the string from the start index onwards.

Parameters:

  | startIndex | Index to remove from.
  | count | Number of characters to remove.

Implemented in WoopsiUI::MultiLineTextBox, WoopsiUI::ScrollingTextBox, and WoopsiUI::TextBox.

virtual void WoopsiUI::TextBoxBase::removeText | ( | const u32 | startIndex | ) | `[pure virtual]`

Remove all characters from the string from the start index onwards.

Parameters:

  | startIndex | Index to remove from.

Implemented in WoopsiUI::MultiLineTextBox, WoopsiUI::ScrollingTextBox, and WoopsiUI::TextBox.

virtual void WoopsiUI::TextBoxBase::setText | ( | const WoopsiString & | text | ) | `[pure virtual]`

Set the text displayed in the label.

Parameters:

  | text | String to display.

Implemented in WoopsiUI::MultiLineTextBox, WoopsiUI::ScrollingTextBox, and WoopsiUI::TextBox.

virtual void WoopsiUI::TextBoxBase::showCursor | ( |  | ) | `[pure virtual]`

Shows the cursor.

Implemented in WoopsiUI::MultiLineTextBox, WoopsiUI::ScrollingTextBox, and WoopsiUI::TextBox.

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

- textboxbase.h