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

#include <ITableFrame.h>

Inheritance diagram for ITableFrame:
IPMUnknown

Classes

class  HitTestData
 
struct  HitTestPolicyCallback
 

Public Types

enum  { kDefaultIID = IID_ITABLEFRAME }
 
enum  ECellArea {
  kParcel, kContent = kParcel, kInnerStroke, kInnerFrame = kInnerStroke,
  kPath, kFrame = kPath, kOuterStroke, kOuterFrame = kOuterStroke
}
 

Public Member Functions

virtual ITableModelQueryModel () const =0
 
virtual UIDRef GetModelRef () const =0
 
virtual void SetModel (const ITableModel *table)=0
 
virtual bool16 IsFirstFrame (void) const =0
 
virtual bool16 IsValid () const =0
 
virtual PMRect GetStrokeBoundingBox () const =0
 
virtual PMRect GetPathBoundingBox () const =0
 
virtual PMRect GetInkBounds () const =0
 
virtual bool16 Contains (const CellParcelAddr &element) const =0
 
virtual UIDRef GetFrameRef () const =0
 
virtual ITextFrameColumnQueryFrame () const =0
 
virtual ParcelKey GetParcelKey () const =0
 
virtual IParcelQueryParcel () const =0
 
virtual PMMatrix GetToParcelMatrix () const =0
 
virtual PMMatrix GetToFrameMatrix () const =0
 
virtual PMMatrix GetToPasteboardMatrix () const =0
 
virtual PMRect GetCellBounds (const GridAddress &anchor, ECellArea area=kContent) const =0
 
virtual HitTestDataHitTest (const PMPoint &pt, HitTestPolicyCallback *framePolicy, HitTestPolicyCallback *cellPolicy) const =0
 
virtual bool16 IsRowTopClosed (const ITableLayout::Row &row) const =0
 
virtual bool16 IsRowBottomClosed (const ITableLayout::Row &row) const =0
 
virtual const ColRange GetColumns () const =0
 
virtual bool16 ContainsColumn (const int32 col) const =0
 
virtual bool16 ContainsRow (const ITableLayout::Row &row) const =0
 
virtual bool16 ContainsModelRow (const GridCoord row) const =0
 
virtual bool16 IntersectsModelArea (const GridArea &area) const =0
 
virtual bool16 ContainsModelArea (const GridArea &area) const =0
 
virtual const int32 GetNumRowsInFrame () const =0
 
virtual const GridCoord GetFrameTopRowModelCoord () const =0
 
virtual const GridCoord GetFrameBottomRowModelCoord () const =0
 
virtual bool16 GetAreRowsInSameRange (GridCoord mR1, GridCoord mR2) const =0
 
virtual K2Vector< GridArea > * CreateSectionAreasIntersectingFrame (const GridArea &area) const =0
 
virtual ParcelKey GetParcelInFrame (const GridAddress anchor) const =0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Iteration

typedef CellParcelIterator
< ITableFrame
const_parcel_iterator
 
typedef
ITableLayout::const_row_iterator 
const_frame_row_iterator
 
virtual const_parcel_iterator begin_parcel_iter () const =0
 
virtual const_parcel_iterator end_parcel_iter () const =0
 
virtual const_frame_row_iterator begin_frame_row_iter () const =0
 
virtual const_frame_row_iterator begin_frame_row_iter_at (GridCoord modelRow) const =0
 
virtual const_frame_row_iterator end_frame_row_iter () const =0
 
virtual void ConvertFromAnna (TableLayout *layout)=0
 

Detailed Description

Maintains geometry information associated with a table frame. See kTableModelBoss.

Member Typedef Documentation

Used to traverse through the CellParcelAddr contained by this table frame

Used to traverse through the CellParcelAddr contained by this table frame

Member Enumeration Documentation

Identifies Cell areas
Enumerator
kParcel 

Parcel bounds, the area content composed into

kInnerStroke 

path area inset by half the stroke weight

kPath 

center of the stroke

kOuterStroke 

path area ouset by half the stroke weight

Member Function Documentation

virtual const_frame_row_iterator ITableFrame::begin_frame_row_iter () const
pure virtual

Use to acquire an iterator that refers to the ITableLayout::Row at the beginning of this table frame

virtual const_frame_row_iterator ITableFrame::begin_frame_row_iter_at (GridCoord modelRow) const
pure virtual

Use to acquire an iterator that refers to the ITableLayout::Row at the given row in this table frame

Precondition
Row contained by table frame
virtual const_parcel_iterator ITableFrame::begin_parcel_iter () const
pure virtual

Use to acquire an iterator that refers to the parcel at the start of this table frame

virtual bool16 ITableFrame::Contains (const CellParcelAddrelement) const
pure virtual

Returns true if this table frame contains the give CellParcelAddr

Parameters
CellParcelAddrelement to check
Returns
true if elements is contained by the frame
virtual bool16 ITableFrame::ContainsColumn (const int32 col) const
pure virtual

Returns true if the table frame contains this model column

Parameters
int32column to check if it contained by this frame
Precondition
column is contained by the table model
virtual bool16 ITableFrame::ContainsModelArea (const GridAreaarea) const
pure virtual

Returns true if the table frame intersects any portion of the area

Parameters
areaarea to use to check if contained by this table frame
Precondition
area is contained by the table model
virtual bool16 ITableFrame::ContainsModelRow (const GridCoord row) const
pure virtual

Returns true if the table frame contains this model row

Parameters
rowlayout row to check if it contained by this frame
Precondition
row is contained by the table model
virtual bool16 ITableFrame::ContainsRow (const ITableLayout::Rowrow) const
pure virtual

Returns true if the table frame contains this layout row

Parameters
rowlayout row to check if it contained by this frame
Precondition
this->ContainsModelRow(row->GetModelRow())
virtual void ITableFrame::ConvertFromAnna (TableLayout * layout)
pure virtual

Converts this table frame from the InDesign 2.0 format called ONLY during conversion

virtual K2Vector<GridArea>* ITableFrame::CreateSectionAreasIntersectingFrame (const GridAreaarea) const
pure virtual

Returns a vector where each entry is contained in a separate section of the TableModel

Precondition
IntersectsModelArea(area)
Postcondition
Vector's size is > 0 and < 3: 3 is the number of sections in the TableModel (headers,body,footers)
virtual const_frame_row_iterator ITableFrame::end_frame_row_iter () const
pure virtual

Use to acquire an iterator that is 1+ the end of the TableFrame

virtual const_parcel_iterator ITableFrame::end_parcel_iter () const
pure virtual

Use to acquire an iterator that refers to the parcel one more then the end of this table frame

virtual bool16 ITableFrame::GetAreRowsInSameRange (GridCoord mR1,
GridCoord mR2 
) const
pure virtual

Returns kTrue if the new ModelRows composed in this TableFrame are from different Row Ranges (Header/SubHeader/Body/Footer).

Parameters
mR1GridCoord of a ModelRow that is composed in this Frame.
mR2GridCoord of a ModelRow that is composed in this Frame.
virtual PMRect ITableFrame::GetCellBounds (const GridAddressanchor,
ECellArea area = kContent 
) const
pure virtual

Returns a PMRect in TableFrame coordinates corresponding to the selected area depending on what is passed in

Parameters
anchorthe model anchor of the cell we are trying to get the area of
areakParcel, kInnerStroke, kPath – what bounds the area returned should have
Precondition
self.IsValid()
table.IsAnchor(anchor)
self.Contains(anchor)
Postcondition
self.GetStrokeBoundingBox().RectIn(result); anchor.col > anchor2.col implies
  result.left > self.GetCellArea(anchor2).left
and anchor.row > anchor2.row implies
  result.top > self.GetCellArea(anchor2).top
virtual const ColRange ITableFrame::GetColumns () const
pure virtual

Returns the columns in this table frame

Returns
ColRange Columns contained by this frame
virtual const GridCoord ITableFrame::GetFrameBottomRowModelCoord () const
pure virtual

Gets the model GridCoord of the last row in the frame

Returns
GridCoord The model coordinate of the bottom row in this frame

NOTE: Do not combine this with GetFrameTopRowModelCoord() and expect to get a contiguous area of all cells in the Table Frame

virtual UIDRef ITableFrame::GetFrameRef () const
pure virtual

Acquire a persistent reference to the text frame associated with this table frame.

Returns
persistent reference to associated text frame
virtual const GridCoord ITableFrame::GetFrameTopRowModelCoord () const
pure virtual

Gets the model GridCoord of the first row in the frame

Returns
GridCoord The model coordinate of the top row in this frame

NOTE: Do not combine this with GetFrameBottomRowModelCoord() and expect to get a contiguous area of all cells in the Table Frame

virtual PMRect ITableFrame::GetInkBounds () const
pure virtual

In TableFrame coordinates. Note that this includes all of the stroke line around the frame and the union of all the cells InkBounds.

Precondition
self.IsValid()
virtual UIDRef ITableFrame::GetModelRef () const
pure virtual

Accessor for the table model, returning a persistent UIDRef. This can be used to acquire an ITableModel interface.

Returns
UIDRef the model
virtual const int32 ITableFrame::GetNumRowsInFrame () const
pure virtual

Returns the number of layout rows this frame contains

Returns
int32 number of rows in the frame
virtual ParcelKey ITableFrame::GetParcelInFrame (const GridAddress anchor) const
pure virtual

Returns the parcel of the cell that is in this frame (each cell only has one of its parcels in a TableFrame)

virtual ParcelKey ITableFrame::GetParcelKey () const
pure virtual

Returns the Parcel Key for this Table Frame

virtual PMRect ITableFrame::GetPathBoundingBox () const
pure virtual

In TableFrame coordinates. Note that this does not include the stroke line around the frame.

Precondition
self.IsValid()
virtual PMRect ITableFrame::GetStrokeBoundingBox () const
pure virtual

The TableFrame coordinate system has (0,0) as the value at the top left corner of the Stroke Bounds. Note that this includes all of the stroke line around the frame.

Precondition
self.IsValid()
virtual PMMatrix ITableFrame::GetToFrameMatrix () const
pure virtual
Returns the Matrix needed to transform a table frame coord to a text

frame coord

virtual PMMatrix ITableFrame::GetToParcelMatrix () const
pure virtual
Returns the Matrix needed to transform a table frame coord to a Parcel

coord

virtual PMMatrix ITableFrame::GetToPasteboardMatrix () const
pure virtual
Returns the Matrix needed to transform a table frame coord to a

pasteboard point

virtual HitTestData* ITableFrame::HitTest (const PMPointpt,
HitTestPolicyCallbackframePolicy,
HitTestPolicyCallbackcellPolicy 
) const
pure virtual

Determine which row/column, parcel, stroke the given point would lie in.

Parameters
ptlocation to hit test, is given in inner (text frame) coordinates
Precondition
self.IsValid()
self.GetStrokeBoundingBox().PointIn(pt) – pt is in inner (text frame) coordinates
Postcondition
result.loc = kHitElement implies
  self.GetCellArea(table.FindCellAnchor(result.row, result.col), kFrame).Contains(pt)
valid grid address
is parcel address in frame
is valid layout row in frame MCHENG_Unimplemented
virtual bool16 ITableFrame::IntersectsModelArea (const GridAreaarea) const
pure virtual

Returns true if the table frame intersects any portion of the area

Parameters
areaarea to use to check for an intersection
Precondition
area is contained by the table model
virtual bool16 ITableFrame::IsFirstFrame (void ) const
pure virtual

Determine if this is the first frame in the given table model.

Returns
kTrue if this is the first frame. kFalse if not.
virtual bool16 ITableFrame::IsRowBottomClosed (const ITableLayout::Rowrow) const
pure virtual

Returns true if the given ITableLayout::Row's bottom is closed

Parameters
rowlayout row to check
Returns
bool16 true if the bottom is closed
Precondition
this->ContainsRow(row)
virtual bool16 ITableFrame::IsRowTopClosed (const ITableLayout::Rowrow) const
pure virtual

Returns true if the given ITableLayout::Row's top is closed

Parameters
rowlayout row to check
Returns
bool16 true if the top is closed
Precondition
this->ContainsRow(row)
virtual bool16 ITableFrame::IsValid () const
pure virtual

Returns true if the table frame is composed and all of its information is still valid. Returns false if the frame is damaged.

virtual ITextFrameColumn* ITableFrame::QueryFrame () const
pure virtual

Query for the text frame associated with this table frame.

Returns
reference-incremented ptr to text frame associated with this table frame
Precondition
self.GetParcelKey().IsValid()
virtual ITableModel* ITableFrame::QueryModel () const
pure virtual

Query for the associated table model.

Returns
reference-incremented interface ptr to the associated table model
virtual IParcel* ITableFrame::QueryParcel () const
pure virtual

Query for the Parcel associated with this table frame.

Returns
reference-incremented ptr to Parcel associated with this table frame
Precondition
self.GetParcelKey().IsValid()
virtual void ITableFrame::SetModel (const ITableModeltable)
pure virtual

Sets the modes

Parameters
table
Postcondition
self.QueryModel() = this