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

ufo::UDocument Class Reference

A low level interface for text documents. More...

#include <udocument.hpp>

Inheritance diagram for ufo::UDocument:

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

Public Types

typedef USignal4< UDocument *,
unsigned int, unsigned int,
unsigned int > 
DocumentSignal

Public Member Functions

virtual const char * getText () const =0
virtual unsigned int getLength () const =0
virtual void clear ()=0
virtual void append (const char *chars, unsigned int nChars)=0
virtual void replaceSelection (const char *chars, unsigned int nChars)=0
virtual void insertString (unsigned int offset, const char *chars, unsigned int nChars)=0
virtual void remove (unsigned int offset, unsigned int length)=0
virtual void replace (unsigned int offset, unsigned int length, const char *chars, unsigned int nChars)=0
virtual UCaretgetCaret () const =0
DocumentSignal & sigTextReplaced ()

Detailed Description

A low level interface for text documents.

It is an abstract character buffer for text widgets. Usually this class is not used directly but via text widgets.

See also:
UTextWidget
Author:
Johannes Schmidt


Member Function Documentation

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

Appends the given character array at the end.

Implemented in ufo::UBasicDocument.

virtual void ufo::UDocument::clear  )  [pure virtual]
 

Clears the entire content of the document.

Implemented in ufo::UBasicDocument.

virtual UCaret* ufo::UDocument::getCaret  )  const [pure virtual]
 

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

See also:
UCaret

Implemented in ufo::UBasicDocument.

virtual unsigned int ufo::UDocument::getLength  )  const [pure virtual]
 

Returns the total length of the text.

Implemented in ufo::UBasicDocument.

virtual const char* ufo::UDocument::getText  )  const [pure virtual]
 

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

Implemented in ufo::UBasicDocument.

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

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

Implemented in ufo::UBasicDocument.

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

Removes all characters from startA to (exclusively) endA.

Implemented in ufo::UBasicDocument.

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

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

Implemented in ufo::UBasicDocument.

virtual void ufo::UDocument::replaceSelection const char *  chars,
unsigned int  nChars
[pure 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.

Implemented in ufo::UBasicDocument.

UDocument::DocumentSignal & ufo::UDocument::sigTextReplaced  )  [inline]
 

document is this document, first int is text removal start, 2nd is length of the removed text, 3rd the length of the inserted text.


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