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

ufo::UTextWidget Class Reference

A static multi-line text widget. More...

#include <utextwidget.hpp>

Inheritance diagram for ufo::UTextWidget:

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

Public Member Functions

 UTextWidget ()
 UTextWidget (const std::string &text)
void setContentType (const std::string &type)
std::string getContentType () const
void setDocument (UDocument *documentA)
UDocumentgetDocument () const
UTextLayoutgetTextLayout () const
virtual void cut ()
virtual void copy ()
virtual void paste ()
virtual void setText (const std::string &textA)
virtual std::string getText () const
void setCaretPosition (unsigned int positionA)
void moveCaretPosition (unsigned int positionA)
UCaretgetCaret () const
void setColumns (unsigned int columnsA)
unsigned int getColumns () const
void setRows (unsigned int rowsA)
unsigned int getRows () const
virtual void validateSelf ()
virtual void processMouseEvent (UMouseEvent *e)
virtual UDimension getContentsSize (const UDimension &maxSize) const
virtual std::streambuf * rdbuf ()
int overflow (int c)
UTextWidgetoperator<< (const std::string &str)
UTextWidgetoperator<< (int i)
UTextWidgetoperator<< (long i)
UTextWidgetoperator<< (float f)
UTextWidgetoperator<< (double d)
UTextWidgetoperator<< (const char *cstr)

Protected Member Functions

UTextModelgetTextModel () const
void docChanged (UDocument *, unsigned int, unsigned int, unsigned int)

Static Protected Attributes

std::string m_textBuffer

Detailed Description

A static multi-line text widget.

Author:
Johannes Schmidt


Constructor & Destructor Documentation

ufo::UTextWidget::UTextWidget  ) 
 

Creates a new multi line text widget

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

Creates a text widget with initial text

Parameters:
text The initial text


Member Function Documentation

virtual void ufo::UTextWidget::copy  )  [virtual]
 

copies the selected text to the internal text clipboard

virtual void ufo::UTextWidget::cut  )  [virtual]
 

cuts the selected text to the internal text clipboard

virtual std::string ufo::UTextWidget::getText  )  const [virtual]
 

Returns the entire plain text of the document.

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

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

Reimplemented in ufo::UTextEdit.

virtual void ufo::UTextWidget::paste  )  [virtual]
 

pastes from the internal clipboard to selection

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

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

Reimplemented from ufo::UWidget.

Reimplemented in ufo::UTextEdit.

virtual std::streambuf* ufo::UTextWidget::rdbuf  )  [virtual]
 

Returns a std stream buffer wich can be used to redirect std::cout

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

Reimplemented in ufo::UTextEdit.

void ufo::UTextWidget::setColumns unsigned int  columnsA  ) 
 

Sets the preferred numer of columns. If set to 0, a variable size depending on the current text is used.

void ufo::UTextWidget::setContentType const std::string &  type  ) 
 

Sets the content type. This may change the document class. So far, only plain text documents are supported.

void ufo::UTextWidget::setDocument UDocument documentA  ) 
 

Sets the document object for this text widget. If you want to manipulate the text content directly, you must get an instance of UDocument with getDocument()

See also:
getDocument

UDocument

void ufo::UTextWidget::setRows unsigned int  rowsA  ) 
 

Sets the preferred numer of rows. If set to 0, a variable size depending on the current text is used.

virtual void ufo::UTextWidget::setText const std::string &  textA  )  [virtual]
 

Sets the text of this text widget.


Member Data Documentation

std::string ufo::UTextWidget::m_textBuffer [static, protected]
 

an internal text clipboard


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