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

#include <IPreflightArtworkTableContext.h>

Inheritance diagram for IPreflightArtworkTableContext:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IPREFLIGHTARTWORKTABLECONTEXT }
 

Public Member Functions

virtual bool IsTableNode () const =0
 
virtual int32 GetDepth (bool stopAtOne=kFalse) const =0
 
virtual
IPreflightArtworkTableContext
QueryParent () const =0
 
virtual UIDRef GetTableModelRef () const =0
 
virtual UIDRef GetTableFrameRef () const =0
 
virtual GridArea GetGridArea () 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

This interface provides context for a marking operation, group, or context. That is, 

IPreflightArtworkMarkInfo and IPreflightArtworkGroupInfo can tell you all about the specifics 

of the marking operation but this interface tells you what "high level" (ie table

or table cell) drawing operation it's associated with.



Typical use is something like this:



    MyRule::Visit(IPreflightVisitInfo* iVisit)

    {

        if (iVisit->GetObjectID().GetClass() == kPrefligthOM_ArtworkMark)

        {

            InterfacePtr<IPreflightObject> iObj(iVisit->QueryObject());

Is this drawn as part of a table? InterfacePtr<IPreflightArtworkContext> iContext(iObj, UseDefaultIID()); InterfacePtr<IPreflightArtworkTableContext> iTableContext(iContext->QueryParentTableContext());

if (iTableContext) { Yes, part of a table.. InterfacePtr<ITableModel> iModel(iTableContext->GetTableModelRef(), UseDefaultIID()); ... } } }

Member Function Documentation

virtual int32 IPreflightArtworkTableContext::GetDepth (bool stopAtOne = kFalse) const
pure virtual

Get the text and text-subpart depth. Since text and subparts can be nested the artwork node may be "under" more than one context. This method returns the number of text parent nodes in the tree walking up to the root.

virtual GridArea IPreflightArtworkTableContext::GetGridArea () const
pure virtual
Returns
the specified grid area (typically a cell). Will be empty if it's the entire table.
virtual UIDRef IPreflightArtworkTableContext::GetTableFrameRef () const
pure virtual
Returns
the table frame's UIDRef.
virtual UIDRef IPreflightArtworkTableContext::GetTableModelRef () const
pure virtual
Returns
the table model's UIDRef.
virtual bool IPreflightArtworkTableContext::IsTableNode () const
pure virtual

Returns whether this node is a metadata (context) node representing the table information for a bunch of child marking operations. This is not usually that useful unless you're inspecting the tree in a relatively advanced way. Typically you would use GetDepth() to see if this is being drawn as part of a table, and GetInfo() to get the innermost information.

Returns
kTrue if a table node; kFalse otherwise.
virtual IPreflightArtworkTableContext* IPreflightArtworkTableContext::QueryParent () const
pure virtual

Walks toward the root node looking for a node for which IsTextNode() is true. When it finds one, returns a refcounted context pointer to it.

Returns
The first parent text context, or nil if there is no containing text context.