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

#include <ITableTextContent.h>

Inheritance diagram for ITableTextContent:
IPMUnknown

Classes

class  Memento
 

Public Types

enum  { kDefaultIID = IID_ITABLETEXTCONTENT }
 

Public Member Functions

virtual UIDRef GetTextModelRef () const =0
 
virtual ITextModelQueryTextModel () const =0
 
virtual void GetTextRange (TextIndex &tableStartIndex, int32 &tableTextSpan) const =0
 
virtual int32 GetTextChunk (GridArea &inOutArea, TextIndex &outStart) const =0
 
virtual bool16 GetConnectedToTextContent () const =0
 
virtual void SetConnectedToTextContent (bool16 connected)=0
 
virtual void ProcessDeleteTextContent ()=0
 
virtual MementoProcessCutTextContent ()=0
 
virtual void RestoreTextContent ()=0
 
virtual MementoCopyTextContent ()=0
 
virtual void ProcessPasteTextContent (Memento *)=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

Abstract interface for manipulating text content within a table, allows access to information about Text content within the Table.

The Text content of the Table is always within the same Text Model that the Table Model is anchored in and it consists of zero or more contigous TextStoryThreads that are ALWAYS at greater TextIndex than the Text Story Thread that the Table Model is anchored in.

Note that the returned ranges from some methods MAY cross one or more TextStoryThread boundaries and it is up to the caller to take proper steps to avoid mis-handling the final carriage returns in each TextStoryThread.

Member Function Documentation

virtual Memento* ITableTextContent::CopyTextContent ()
pure virtual

Copy text within the table and return a memento ptr. It is up to the client code to release the storage.

Returns
memento ptr which can be used in subsequent paste operations
virtual bool16 ITableTextContent::GetConnectedToTextContent () const
pure virtual

Determine if there is a text model currently associated with the table.

At various times the Table needs to be disconnected from the responsibility of managing the Text Range of the TextStoryThreads.

If the Table is connected then the deletion of the Table requires the deletion of the Text content. If the Table is NOT connected that it simply does everything it would normally EXCEPT touch the StoryThreads.

Returns
kTrue if there is an underlying text model, kFalse otherwise
virtual int32 ITableTextContent::GetTextChunk (GridAreainOutArea,
TextIndex & outStart 
) const
pure virtual

Returns Text Range(s) for an arbitrary GridArea of the TableModel.

Because the GridArea may not allow the return of a single contiguous Text Range the specified GridArea is used as a iterator cookie and the largest contigous range is returned on each invocation and the cookie modified. Returns zero when no more Ranges exist.

Parameters
inOutAreaIN/OUT parameter, specifies dimension of area of interest
outStartOUT parameter, index within the text model where the area's text starts
Returns
characters within text model for specified area, or 0 if no text range left
virtual UIDRef ITableTextContent::GetTextModelRef () const
pure virtual

Acquire a persistent reference (UIDRef) to text model associated with a table. The UIDRef returned can be used to acquire an ITextModel interface.

Returns
persistent reference to the underlying text model.
virtual void ITableTextContent::GetTextRange (TextIndex & tableStartIndex,
int32 & tableTextSpan 
) const
pure virtual

Returns the entire contiguous Text Range used by the Table Model to store its Text content.

Note that the returned ranges MAY cross one or more TextStoryThread boundaries and it is up to the caller to take proper steps to avoid mis-handling the final carriage returns in each TextStoryThread.

virtual Memento* ITableTextContent::ProcessCutTextContent ()
pure virtual

Take (delete) the text content associated with the Table and hold it in the Memento. Client code owns the storage allocated.

Returns
memento ptr which can be used in subsequent paste operations
virtual void ITableTextContent::ProcessDeleteTextContent ()
pure virtual

Delete the text content associated with the Table.

virtual void ITableTextContent::ProcessPasteTextContent (Memento)
pure virtual

Paste content into the table.

virtual ITextModel* ITableTextContent::QueryTextModel () const
pure virtual

Acquire a reference-incremented interface ptr to the underlying text model associated with the table.

Returns
reference-incremented interface ptr to text model
virtual void ITableTextContent::RestoreTextContent ()
pure virtual

Undelete text from text model underlying the table.

Parameters
mmemento from previous delete operation