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

#include <ITableTextContainer.h>

Inheritance diagram for ITableTextContainer:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_ITABLETEXTCONTAINER }
 

Public Member Functions

virtual const UIDRefGetTextModelRef () const =0
 
virtual ITextModelQueryTextModel () const =0
 
virtual void AttachToTextModel (UID textModelUID)=0
 
virtual void DetachFromTextModel ()=0
 
virtual void SetTextModelUID (UID textModelUID)=0
 
virtual UID GetFirstTableFrameUID () const =0
 
virtual void SetFirstTableFrameUID (UID uid)=0
 
virtual TextIndex GetAnchorTextIndex () const =0
 
virtual int32 GetAnchorSpan () const =0
 
virtual Text::StoryRange GetThreadBlockTextRange () const =0
 
virtual ITextParcelListQueryTextParcelList () const =0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

Interface to query and manipulate the relation between the table model and text model. Provides means to get at the text model underlying a table model, and vary the association. Can also find out where in the text model the table is anchored, e.g. find the index of the first table frame character in the text model for the table.

The container in this case refers to the containing Text flow, or TextStoryThread, and the TextParcelList that it is flowing through.

The Table is anchored to the Text flow via the Text Model in two ways:

  1. A contiguous range of special "anchor" characters (one or more) are maintained in the Text Model. In general the number of characters used varies with the number of Rows in the Table Model but it will not necessarily be a one to one correspondence.
  1. Associated with the range of anchor characters are one or more TableFrames attached via the OwnedItem Strand. Again, the number, location, and state of the TableFrames will vary with the only constants being that the first anchor character will ALWAYS have a TableFrame associated with it (although not always the same) and it will ALWAYS manage Row 0.

Because the anchoring is done on a TextStoryThread basic, Tables can be inserted anywhere in the Text Model, even within other Table Text Cells.

Member Function Documentation

virtual void ITableTextContainer::AttachToTextModel (UID textModelUID)
pure virtual

Attaches the Table to the specified TextModel and related Text interfaces (such as ITableModelList).

Parameters
textModelUIDspecifies text model to associate with this table model
virtual void ITableTextContainer::DetachFromTextModel ()
pure virtual

Detaches the Table from the specified TextModel and related Text interfaces (such as ITableModelList).

virtual int32 ITableTextContainer::GetAnchorSpan () const
pure virtual

Information about how the Table is anchored.

Returns
the number of Table anchor characters used to anchor the Table.
virtual TextIndex ITableTextContainer::GetAnchorTextIndex () const
pure virtual

Information about where the Table is anchored in the TextModel Should return the TextIndex of the first TableFrame.

Returns
the index in the text model of first table frame
virtual UID ITableTextContainer::GetFirstTableFrameUID () const
pure virtual

Deprecated. Get the UID of the first TableFrame used by the TableModel.

Returns
UID of the first table frame used by the table model.
virtual const UIDRef& ITableTextContainer::GetTextModelRef () const
pure virtual

Acquire a persistent reference to the underlying text model. The UIDRef returned can be used to acquire an ITextModel interface.

Returns
reference to the underlying text model as UIDRef
virtual Text::StoryRange ITableTextContainer::GetThreadBlockTextRange () const
pure virtual

Returns the TextIndex of the ThreadBlock for this Table. The value returned will be valid even if the Table has not created any StoryThreads.

Note that the TextIndex values will change over time Text is inserted or deleted before them so you cannot cache them.

Returns
the range within the text model where the characters from this table are stored
virtual ITextModel* ITableTextContainer::QueryTextModel () const
pure virtual

Acquire a reference-incremented interface ptr to text model.

Returns
reference-incremented ptr to text model
virtual ITextParcelList* ITableTextContainer::QueryTextParcelList () const
pure virtual

Acquire a reference to the text parcel list associated with the table.

Returns
reference-incremented interface ptr to the text parcel list.
virtual void ITableTextContainer::SetFirstTableFrameUID (UID uid)
pure virtual

Deprecated. Set the UID of the first TableFrame used by the table model.

Parameters
uidspecifies UID of the table frame to use as first in table model
virtual void ITableTextContainer::SetTextModelUID (UID textModelUID)
pure virtual

Associates a particular text model by UID with the table model.

Parameters
textModelUIDgives text model to associate with the table model