#include <IColumns.h>
|
| enum | { kDefaultIID = IID_ICOLUMNS } |
| |
| enum | ColumnOrientation { kVerticalColumnOrientation = 0, kHorizontalColumnOrientation = 1, kRomanColumnOrientation = kVerticalColumnOrientation, kTraditionalCJKColumnOrientation = kHorizontalColumnOrientation } |
| |
| enum | MasterColumnRequest { kRequestPerhapsInvalidFirstColumnData = 0, kRequestValidColumnData = 1 } |
| |
|
| 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 |
| |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| |
| virtual void | AddRef () const =0 |
| |
| virtual void | Release () const =0 |
| |
Represents columns associated with a page.
- See Also
- kPageBoss
| virtual void IColumns::ChangeColumnAtIndex | ( | int32 | columnIndex, | | | const PMReal & | newValue | | ) | | |
| 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
| columnIndex | IN the column index for the column value to change. |
| newValue | IN 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
| wantMaster | IN 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
- Returns
- bool16 kTrue if overridden, kFalse if master's columns interface is in use.
| virtual int32 IColumns::GetColumnAtLocation_ | ( | const PMReal & | location | ) | const |
| pure virtual |
Return the index of the column at the specified location. Returns the closest column position.
- Parameters
| location | IN 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, | | | PMRealList * | outputColumns, | | | PMReal * | gutter, | | | 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
| wantMaster | IN Pass kTrue to get the custom value for any applied master on the page if valid. |
| outputColumns | OUT a PMRealList* to contain the list of column positions. May pass nil if not needed. |
| gutter | OUT 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. |
| direction | OUT a bool16* to hold the column direction value. May pass nil if not needed. |
| custom | OUT a bool16* to hold the custom value. May pass nil if not needed. |
| valid | OUT 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
| wantMaster | kTrue to get the direction value for any applied master on the page if valid. |
| virtual void IColumns::GetColumns_ | ( | PMRealList * | outputColumns, | | | 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
| outputColumns | OUT 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. |
| wantMaster | kTrue 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
| wantMaster | kTrue to get the gutter value for any applied master on the page if valid. |
| virtual PMRect IColumns::GetNthColumnBoundingBox_ | ( | IGeometry * | pageGeom, | | | const int32 | n, | | | const PMRect & | marginRect | | ) | | 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
| pageGeom | IN the IGeometry* for the desired page. |
| n | IN the column index for the desired column box (0-based). |
| marginRect | IN 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
| wantMaster | kTrue 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_ | ( | IGeometry * | pageGeometry, | | | const PMRect & | marginRect | | ) | | 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
| pageGeometry | IN the IGeometry* for the desired page. |
| marginRect | IN 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
- 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
| direction | kFalse is for Roman columns, kTrue for J vertical columns. |
| virtual void IColumns::SetColumns | ( | const PMRealList & | pageCols | ) | |
| 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
| pageCols | a 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
| valid | IN 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
| b | IN Pass kTrue to set to custom, kFalse otherwise. |
- See Also
- kSetPageColumnsCmdBoss
| virtual void IColumns::SetGutter | ( | const PMReal & | theGutter | ) | |
| 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. |