- Your Widget Set For OpenGL
Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | Related Pages

ufo::UTextEdit Class Reference

An editable multi-line text. More...

#include <utextedit.hpp>

Inheritance diagram for ufo::UTextEdit:

ufo::UTextWidget ufo::UScrollableWidget ufo::UWidget ufo::UObject ufo::UCollectable ufo::ULineEdit List of all members.

Public Member Functions

 UTextEdit ()
 UTextEdit (const std::string &text)
void setEditable (bool b)
bool isEditable () const
virtual std::string getSelectedText () const
void setSelection (unsigned int indexFrom, unsigned int indexTo)
void getSelection (unsigned int *indexFrom, unsigned int *indexTo) const
bool hasSelection () const
void setCaretPosition (unsigned int positionA)
void moveCaretPosition (unsigned int positionA)
void setMaxLength (int maxLength)
int getMaxLength () const
virtual void processKeyEvent (UKeyEvent *e)
virtual void processMouseEvent (UMouseEvent *e)

Detailed Description

An editable multi-line text.

Author:
Johannes Schmidt


Constructor & Destructor Documentation

ufo::UTextEdit::UTextEdit  ) 
 

Creates a new multi line text widget

ufo::UTextEdit::UTextEdit const std::string &  text  ) 
 

Creates a text widget with initial text

Parameters:
text The initial text


Member Function Documentation

int ufo::UTextEdit::getMaxLength  )  const
 

Returns the maximum length of the document.

virtual std::string ufo::UTextEdit::getSelectedText  )  const [virtual]
 

Returns only the currently selected text.

void ufo::UTextEdit::moveCaretPosition unsigned int  positionA  ) 
 

moves the caret to the new position leaving a mark at the old position

Reimplemented from ufo::UTextWidget.

virtual void ufo::UTextEdit::processKeyEvent UKeyEvent e  )  [virtual]
 

Processes key events. Primarily, it is used to notify listeners.

Reimplemented from ufo::UWidget.

Reimplemented in ufo::ULineEdit.

virtual void ufo::UTextEdit::processMouseEvent UMouseEvent e  )  [virtual]
 

Processes focus events. Primarily, it is used to notify listeners.

Reimplemented from ufo::UTextWidget.

void ufo::UTextEdit::setCaretPosition unsigned int  positionA  ) 
 

Reimplemented from ufo::UTextWidget.

void ufo::UTextEdit::setEditable bool  b  ) 
 

Sets whether the text is editable by the user. This does not affect the use of operators or direct document use.

void ufo::UTextEdit::setMaxLength int  maxLength  ) 
 

Sets the maximum length of the document. A value of 0 indicates no limit.


The documentation for this class was generated from the following file:
The libUFO Project - written by Johannes Schmidt