|
Public Member Functions |
virtual void | OnDraw () |
| Draw backplane.
|
virtual void | OnReshape () |
| Resize m_Strings.
|
virtual void | OnUpdatePos () |
| Update text position.
|
void | ShowBackPlane (bool b=true) |
| Show/Hide back plane.
|
void | SetColor (GLfloat *Color) |
| Set color of the text.
|
void | SetColor (GLfloat R, GLfloat G, GLfloat B, GLfloat A=1.0f) |
| Set color of the text.
|
float * | GetColor () |
| Get color of the text.
|
void | SetTopLine (int iLine=0) |
| Set index of the top shown line.
|
int | GetTopLine () |
| Index of the top shown line.
|
int | GetCharOnDisp () |
| Number of maximum visible characters in one line.
|
void | SetSelectLines (bool b=true) |
| Enables/Disables selection.
|
bool | IsSelectLines () |
| Selection flag state.
|
int | GetNumLinesOnScreen () |
| Number of displayed lines.
|
bool | NeedWrap () |
| True if text needs wrapping.
|
void | LoadTextFromFile (char *pName) |
| Loads text from a file.
|
void | SetShift (int i=0) |
| Set shift of text.
|
int | GetShift () |
| Get shift.
|
int | GetSelectedLine () |
| Index of the selected line.
|
void | SetSelectedLine (int iL) |
| Set selected line index.
|
CTextStrs & | GetStrings () |
| m_Strings member reference.
|
|
These functions correspond to the editing of the text.
- See also:
- CTextStrs
- Note:
- Editing only of the first line is allowed.
|
void | SetCursorPos (unsigned int i) |
| Set cursor position.
|
void | MoveCursorToEnd () |
| Moves cursor to the end of the text.
|
void | MoveCursorToBeginning () |
| Moves cursor to the beginning of the text.
|
void | InsertAtCursor (unsigned char ch) |
| Insert a character at cursor position.
|
void | RemoveBeforeCursor () |
| Removes character before cursor position.
|
void | RemoveAfterCursor () |
| Removes character after cursor position.
|
void | MoveCursorLeft () |
| Moves cursor to the left.
|
void | MoveCursorRight () |
| Moves cursor to the right.
|
void | ShowCursor (bool y=true) |
| Show cursor.
|
void | HideCursor () |
| Hide cursor.
|
bool | IsCursorShown () |
| Cursor visibility.
|
|
These functions correspond to the CTextStrs functions, with range checking added.
- See also:
- CTextStrs
|
void | SetIdent (bool b=true) |
| Set ident for wrapping.
|
void | SetWrap (bool b=true) |
| Set wrap flag.
|
bool | IsWrap () |
| Wrapping flag state.
|
int | GetNumOfLines () |
| Total number of lines.
|
int | GetMaxLength () |
| The length of the longest line in the text.
|
void | AddLine (const char *cp) |
| Add a new line (push_back wrapper).
|
void | AddLine (std::string &str) |
| Add a new line (push_back wrapper).
|
const char * | GetLine (unsigned int i=0) |
| Returns string with index i.
|
const char * | operator[] (unsigned int i) |
void | ClearText () |
| Erases all text.
|
Protected Attributes |
CTextStrs | m_Strings |
| Lines are stored here.
|
float | m_Color [4] |
| Color of the text.
|
unsigned int | m_uiCursorPos |
| Cursor position.
|
bool | m_yShowCursor |
| Cursor visibility flag.
|
bool | m_ySelectLines |
| Enables selection.
|
int | m_iSelectedLine |
| Selected line index.
|