struct CCL::IMutableTextModel
Overview
Mutable Text model interface for use in TextBox and EditBox. More…
#include <itextmodel.h> struct IMutableTextModel: public CCL::ITextModel { // enums enum EditOptions; // structs struct InteractionInfo; // methods 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 tbool CCL_API undo () = 0; virtual tbool CCL_API redo () = 0; virtual tbool CCL_API onTextInteraction ( const ITextLayout& layout, const InteractionInfo& info ) = 0; virtual void CCL_API fromParamString (StringRef string) = 0; };
Inherited Members
public: // 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 updateLayout (ITextLayout& layout) const = 0; virtual void CCL_API copyText (String& text, int textIndex = 0, int length = -1) const = 0; virtual void CCL_API toDisplayString (String& string) const = 0; virtual void CCL_API toParamString (String& string) const = 0; DECLARE_STRINGID_MEMBER (kRequestLayoutUpdate);
Detailed Documentation
Mutable Text model interface for use in TextBox and EditBox.
Methods
virtual int CCL_API insertText ( int textIndex, StringRef text, EditOptions options ) = 0
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, EditOptions options) = 0
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 tbool CCL_API undo () = 0
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 () = 0
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 onTextInteraction ( const ITextLayout& layout, const InteractionInfo& info ) = 0
Text interaction notification.
virtual void CCL_API fromParamString (StringRef string) = 0
Restore text from string representation of parameter.
Signals kChanged if successful.