InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ITableModelList Class Referenceabstract

#include <ITableModelList.h>

Inheritance diagram for ITableModelList:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_ITABLEMODELLIST }
 

Public Member Functions

virtual int32 GetModelCount () const =0
 
virtual ITableModelQueryNthModel (int32 index) const =0
 
virtual UID GetNthModelUID (int32 index) const =0
 
virtual void CollectAnchorSpansInThread (TextIndex indexWithinThread, Text::StoryRangeList *resultList) const =0
 
virtual int32 GetAnchorDeltaInThread (TextIndex at) const =0
 
virtual void AddModel (UID modelUID, UID insertionThreadDictUID, uint32 insertionThreadDictKey)=0
 
virtual void RemoveModel (UID modelUID)=0
 
virtual void StoryThreadChanged (UID tableModelUID, UID dictUID, uint32 dictKey)=0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Protected Member Functions

virtual void Invariant () const =0
 

Detailed Description

A class that maintains references to the ITableModel's present in a story. Currently tables are connected to the Story through two ways - the TableModelList and the TextStoryThreadDictHier. The latter represents the new scheme. This interface may therefore become reduced in significance as time wears on.

Member Function Documentation

virtual void ITableModelList::AddModel (UID modelUID,
UID insertionThreadDictUID,
uint32 insertionThreadDictKey 
)
pure virtual

Method to add a table model into the list.

Parameters
modelUIDspecifies the new table model to add to the list
insertionThreadDictUID
insertionThreadDictKey
Precondition
modelUID <> kInvalidUID
not models->select(model | model = modelUID)
Postcondition
models->select(model | model = modelUID)
virtual void ITableModelList::CollectAnchorSpansInThread (TextIndex indexWithinThread,
Text::StoryRangeListresultList 
) const
pure virtual

Returns a sorted list of story ranges for the anchor characters of Tables in the specified thread. Only ranges that are longer than 1 are returned.

Parameters
indexWithinThreadlocation in the text model for the story-thread of interest
resultListOUT parameter, where the sorted story ranges will be returned
virtual int32 ITableModelList::GetAnchorDeltaInThread (TextIndex at) const
pure virtual

Returns the offset (negative or positive) to adjust the specified text index so it covers an intersecting table. If the text index is at the beginning of the table a positive value corresponding to the number of additional anchor characters (a table with two anchor characters would return '1'). If the text index is at the end of the table a negative value will be returned.

Parameters
atspecifies the text index of interest
Returns
offset to adjust the specified text index so it covers an intersecting table
virtual int32 ITableModelList::GetModelCount () const
pure virtual

Determine the number of table models in the list.

Returns
count of the table models in the list
Postcondition
result >= 0
virtual UID ITableModelList::GetNthModelUID (int32 index) const
pure virtual

Acquire the UID of a table model in the list by index position.

Parameters
indexspecifies position in table model list to select
Precondition
index >= 0 and index < GetModelCount()
Postcondition
result <> kInvalidUID
virtual void ITableModelList::Invariant () const
protectedpure virtual
Invariant
models->size == GetModelCount()
models->forall(model | models->count(model) = 1), i.e. no duplicate models
virtual ITableModel* ITableModelList::QueryNthModel (int32 index) const
pure virtual

Query for a table model by position in the list, acquiring a reference-increment ptr.

Parameters
indexspecifies position in table model list to select
Returns
reference-incremented ptr to the table model at list position specified by index, or nil if the index given was invalid
Precondition
index >= 0 and index < GetModelCount()
Postcondition
result <> nil
result.GetRefCount() = resul.nosp@m.t@pr.nosp@m.e.Get.nosp@m.RefC.nosp@m.ount() + 1
virtual void ITableModelList::RemoveModel (UID modelUID)
pure virtual

Remove a table model from the list by UID.

Parameters
UIDspecifies the model to remove
Precondition
modelUID <> kInvalidUID
models->select(model | model = modelUID)
virtual void ITableModelList::StoryThreadChanged (UID tableModelUID,
UID dictUID,
uint32 dictKey 
)
pure virtual

We are notified when any story threads are joined or created. This gives us the opportunity to patch up the parents for any tables in the affected range

Precondition
dictUID <> kInvalidUID