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

Public Types | |
| enum | { kDefaultIID = IID_ITEXTSTORYTHREADDICT } |
Public Member Functions | |
| virtual ITextStoryThread * | QueryThread (uint32 key) const =0 |
| virtual Text::StoryRange | GetAnchorTextRange (bool16 *wasAnchored=nil) const =0 |
| virtual Text::StoryRange | GetThreadBlockTextRange () const =0 |
| virtual uint32 | GetFirstKey ()=0 |
| virtual uint32 | GetNextKey ()=0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
The ITextStoryThreadDict is responsible for managing one or more ITextStoryThreads within a given ITextModel. All the ITextStoryThreads managed by a single dictionary are stored contiguously within the ITextModel.
All ITextStoryThreads managed in this way share the same dictionar (see ITextStoryThread::GetDictUID()) but are uniquely identified within the managing dictionary by a uint32 whose mapping is defined only the dictionary.
The key value is expected to be the same throughout the life of the ITextStoryThread. The addition or removal of other ITextStoryThreads in the same dictionary must change the keys of the remaining ITextStoryThreads.
A ITextStoryThreadDict can be anchored or not. Examples of dictionaries which are anchored are Notes, Tables and Footnotes. Examples of unanchored dictionaries are Text Macros. All unanchored dictionaries should return an anchor position of the last carriage return of the primary story thread.
Every ITextModel boss implements an ITextStoryThreadDict which is responsible for managing the primary story thread. This dictionary is not anchored with its thread block text range starting at zero and ending at the end of the primary story thread. Unlike all other unanchored dictionaries, this dictionary returns an anchor position of zero.
The location of the dictionary's thread block is determined by the location of the dictionary's anchor relative to other dictionaries in the same and other thread blocks. Determining this relative location is the job of the ITextStoryThreadDictHier.
| pure virtual |
Returns the current StoryRange where the dictionary is anchored into the ITextModel. Implementations that are not anchored should return the TextIndex of the last carriage return in the primary story thread. The ITextModel, which implements the primary story thread, will return an anchor position of zero.
| wasAnchored | Optional parameter which will be set to kTrue if the dictionary is anchored, kFalse otherwise. |
Implemented in HidTxtStoryThreadDict.
| pure virtual |
When whole ITextStoryThreads are pasted into the ITextModel the StoryThread Strand provides a hook to allow these ITextStoryThreads to switch owners. This occurs, for example, if the ITextStoryThreads from one table were deleted and pasted into a different table. The assumption is that the manager of this operation will ensure that reference conversion occurs on the UIDs in the ITextStoryThreads but there is no way to fix up the Keys. The iteration that is implied by this operation is setup by the code managing the copy and the StoryThread Strand will call GetFirstKey() on the first ITextStoryThread pasted and then will call GetNextKey() repeatedly for each remaining ITextStoryThread copied.
Implemented in HidTxtStoryThreadDict.
| pure virtual |
Returns the next key during the paste operation.
Implemented in HidTxtStoryThreadDict.
| pure virtual |
Returns the current StoryRange where the dictionary maintains its block of ITextStoryThreads. Although unusual, a dictionary which does not currently have any ITextStoryThreads in the ITextmodel must return StoryRange(kInvalidTextIndex, kInvalidTextIndex).
Implemented in HidTxtStoryThreadDict.
| pure virtual |
Instantiate the ITextStoryThread with the given key.
| key | Private unique key that identifies which ITextStoryThread to instantiate |
Implemented in HidTxtStoryThreadDict.