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

#include <IColumns.h>

Inheritance diagram for IColumns:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_ICOLUMNS }
 
enum  ColumnOrientation { kVerticalColumnOrientation = 0, kHorizontalColumnOrientation = 1, kRomanColumnOrientation = kVerticalColumnOrientation, kTraditionalCJKColumnOrientation = kHorizontalColumnOrientation }
 
enum  MasterColumnRequest { kRequestPerhapsInvalidFirstColumnData = 0, kRequestValidColumnData = 1 }
 

Public Member Functions

virtual void SetColumns (const PMRealList &pageCols)=0
 
virtual void GetColumns_ (PMRealList *outputColumns, MasterColumnRequest wantMaster=kRequestValidColumnData) const =0
 
virtual int32 GetNumberColumns_ (MasterColumnRequest wantMaster=kRequestValidColumnData) const =0
 
virtual void SetGutter (const PMReal &theGutter)=0
 
virtual PMReal GetGutter_ (MasterColumnRequest wantMaster=kRequestValidColumnData) const =0
 
virtual void SetColumnOrientation_0 (ColumnOrientation direction)=0
 
virtual ColumnOrientation GetColumnOrientation_0 (MasterColumnRequest wantMaster=kRequestValidColumnData) const =0
 
virtual void ChangeColumnAtIndex (int32 columnIndex, const PMReal &newValue)=0
 
virtual int32 GetColumnAtLocation_ (const PMReal &location) const =0
 
virtual PMRect GetNthColumnBoundingBox_ (IGeometry *pageGeom, const int32 n, const PMRect &marginRect) const =0
 
virtual void SetCustom (bool16 b)=0
 
virtual void ResetColumns ()=0
 
virtual bool16 ColumnsAreValid_ () const =0
 
virtual void SetColumnsAreValid (bool16 valid)=0
 
virtual bool16 ColumnsAreCustom_ (MasterColumnRequest wantMaster=kRequestValidColumnData) const =0
 
virtual void GetColumnAttributes_hmm (MasterColumnRequest wantMaster, PMRealList *outputColumns, PMReal *gutter, ColumnOrientation *direction, bool16 *custom, bool16 *valid) const =0
 
virtual PMRect GetPageBoundingBox_ (IGeometry *pageGeometry, const PMRect &marginRect) 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

Represents columns associated with a page.

See Also
kPageBoss

Member Function Documentation

virtual void IColumns::ChangeColumnAtIndex (int32 columnIndex,
const PMRealnewValue 
)
pure virtual

Change the column position at the specified index. Since every column requires two values to define it, a page with 2 columns would have 4 column positions/indices.

Parameters
columnIndexIN the column index for the column value to change.
newValueIN the new value for the column position.
See Also
kMoveColumnGuideCmdBoss
virtual bool16 IColumns::ColumnsAreCustom_ (MasterColumnRequest wantMaster = kRequestValidColumnData) const
pure virtual

Returns whether the columns are evenly spaced, or have been "customized".

Parameters
wantMasterIN Pass kTrue to get the custom value for any applied master on the page if valid.
Returns
bool16 kTrue if user has modified column widths by dragging in layout, kFalse otherwise.
virtual bool16 IColumns::ColumnsAreValid_ () const
pure virtual

Returns if the columns on a page are overridden (kTrue) or the applied master page's columns are in use (kFalse).

Parameters
none
Returns
bool16 kTrue if overridden, kFalse if master's columns interface is in use.
virtual int32 IColumns::GetColumnAtLocation_ (const PMReallocation) const
pure virtual

Return the index of the column at the specified location. Returns the closest column position.

Parameters
locationIN the location value to search for, relative to left margin (or top for J-style columns when GetDirection returns kTrue).
See Also
kMoveColumnGuideCmdBoss
virtual void IColumns::GetColumnAttributes_hmm (MasterColumnRequest wantMaster,
PMRealListoutputColumns,
PMRealgutter,
ColumnOrientation * direction,
bool16 * custom,
bool16 * valid 
) const
pure virtual

Allows caller to get all the column attributes at once. Faster than calling the individual routines. All parameters are optional.

Parameters
wantMasterIN Pass kTrue to get the custom value for any applied master on the page if valid.
outputColumnsOUT a PMRealList* to contain the list of column positions. May pass nil if not needed.
gutterOUT a PMReal* to hold the gutter value. Gutter value is always the same for all columns on a page. May pass nil if not needed.
directionOUT a bool16* to hold the column direction value. May pass nil if not needed.
customOUT a bool16* to hold the custom value. May pass nil if not needed.
validOUT a bool16* to hold the valid value. May pass nil if not needed.
See Also
GetColumns
GetGutter
GetDirection
ColumnsAreCustom
ColumnsAreValid
virtual ColumnOrientation IColumns::GetColumnOrientation_0 (MasterColumnRequest wantMaster = kRequestValidColumnData) const
pure virtual

Get direction/orientation for columns on page.

Parameters
wantMasterkTrue to get the direction value for any applied master on the page if valid.
virtual void IColumns::GetColumns_ (PMRealListoutputColumns,
MasterColumnRequest wantMaster = kRequestValidColumnData 
) const
pure virtual

Get the column list for the page. column guide positions are relative to the left margin for the page. Or to the top of page for vertical columns.

Parameters
outputColumnsOUT list of PMReal column positions. Note that there will be twice as many column positions are there are number of columns. A column requires two positions to define it.
wantMasterkTrue to get the column positions for any applied master on the page if valid.
See Also
QueryColumns
virtual PMReal IColumns::GetGutter_ (MasterColumnRequest wantMaster = kRequestValidColumnData) const
pure virtual

Get the gutter value for the page.

Parameters
wantMasterkTrue to get the gutter value for any applied master on the page if valid.
virtual PMRect IColumns::GetNthColumnBoundingBox_ (IGeometrypageGeom,
const int32 n,
const PMRectmarginRect 
) const
pure virtual

Return a bbox in page coordinates for the nth column with the provided marginRect. Takes into account if column direction for CJK columns. Used by autoflow. Note that this box would need to be transformed by the page's transform to get the bounds in spread coordinates.

Parameters
pageGeomIN the IGeometry* for the desired page.
nIN the column index for the desired column box (0-based).
marginRectIN the PMRect as returned from GetMargins.
See Also
GetMargins
virtual int32 IColumns::GetNumberColumns_ (MasterColumnRequest wantMaster = kRequestValidColumnData) const
pure virtual

Get the number of columns for the page.

Parameters
wantMasterkTrue to get the column positions for any applied master on the page if valid.
Returns
the number of columns on the page. Will range from kMinNumColumns to kMaxNumColumns.
virtual PMRect IColumns::GetPageBoundingBox_ (IGeometrypageGeometry,
const PMRectmarginRect 
) const
pure virtual

Return a bbox in page coordinates for the columns on the page with the provided marginRect. Takes into account if column direction for CJK columns. Note that this box would need to be transformed by the page's transform to get the bounds in spread coordinates.

Parameters
pageGeometryIN the IGeometry* for the desired page.
marginRectIN the PMRect as returned from GetMargins.
See Also
GetMargins
virtual void IColumns::ResetColumns ()
pure virtual

Reset the columns to equal width based on current margins and gutter. Clears custom setting.

Parameters
none
See Also
ColumnsAreCustom
virtual void IColumns::SetColumnOrientation_0 (ColumnOrientation direction)
pure virtual

Set the direction/orientation for columns on page. When kFalse, column positions are measured from left of page to right, when kTrue, they are measured from top of page down.

Parameters
directionkFalse is for Roman columns, kTrue for J vertical columns.
virtual void IColumns::SetColumns (const PMRealListpageCols)
pure virtual

Set the column list for the page. Positions are relative to the left edge of the margin. So, first column position is typically 0. For a page with vertical columns, positions are from top of page down.

Parameters
pageColsa list of PMReals for the columns for the page.
See Also
GetDirection
kSetPageColumnsCmdBoss
virtual void IColumns::SetColumnsAreValid (bool16 valid)
pure virtual

Set the columns to be valid or not for a page.

Parameters
validIN set to kTrue to override the columns for a page, kFalse to reset to non-overridden (in which case the columns for the master page applied to the page will be used).
See Also
kSetPageColumnsValidCmdBoss
virtual void IColumns::SetCustom (bool16 b)
pure virtual

Set the custom attribute for columns. Custom columns are not equally spaced.

Parameters
bIN Pass kTrue to set to custom, kFalse otherwise.
See Also
kSetPageColumnsCmdBoss
virtual void IColumns::SetGutter (const PMRealtheGutter)
pure virtual

Set the gutter value for the page. Will be the same for all columns on the page.

Parameters
theGutter.Must range from kMinGutter to kMaxGutter.