![]() | InDesign SDK 20.5 |
#include <IStrand.h>

Public Types | |
| enum | { kDefaultIID = IID_ISTRAND } |
| typedef K2Vector< InterfacePtr < ITextModelMemento > > | MementoList |
Public Member Functions | |
| virtual void | Insert (const WideString *data, TextIndex pos)=0 |
| virtual void | Delete (TextIndex startpos, int32 numchars)=0 |
| virtual IStrandPastePiece * | Cut (TextIndex startpos, int32 numchars)=0 |
| virtual void | Replace (const boost::shared_ptr< ITextModel::ReplacementList > &replList, bool16 clearNonContinuingAttrs)=0 |
| virtual void | ForceCompositionDamage (TextIndex position, int32 numChars)=0 |
| virtual void | ForceContentDamage (TextIndex position, int32 numChars)=0 |
| virtual int32 | GetRunLength (TextIndex position, TextIndex *runBegin=nil)=0 |
| virtual IStrandPastePiece * | CopyRange (TextIndex startpos, int32 numchars)=0 |
| virtual int32 | Paste (TextIndex startpos, IStrandPastePiece *str)=0 |
| virtual void | IncreaseSpan (TextIndex at, int32 len)=0 |
| virtual void | CollectMementosForDelete (TextIndex at, int32 len, MementoList &list)=0 |
| virtual void | CollectMementosForCut (TextIndex at, int32 len, MementoList &list)=0 |
| virtual void | CollectMementosForCopyRange (TextIndex at, int32 len, MementoList &list) const =0 |
| virtual void | CollectMementosForReplace (TextIndex at, int32 len, MementoList &list)=0 |
| virtual UID | GetFirstPage ()=0 |
| virtual UID | SetFirstPage (UID firstPage)=0 |
| virtual UID | CreatePage ()=0 |
| virtual ClassID | GetObjectClass () const =0 |
| virtual ICommand * | QueryRemoveFromDocumentCmd (UID textModelUID)=0 |
| virtual UID | GetOwningStoryUID () const =0 |
| virtual void | StrandAttachedToStory (UID textModelUID, int32 length)=0 |
| virtual void | StrandDetachedFromStory (UID textModelUID)=0 |
| virtual void | InsertStoryThread (UID dictUID, uint32 dictKey, const WideString *data, TextIndex pos)=0 |
| virtual bool16 | CreateStoryThreads (UID dictUID, const K2Vector< uint32 > &dictKeyList, const K2Vector< int32 > &lenList, TextIndex pos)=0 |
| virtual bool16 | JoinStoryThreads (TextIndex start, int32 len)=0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
Abstract interface that all strands must support. Some of the common methods that a strand of the text model must support.
| pure virtual |
Divide existing story thread into one or more new story threads. We always divide off the bottom of an existing story thread. Stands without special StoryThread responsibilities are not required to do anything with this call.
Valid 'pos' values for CreateStoryThread() is the next character after what will become the new final CR of the dividing story thread.
An K2Vector is allowed in order to speed creation of many StoryThreads at one time. A typical creation sequence might be to create an initial story thread with InsertStoryThread(), insert one more sequences of initial text, each terminated by a CR, in the new story thread and then call CreateStoryThread() with the appropriate list of keys and lengths.
Implemented in Strand.
| pure virtual |
hardly any strands will care about damage.
Implemented in Strand.
| pure virtual |
hardly any strands will care about damage.
Implemented in Strand.
| pure virtual |
Return the first disk page in the strand. Creates the first page if there wasn't one already.
Implemented in Strand.
| pure virtual |
Return the classID of the VOS objects on the pages.
Implemented in Strand.
| pure virtual |
frequently returns kInvalidUID, each strand is NOT required to remember this
Implemented in Strand.
| pure virtual |
returns the REMAINING length only – length of what's left AFTER position
| pure virtual |
Called by the text model during Paste for all strands that did generate VOSSavedData to be pasted.
Implemented in Strand.
| pure virtual |
Insert a new story thread. Strands that do not need to do special handling for StoryThread creation can simply implement this method by calling DoInsert() on themselves. Valid 'pos' values for InsertStoryThread() are the first index after an existing StoryThread. This means you can't insert a StoryThread at TextIndex zero (0) but you CAN insert after the final CR (and story thread) of the TextModel. 'data' must be terminated by a CR.
Implemented in Strand.
| pure virtual |
The inverse of CreateStoryThread. The span of the joined StoryThread(s) are given back to the preceding StoryThread. This method does not change the length of the TextModel.
Implemented in Strand.
Called to obtain a command when the strand is about to be removed from the document. The returned command should remove any owned UIDs make sure to also remove all disk pages! It should be undoable.
Implemented in Strand.