VCF::TextModel Class Reference
The TextModel is a model interface for working with text data. More...
#include <vcf/ApplicationKit/TextModel.h>
Inheritance diagram for VCF::TextModel:

Public Types | |
| enum | TextModelEvents { tmTextInserted = VCF::Model::MODEL_CHANGED + 3210, tmTextReplaced, tmTextSet, tmTextRemoved } |
Public Member Functions | |
| TextModel () | |
| virtual | ~TextModel () |
| virtual void | addTextModelChangedHandler (EventHandler *handler)=0 |
| adds a new TextModelEvent handler | |
| virtual void | removeTextModelChangedHandler (EventHandler *handler)=0 |
| removes a TextModelEvent handler | |
| virtual void | setText (const String &text)=0 |
| sets the contents of the text model, completely changes what was previously in the model | |
| virtual void | insertText (const uint32 &index, const String &text)=0 |
| inserts text into the model at the given index | |
| virtual void | replaceText (const uint32 &index, const uint32 &count, const String &text)=0 |
| replace text into the model in place of the selected text is any, or at the current position otherwise | |
| virtual void | deleteText (const uint32 &index, const uint32 &count)=0 |
| deletes text from the model, starting at index, and continuing for count characters, or until the text data is empty. | |
| virtual String | getText ()=0 |
| returns all of the TextModel's text in a string. | |
| virtual String | getText (const uint32 &index, const uint32 &count)=0 |
| returns a sub string of the TextModel's text in a string. | |
| virtual uint32 | getSize ()=0 |
| returns the size of the TextModel. | |
Detailed Description
The TextModel is a model interface for working with text data.It does not inherit from the Model class directly. This is to allow different implementations different base classes. For example, you might have a simple list model that inherits/implements the Model class, and the ListModel class. This would be suitable for most controls. However you might want a fancier implementation, perhaps that is based off of the Document and ListModel classes. This would still allow you to use the same control with either style.
- Version:
- 1.0
- Author:
- Jim Crafton
Member Enumeration Documentation
|
|
|
Constructor & Destructor Documentation
|
|
|
|
|
|
Member Function Documentation
|
|
adds a new TextModelEvent handler
Implemented in VCF::DefaultTextModel. |
|
||||||||||||
|
deletes text from the model, starting at index, and continuing for count characters, or until the text data is empty.
Implemented in VCF::DefaultTextModel. |
|
|
returns the size of the TextModel. That is the number of charecters in text string that this model represents. Implemented in VCF::DefaultTextModel. |
|
||||||||||||
|
returns a sub string of the TextModel's text in a string.
Implemented in VCF::DefaultTextModel. |
|
|
returns all of the TextModel's text in a string.
Implemented in VCF::DefaultTextModel. |
|
||||||||||||
|
inserts text into the model at the given index
Implemented in VCF::DefaultTextModel. |
|
|
removes a TextModelEvent handler
Implemented in VCF::DefaultTextModel. |
|
||||||||||||||||
|
replace text into the model in place of the selected text is any, or at the current position otherwise
Implemented in VCF::DefaultTextModel. |
|
|
sets the contents of the text model, completely changes what was previously in the model
Implemented in VCF::DefaultTextModel. |
The documentation for this class was generated from the following file:
- vcf/ApplicationKit/TextModel.h
