class CCL::AbstractTextModel
Overview
#include <itextmodel.h> class AbstractTextModel: public CCL::ITextModel { public: // methods virtual void CCL_API updateLayout (ITextLayout& layout); virtual int CCL_API insertText ( int textIndex, StringRef text, ITextModel::EditOptions options ); virtual int CCL_API removeText ( int textIndex, int length, ITextModel::EditOptions options ); virtual void CCL_API copyText (String& text, int textIndex = 0, int length = -1) const; virtual tbool CCL_API undo (); virtual tbool CCL_API redo (); virtual tbool CCL_API drawBackground ( const ITextLayout& layout, const DrawInfo& info ); virtual tbool CCL_API onTextInteraction ( const ITextLayout& layout, const InteractionInfo& info ); virtual void CCL_API toParamString (String& string) const; virtual void CCL_API fromParamString (StringRef string); };
Inherited Members
public: // enums enum EditOptions; // structs struct DrawInfo; struct InteractionInfo; // methods virtual tresult CCL_API queryInterface (UIDRef iid, void** ptr) = 0; virtual unsigned int CCL_API retain () = 0; virtual unsigned int CCL_API release () = 0; virtual void CCL_API toDisplayString (String& string) const = 0; virtual void CCL_API updateLayout (ITextLayout& layout) = 0; virtual int CCL_API insertText ( int textIndex, StringRef text, EditOptions options ) = 0; virtual int CCL_API removeText (int textIndex, int length, EditOptions options) = 0; virtual void CCL_API copyText (String& text, int textIndex = 0, int length = -1) const = 0; virtual tbool CCL_API undo () = 0; virtual tbool CCL_API redo () = 0; virtual tbool CCL_API drawBackground ( const ITextLayout& layout, const DrawInfo& info ) = 0; virtual tbool CCL_API onTextInteraction ( const ITextLayout& layout, const InteractionInfo& info ) = 0; virtual void CCL_API toParamString (String& string) const = 0; virtual void CCL_API fromParamString (StringRef string) = 0; DECLARE_STRINGID_MEMBER (kRequestLayoutUpdate);
Detailed Documentation
Methods
virtual void CCL_API updateLayout (ITextLayout& layout)
Update text layout with formatting.
virtual int CCL_API insertText ( int textIndex, StringRef text, ITextModel::EditOptions options )
Insert text into data model at given display text index.
Returns the number of inserted characters and signals kChanged if successful.
virtual int CCL_API removeText ( int textIndex, int length, ITextModel::EditOptions options )
Remove text from data model at given display text index.
Returns the number of removed characters and signals kChanged if successful. The length argument may be negative if the text should be removed backwards from the given index.
virtual void CCL_API copyText (String& text, int textIndex = 0, int length = -1) const
Copy a range of text in a representation that is accepted as input for insertText.
virtual tbool CCL_API undo ()
Undo the last change.
Returns true if the last change was caused by the text model and signals kChanged if successful.
virtual tbool CCL_API redo ()
Redo the next change.
Returns true if the next change was caused by the text model and signals kChanged if successful.
virtual tbool CCL_API drawBackground ( const ITextLayout& layout, const DrawInfo& info )
Draw additional background.
virtual tbool CCL_API onTextInteraction ( const ITextLayout& layout, const InteractionInfo& info )
Text interaction notification.
virtual void CCL_API toParamString (String& string) const
Get string representation for use in a parameter.
virtual void CCL_API fromParamString (StringRef string)
Restore text from string representation of parameter.
Signals kChanged if successful.