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

ufo::UBasicDocument Class Reference

A plain text document. More...

#include <ubasicdocument.hpp>

Inheritance diagram for ufo::UBasicDocument:

ufo::UDocument ufo::UObject ufo::UCollectable List of all members.

Public Member Functions

virtual UCaretcreateCaret ()
virtual const char * getText () const
virtual unsigned int getLength () const
virtual void clear ()
virtual void append (const char *chars, unsigned int nChars)
virtual void replaceSelection (const char *chars, unsigned int nChars)
virtual void insertString (unsigned int offset, const char *chars, unsigned int nChars)
virtual void remove (unsigned int offset, unsigned int length)
virtual void replace (unsigned int offset, unsigned int length, const char *chars, unsigned int nChars)
virtual UCaretgetCaret () const

Protected Member Functions

virtual void updateCaret (unsigned int offset, unsigned int rmLength, unsigned int insLength)

Detailed Description

A plain text document.

See also:
UDocumentFactory
Author:
Johannes Schmidt


Member Function Documentation

virtual void ufo::UBasicDocument::append const char *  chars,
unsigned int  nChars
[virtual]
 

Appends the given character array at the end.

Implements ufo::UDocument.

virtual void ufo::UBasicDocument::clear  )  [virtual]
 

Clears the entire content of the document.

Implements ufo::UDocument.

virtual UCaret* ufo::UBasicDocument::getCaret  )  const [virtual]
 

A caret is a text position within a document. It can also be used for text highlighting.

See also:
UCaret

Implements ufo::UDocument.

virtual unsigned int ufo::UBasicDocument::getLength  )  const [virtual]
 

Returns the total length of the text.

Implements ufo::UDocument.

virtual const char* ufo::UBasicDocument::getText  )  const [virtual]
 

Returns a const char pointer to the character array. Please note that this character array does not have to be NULL-terminated.

Implements ufo::UDocument.

virtual void ufo::UBasicDocument::insertString unsigned int  offset,
const char *  chars,
unsigned int  nChars
[virtual]
 

A low level insert of the character at the given position without manipulating the caret.

Implements ufo::UDocument.

virtual void ufo::UBasicDocument::remove unsigned int  offset,
unsigned int  length
[virtual]
 

Removes all characters from startA to (exclusively) endA.

Implements ufo::UDocument.

virtual void ufo::UBasicDocument::replace unsigned int  offset,
unsigned int  length,
const char *  chars,
unsigned int  nChars
[virtual]
 

Replaces the given text portion with the given new text without modifying the caret position.

Implements ufo::UDocument.

virtual void ufo::UBasicDocument::replaceSelection const char *  chars,
unsigned int  nChars
[virtual]
 

Inserts the given character array at the current caret position replacing any currently active selection. This moves the caret to the new position behind the inserted text.

Implements ufo::UDocument.


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