![]() | InDesign SDK 20.5 |
#include <ITextFrameFacade.h>

Public Types | |
| enum | { kDefaultIID = IID_ITEXTFRAMEFACADE } |
Public Member Functions | |
| virtual ErrorCode | CreateTextFrame (UIDRef parent, UIDRef &newFrame, const PMRect &boundary, bool16 noGraphicAttr, bool16 isHorizontal, bool16 isFrameGrid, bool16 isLeftToRight, ClassID frameItem=kFrameItemBoss)=0 |
| virtual ErrorCode | CreateTextFrame (UIDRef parent, UIDRef &newFrame, const PMPointList &opposingCorners, bool16 noGraphicAttr, bool16 isHorizontal, bool16 isFrameGrid, bool16 isLeftToRight, ClassID frameItem=kFrameItemBoss)=0 |
| virtual ErrorCode | CreateTextFrameForStory (UIDRef parent, UIDRef &newFrame, const PMRect &boundary, bool16 noGraphicAttr, ITextModel *story, bool16 isHorizontal, bool16 isFrameGrid, bool16 isLeftToRight, ClassID frameItem=kFrameItemBoss)=0 |
| virtual ErrorCode | CreateTextFrameForFrameList (UIDRef parent, UIDRef &newFrame, const PMRect &boundary, bool16 noGraphicAttr, IFrameList *frameList, bool16 atEnd=kTrue, ClassID frameItem=kFrameItemBoss)=0 |
| virtual ErrorCode | CreateTextFrameForFrameList (UIDRef parent, UIDRef &newFrame, const PMRect &boundary, bool16 noGraphicAttr, IMultiColumnTextFrame *mcFrame, bool16 insertAfter=kTrue, ClassID frameItem=kFrameItemBoss)=0 |
| virtual ErrorCode | ConvertToTextFrame (UIDRef parent, bool16 isHorizontal, bool16 isFrameGrid, bool16 isLeftToRight, ClassID frameItem=kFrameItemBoss)=0 |
| virtual ErrorCode | ConvertToTextFrameForStory (UIDRef parent, ITextModel *story, bool16 isHorizontal, bool16 isFrameGrid, bool16 isLeftToRight, ClassID frameItem=kFrameItemBoss)=0 |
| virtual ErrorCode | ConvertToTextFrameForFrameList (UIDRef parent, IFrameList *frameList, bool16 atEnd=kTrue, ClassID frameItem=kFrameItemBoss)=0 |
| virtual ErrorCode | ConvertToTextFrameForFrameList (UIDRef parent, IMultiColumnTextFrame *mcFrame, bool16 insertAfter=kTrue, ClassID frameItem=kFrameItemBoss)=0 |
| virtual void | GetSplinePathDimensionsIf (PMReal splinePathWidth, PMReal splinePathHeight, PMReal strokeWeight, int32 strokeAlignment, PMReal leftTextInset, PMReal topTextInset, PMReal rightTextInset, PMReal bottomTextInset, bool16 storyIsVertical, int32 mcfNumColumns, PMReal mcfGutterWidth, PMReal &adjSplinePathWidth, PMReal &adjSplinePathHeight, PMReal &mcfVariableColWidth)=0 |
| virtual void | GetSplinePathDimensionsIf (PMReal splinePathWidth, PMReal splinePathHeight, PMReal strokeWeight, int32 strokeAlignment, PMReal leftTextInset, PMReal topTextInset, PMReal rightTextInset, PMReal bottomTextInset, bool16 storyIsVertical, PMReal textSize, PMReal charAki, PMReal lineAki, PMReal hScale, PMReal vScale, int32 mcfNumColumns, PMReal mcfGutterWidth, PMReal &adjSplinePathWidth, PMReal &adjSplinePathHeight, PMReal &mcfVariableColWidth, int32 &mcfGridColCount, int32 &mcfGridRowCount)=0 |
| virtual void | GetSplinePathDimensionsIf (PMReal splinePathWidth, PMReal splinePathHeight, PMReal strokeWeight, int32 strokeAlignment, PMReal leftTextInset, PMReal topTextInset, PMReal rightTextInset, PMReal bottomTextInset, bool16 storyIsVertical, PMReal mcfGutterWidth, PMReal mcfFixedColumnWidth, PMReal &adjSplinePathWidth, PMReal &adjSplinePathHeight, int32 &mcfNumColumns)=0 |
| virtual void | GetSplinePathDimensionsIf (PMReal splinePathWidth, PMReal splinePathHeight, PMReal strokeWeight, int32 strokeAlignment, PMReal leftTextInset, PMReal topTextInset, PMReal rightTextInset, PMReal bottomTextInset, bool16 storyIsVertical, PMReal textSize, PMReal charAki, PMReal lineAki, PMReal hScale, PMReal vScale, PMReal mcfGutterWidth, PMReal mcfFixedColumnWidth, PMReal &adjSplinePathWidth, PMReal &adjSplinePathHeight, int32 &mcfNumColumns, int32 &mcfGridColCount, int32 &mcfGridRowCount)=0 |
| virtual void | GetSplinePathDimensionsIf (PMReal splinePathWidth, PMReal splinePathHeight, PMReal strokeWeight, int32 strokeAlignment, PMReal leftTextInset, PMReal topTextInset, PMReal rightTextInset, PMReal bottomTextInset, bool16 storyIsVertical, PMReal mcfGutterWidth, PMReal mcfColumnWidthMin, PMReal mcfColumnWidthMax, PMReal &adjSplinePathWidth, PMReal &adjSplinePathHeight, int32 &mcfNumColumns)=0 |
| virtual void | GetMinFlexibleColumnWidthIf (int32 numColumns, PMReal gutterWidth, PMReal maxFlexibleWidth, PMReal currentColumnWidth, PMReal &adjustedColumnWidth)=0 |
Public Member Functions inherited from IPMUnknown | |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| virtual void | AddRef () const =0 |
| virtual void | Release () const =0 |
A high level API for dealing with MultiColumnTextFrames. To use this Facade, include this header file and use the following example syntax: result = Utils<Facade::ITextFrameFacade>()->CreateTextFrame( ... );
| pure virtual |
Converts an existing Spline to a MultiColumnTextFrame with a new story and a new FrameList.
| parent | - Parent page item under which to create the new MultiColumnTextFrame. parent.GetDataBase() must be non-nil, if parent.GetUID() is set to kInvalidUID then a new kSplineItemBoss will be created. |
| isHorizontal | - kTrue if the new Story should be set horizontal in orientation, kFalse if it is vertical. |
| isFrameGrid | - kTrue if the new Story should have an active FrameGrid. kFalse if not. |
| isLeftToRight | - kTrue if the new Story should be set Left To Right in direction. kFalse if it is left to right. |
| frameItem | - ID of the TextFrameColumn boss. Default is kFrameItemBoss. |
| pure virtual |
Converts an existing Spline to a MultiColumnTextFrame and insert at the end or beginning of an existing FrameList.
| parent | - Existing Spline which will be converted to MultiColumnTextFrame. |
| frameList | - The existing FrameList into which the MultiColumnTextFrame will be inserted. |
| atEnd | - kTrue if the MultiColumnTextFrame will be appened to the end of the FrameList, kFalse if it will be inserted to the beginning of the FrameList. Default is kTrue. |
| frameItem | - ID of the TextFrameColumn boss. Default is kFrameItemBoss. |
| pure virtual |
Converts an existing Spline to a MultiColumnTextFrame and insert into an existing FrameList. The new MultiColumnTextFrame will be inserted before or after the specified IMultiColumnTextFrame.
| parent | - Existing Spline which will be converted to MultiColumnTextFrame. |
| mcFrame | - The MultiColumnTextFrame in the existing FrameList before or after which the converted Spline will be inserted. |
| insertAfter | - kTrue if the converted Spline will be inserted after mcFrame, kFalse if it will be inserted before mcFrame. Default is kTrue. |
| frameItem | - ID of the TextFrameColumn boss. Default is kFrameItemBoss. |
| pure virtual |
Converts an existing Spline to a MultiColumnTextFrame, attaches to an existing story and starts a new FrameList.
| parent | - Existing Spline which will be converted to MultiColumnTextFrame. |
| story | - The existing story to which the MultiColumnTextFrame will attach. |
| isHorizontal | - kTrue if the Story should be set horizontal in orientation, kFalse if it is vertical. |
| isFrameGrid | - kTrue if the Story should have an active FrameGrid. kFalse if not. |
| isLeftToRight | - kTrue if the Story should be set Left To Right in direction. kFalse if it is left to right. |
| frameItem | - ID of the TextFrameColumn boss. Default is kFrameItemBoss. |
| pure virtual |
Creates a new MultiColumnTextFrame with a new story and a new FrameList.
| parent | - Parent page item under which to create the new MultiColumnTextFrame. parent.GetDataBase() must be non-nil, if parent.GetUID() is set to kInvalidUID then a new kSplineItemBoss will be created. |
| newFrame | - [OUT] Returns newly created MultiColumnTextFrame if succeeded. Otherwise, returns UIDRef(nil, kInvalidUID). |
| noGraphicAttr | - kTrue if not to set object styles for the new MultiColumnTextFrame. kFalse otherwise. Usually set to kTrue. |
| boundary | - Boundary (in pasteboard coordinates) of the spline where MultiColumnTextFrame will be created. |
| isHorizontal | - kTrue if the new Story should be set horizontal in orientation, kFalse if it is vertical. |
| isFrameGrid | - kTrue if the new Story should have an active FrameGrid. kFalse if not. |
| isLeftToRight | - kTrue if the new Story should be set Left To Right in direction. kFalse if it is left to right. |
| frameItem | - ID of the TextFrameColumns item. Default is kFrameItemBoss. |
| pure virtual |
Creates a new MultiColumnTextFrame with a new story and a new FrameList.
| parent | - Parent page item under which to create the new MultiColumnTextFrame. parent.GetDataBase() must be non-nil, if parent.GetUID() is set to kInvalidUID then a new kSplineItemBoss will be created. |
| newFrame | - [OUT] Returns newly created MultiColumnTextFrame if succeeded. Otherwise, returns UIDRef(nil, kInvalidUID). |
| noGraphicAttr | - kTrue if not to set object styles for the new MultiColumnTextFrame. kFalse otherwise. Usually set to kTrue. |
| opposingCorners | - Opposing corners (in pasteboard coordinates) of the spline where MultiColumnTextFrame will be created. |
| isHorizontal | - kTrue if the new Story should be set horizontal in orientation, kFalse if it is vertical. |
| isFrameGrid | - kTrue if the new Story should have an active FrameGrid. kFalse if not. |
| isLeftToRight | - kTrue if the new Story should be set Left To Right in direction. kFalse if it is left to right. |
| frameItem | - ID of the TextFrameColumns item. Default is kFrameItemBoss. |
| pure virtual |
Creates a new MultiColumnTextFrame and insert to the end or beginning of the specified FrameList.
| parent | - Parent page item under which to create the new MultiColumnTextFrame. parent.GetDataBase() must be non-nil, if parent.GetUID() is set to kInvalidUID then a new kSplineItemBoss will be created. |
| newFrame | - [OUT] Returns newly created MultiColumnTextFrame if succeeded. Otherwise, returns UIDRef(nil, kInvalidUID). |
| noGraphicAttr | - kTrue if not to set object styles for the new MultiColumnTextFrame. kFalse otherwise. Usually set to kTrue. |
| boundary | - Boundary of the spline where MultiColumnTextFrame will be created. |
| frameList | - The existing FrameList into which the new MultiColumnTextFrame will be inserted. |
| atEnd | - kTrue if the new MultiColumnTextFrame will be appended to the end of the FrameList, kFalse if it will be inserted to the beginning of the FrameList. Default is kTrue. |
| frameItem | - ID of the TextFrameColumn boss. Default is kFrameItemBoss. |
| pure virtual |
Creates a new MultiColumnTextFrame and insert into an existing FrameList. The new MultiColumnTextFrame will be inserted before or after the specified IMultiColumnTextFrame.
| parent | - Parent page item under which to create the new MultiColumnTextFrame. parent.GetDataBase() must be non-nil, if parent.GetUID() is set to kInvalidUID then a new kSplineItemBoss will be created. |
| newFrame | - [OUT] Returns newly created frame if succeeded. Otherwise, returns UIDRef(nil, kInvalidUID). |
| noGraphicAttr | - kTrue if not to set object styles for the new MultiColumnTextFrame. kFalse otherwise. Usually set to kTrue. |
| boundary | - Boundary of the spline where MultiColumnTextFrame will be created. |
| mcFrame | - The MultiColumnTextFrame in the existing FrameList before or after which the new MultiColumnTextFrame will be inserted. |
| insertAfter | - kTrue if the new MultiColumnTextFrame will be inserted after mcFrame, kFalse if it will be inserted before mcFrame. Default is kTrue. |
| frameItem | - ID of the TextFrameColumn boss. Default is kFrameItemBoss. |
| pure virtual |
Creates a new MultiColumnTextFrame, attaches to an existing story and starts a new FrameList.
| parent | - Parent page item under which to create the new MultiColumnTextFrame. parent.GetDataBase() must be non-nil, if parent.GetUID() is set to kInvalidUID then a new kSplineItemBoss will be created. |
| newFrame | - [OUT] Returns newly created MultiColumnTextFrame if succeeded. Otherwise, returns UIDRef(nil, kInvalidUID). |
| noGraphicAttr | - kTrue if not to set object styles for the new MultiColumnTextFrame. kFalse otherwise. Usually set to kTrue. |
| boundary | - Boundary of the spline where MultiColumnTextFrame will be created. |
| story | - The existing story to which the new MultiColumnTextFrame will attach. |
| isHorizontal | - kTrue if the Story should be set horizontal in orientation, kFalse if it is vertical. |
| isFrameGrid | - kTrue if the Story should have an active FrameGrid. kFalse if not. |
| isLeftToRight | - kTrue if the Story should be set Left To Right in direction. kFalse if it is left to right. |
| frameItem | - ID of the TextFrameColumn boss. Default is kFrameItemBoss. |
| pure virtual |
Calculate the minimum for how wide a column must be for a given number of columns when using flexible column sizing.
| numColumns | the number for desired columns |
| gutterWidth | the gutter width |
| maxFlexibleWidth | the maximum width of a column |
| currentColumnWidth | the current column width for the text frame |
| adjustedColumnWidth | [OUT] the adjusted size that is the minimum column size in order to achieve that column count |
| pure virtual |
These methods can assist the MultiColumnTextFrame creator to determine the final size of the Spline will be after a call to create. This is especially useful to trackers which would like to show the user what will happen.
The MultiColumnTextFrame will be the sole determinate as to what the final size of the Spline will be - even if the Spline already exists. The goal here is to isolate the clients from having to know how the policy is calculated and leave it in one place - in the MultiColumnTextFrame.
The MultiColumnTextFrame may decide to accept the current or specified size of the Spline but it is under no requirement to do so. This policy exists so that both fixed column width, range column width, or FrameGrids are always sized appropriately.
Lastly, we always let the FrameGrid dimensions win - so if the TextColumnSizer specifies a fixed column width that is not an even number of grid cells the fixed column width will be adjusted up to the next grid cell.Computes the Spline dimensions for a fixed number of columns and no FrameGrid.
| splinePathWidth | Must be greater or equal to 1.0 |
| splinePathHeight | Must be greater or equal to 1.0 |
| strokeWeight | |
| strokeAlignment | |
| leftTextInset | |
| topTextInset | |
| rightTextInset | |
| bottomTextInset | |
| storyIsVertical | |
| mcfNumColumns | |
| mcfGutterWidth | |
| adjSplinePathWidth | [Out] |
| adjSplinePathHeight | [Out] |
| mcfVariableColWidth | [Out] |
| pure virtual |
Computes the Spline dimensions for a fixed number of columns and a FrameGrid.
| splinePathWidth | Must be greater or equal to 1.0 |
| splinePathHeight | Must be greater or equal to 1.0 |
| strokeWeight | |
| strokeAlignment | |
| leftTextInset | |
| topTextInset | |
| rightTextInset | |
| bottomTextInset | |
| storyIsVertical | |
| textSize | |
| charAki | |
| lineAki | |
| hScale | |
| vScale | |
| mcfNumColumns | |
| mcfGutterWidth | |
| adjSplinePathWidth | [Out] |
| adjSplinePathHeight | [Out] |
| mcfVariableColWidth | [Out] |
| mcfGridColCount | [Out] |
| mcfGridRowCount | [Out] |
| pure virtual |
Computes the Spline dimensions for a fixed column width and no FrameGrid.
| splinePathWidth | |
| splinePathHeight | |
| strokeWeight | |
| strokeAlignment | |
| leftTextInset | |
| topTextInset | |
| rightTextInset | |
| bottomTextInset | |
| storyIsVertical | |
| mcfGutterWidth | |
| mcfFixedColumnWidth | |
| adjSplinePathWidth | [Out] |
| adjSplinePathHeight | [Out] |
| mcfNumColumns | [Out] |
| pure virtual |
Computes the Spline dimensions for a fixed column width and a FrameGrid.
| splinePathWidth | Must be greater or equal to 1.0 |
| splinePathHeight | Must be greater or equal to 1.0 |
| strokeWeight | |
| strokeAlignment | |
| leftTextInset | |
| topTextInset | |
| rightTextInset | |
| bottomTextInset | |
| storyIsVertical | |
| textSize | |
| charAki | |
| lineAki | |
| hScale | |
| vScale | |
| mcfGutterWidth | |
| mcfFixedColumnWidth | |
| adjSplinePathWidth | [Out] |
| adjSplinePathHeight | [Out] |
| mcfNumColumns | [Out] |
| mcfGridColCount | [Out] |
| mcfGridRowCount | [Out] |
| pure virtual |
Computes the Spline dimensions for a flexible column width and no FrameGrid.
| splinePathWidth | |
| splinePathHeight | |
| strokeWeight | |
| strokeAlignment | |
| leftTextInset | |
| topTextInset | |
| rightTextInset | |
| bottomTextInset | |
| storyIsVertical | |
| mcfGutterWidth | |
| mcfColumnWidthMin | |
| mcfColumnWidthMax | |
| adjSplinePathWidth | [Out] |
| adjSplinePathHeight | [Out] |
| mcfNumColumns | [Out] |