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

#include <ICJKGridManager.h>

Inheritance diagram for ICJKGridManager:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_ICJKGRIDMANAGER }
 

Public Member Functions

virtual void RecalcGrid ()=0
 
virtual bool16 IsActive () const =0
 
virtual bool16 IsGridVertical () const =0
 
virtual bool16 IsGridRectangular () const =0
 
virtual void GetGridBounds (PMRect &rect) const =0
 
virtual const Int32ListGetCharsPerLine () const =0
 
virtual int32 GetNumOfLines () const =0
 
virtual int32 GetRectCount () const =0
 
virtual PMRect GetNthEmBoxRect (const int32 cellNumber) const =0
 
virtual PMRect GetNthICFBoxRect (const int32 cellNumber) const =0
 
virtual PMReal GetHCellSize () const =0
 
virtual PMReal GetVCellSize () const =0
 
virtual bool16 DrawVisibleEmBoxRects (const IDrawCJKGrid *drawCJKGrid, const PMRect *viewRect=nil) const =0
 
virtual bool16 DrawVisibleICFBoxRects (const IDrawCJKGrid *drawCJKGrid, const PMRect *viewRect=nil) const =0
 
virtual void GetICFAdjustments (PMReal &xAdjustment, PMReal &yAdjustment) const =0
 
virtual bool16 MoveToClosestEmBoxLeft (PMPoint &thePoint, const PMMatrix *transform=nil, const PMReal &extra=PMReal(0.0)) const =0
 
virtual bool16 MoveToClosestEmBoxTop (PMPoint &thePoint, const PMMatrix *transform=nil, const PMReal &extra=PMReal(0.0)) const =0
 
virtual bool16 MoveToClosestEmBoxRight (PMPoint &thePoint, const PMMatrix *transform=nil, const PMReal &extra=PMReal(0.0)) const =0
 
virtual bool16 MoveToClosestEmBoxBottom (PMPoint &thePoint, const PMMatrix *transform=nil, const PMReal &extra=PMReal(0.0)) const =0
 
virtual bool16 MoveToClosestICFBoxLeft (PMPoint &thePoint, const PMMatrix *transform=nil, const PMReal &extra=PMReal(0.0)) const =0
 
virtual bool16 MoveToClosestICFBoxTop (PMPoint &thePoint, const PMMatrix *transform=nil, const PMReal &extra=PMReal(0.0)) const =0
 
virtual bool16 MoveToClosestICFBoxRight (PMPoint &thePoint, const PMMatrix *transform=nil, const PMReal &extra=PMReal(0.0)) const =0
 
virtual bool16 MoveToClosestICFBoxBottom (PMPoint &thePoint, const PMMatrix *transform=nil, const PMReal &extra=PMReal(0.0)) const =0
 
virtual bool16 MoveToClosestBaseline (PMPoint &thePoint, const PMMatrix *transform=nil, const PMReal &extra=PMReal(0.0)) const =0
 
virtual bool16 MoveToClosestCenter (PMPoint &thePoint, const PMMatrix *transform=nil, const PMReal &extra=PMReal(0.0)) 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

ICJKGridManager is the interface used to manage a frame or layout grid. It provides geometric information like the scaled cell size, the number of characters, the number of lines, etc. It also contains methods for moving points to closest grid left, top, right, or bottom.

Member Function Documentation

virtual bool16 ICJKGridManager::DrawVisibleEmBoxRects (const IDrawCJKGriddrawCJKGrid,
const PMRectviewRect = nil 
) const
pure virtual

Draws all visible EmBox rects for the current grid.

Parameters
drawCJKGridIN The IDrawCJKGrid to draw with.
viewRectIN The visible rect. If nil, the parent's rect will be used.
Returns
kTrue if the grid did draw. Otherwise kFalse.
virtual bool16 ICJKGridManager::DrawVisibleICFBoxRects (const IDrawCJKGriddrawCJKGrid,
const PMRectviewRect = nil 
) const
pure virtual

Draws all visible ICF Box rects for the current grid.

Parameters
drawCJKGridIN The IDrawCJKGrid to draw with.
viewRectIN The visible rect. If nil, the parent's rect will be used.
Returns
kTrue if the grid did draw. Otherwise kFalse.
virtual const Int32List& ICJKGridManager::GetCharsPerLine () const
pure virtual
Returns
a list of int32s that contain the characters per line for each column the grid manager controls. This will only contain one entry in the case of a multi-column text frame, because each column has its own grid manager. For the case of a multi-column page it will contain one entry for each column.
virtual void ICJKGridManager::GetGridBounds (PMRectrect) const
pure virtual

Fills in the PMRect at & rect with the bounds of the grid.

Parameters
rectOUT The bounds of the grid.
Precondition
rect must be a valid addresss.
virtual PMReal ICJKGridManager::GetHCellSize () const
pure virtual
Returns
the horizontally scaled size of the grid cell
virtual void ICJKGridManager::GetICFAdjustments (PMRealxAdjustment,
PMRealyAdjustment 
) const
pure virtual

Provides the x and y distances between the em and icf box.

Parameters
xAdjustmentOUT The x distance between the left of the em and icf box.
yAdjustmentOUT The y distance between the bottom of the em and icf box.
Precondition
xAdjustment and yAdjustment must be valid addresses.
virtual PMRect ICJKGridManager::GetNthEmBoxRect (const int32 cellNumber) const
pure virtual
Parameters
cellNumberIN which cell do we want the bounds of.
Returns
The rect of the Nth EmBox.
virtual PMRect ICJKGridManager::GetNthICFBoxRect (const int32 cellNumber) const
pure virtual
Parameters
cellNumberIN which cell do we want the bounds of.
Returns
The rect of the Nth ICFBox.
virtual int32 ICJKGridManager::GetNumOfLines () const
pure virtual
Returns
The number of lines in the grid.
virtual int32 ICJKGridManager::GetRectCount () const
pure virtual
Returns
The number of cells in this grid managers control.
virtual PMReal ICJKGridManager::GetVCellSize () const
pure virtual
Returns
the vertically scaled size of the grid cell
virtual bool16 ICJKGridManager::IsActive () const
pure virtual

Returns the calculated state of the grid. Note that this might lag the value returned from the controlling ICJKGrid (such as the Story) because the manager of the layout (such as the MultiColumnTextFrame) has not caught up with the change.

Returns
kTrue if the grid has been recalculated and found active, kFalse otherwise
virtual bool16 ICJKGridManager::IsGridRectangular () const
pure virtual
Returns
kTrue if this is a rectangular grid. Otherwise kFalse.
virtual bool16 ICJKGridManager::IsGridVertical () const
pure virtual
Returns
kTrue if this is a vertical grid. Otherwise kFalse.
virtual bool16 ICJKGridManager::MoveToClosestBaseline (PMPointthePoint,
const PMMatrixtransform = nil,
const PMRealextra = PMReal(0.0) 
) const
pure virtual

Moves thePoint to the closest baseline, then adds extra to the y value of thePoint, and then transforms.

Parameters
thePointINOUT the point to adjust.
transformIN The transform apply before moving the point.
extraIN The extra distance to add after finding the closest bottom.
Returns
virtual bool16 ICJKGridManager::MoveToClosestCenter (PMPointthePoint,
const PMMatrixtransform = nil,
const PMRealextra = PMReal(0.0) 
) const
pure virtual

Moves thePoint to the closest center, then adds extra to the x value of thePoint, and then transforms.

Parameters
thePointINOUT the point to adjust.
transformIN The transform apply before moving the point.
extraIN The extra distance to add after finding the closest bottom.
Returns
virtual bool16 ICJKGridManager::MoveToClosestEmBoxBottom (PMPointthePoint,
const PMMatrixtransform = nil,
const PMRealextra = PMReal(0.0) 
) const
pure virtual

Moves thePoint to the closest em box bottom, then adds extra to the x value of thePoint, and then transforms.

Parameters
thePointINOUT the point to adjust.
transformIN The transform apply before moving the point.
extraIN The extra distance to add after finding the closest bottom.
Returns
virtual bool16 ICJKGridManager::MoveToClosestEmBoxLeft (PMPointthePoint,
const PMMatrixtransform = nil,
const PMRealextra = PMReal(0.0) 
) const
pure virtual

Moves thePoint to the closest em box left then adds extra to the x value of thePoint, then transforms.

Parameters
thePointINOUT the point to adjust.
transformIN The transform apply before moving the point.
extraIN The extra distance to add after finding the closest left.
Returns
virtual bool16 ICJKGridManager::MoveToClosestEmBoxRight (PMPointthePoint,
const PMMatrixtransform = nil,
const PMRealextra = PMReal(0.0) 
) const
pure virtual

Moves thePoint to the closest em box right, then adds extra to the x value of thePoint, and then transforms.

Parameters
thePointINOUT the point to adjust.
transformIN The transform apply before moving the point.
extraIN The extra distance to add after finding the closest right.
Returns
virtual bool16 ICJKGridManager::MoveToClosestEmBoxTop (PMPointthePoint,
const PMMatrixtransform = nil,
const PMRealextra = PMReal(0.0) 
) const
pure virtual

Moves thePoint to the closest em box top, then adds extra to the x value of thePoint, and then transforms.

Parameters
thePointINOUT the point to adjust.
transformIN The transform apply before moving the point.
extraIN The extra distance to add after finding the closest top.
Returns
virtual bool16 ICJKGridManager::MoveToClosestICFBoxBottom (PMPointthePoint,
const PMMatrixtransform = nil,
const PMRealextra = PMReal(0.0) 
) const
pure virtual

Moves thePoint to the closest icf box bottom, then adds extra to the x value of thePoint, and then transforms.

Parameters
thePointINOUT the point to adjust.
transformIN The transform apply before moving the point.
extraIN The extra distance to add after finding the closest bottom.
Returns
virtual bool16 ICJKGridManager::MoveToClosestICFBoxLeft (PMPointthePoint,
const PMMatrixtransform = nil,
const PMRealextra = PMReal(0.0) 
) const
pure virtual

MoveToClosestICFBoxLeft moves thePoint to the closest icf box left then adds extra to the x value of thePoint, then transforms.

Parameters
thePointINOUT the point to adjust.
transformIN The transform apply before moving the point.
extraIN The extra distance to add after finding the closest left.
Returns
virtual bool16 ICJKGridManager::MoveToClosestICFBoxRight (PMPointthePoint,
const PMMatrixtransform = nil,
const PMRealextra = PMReal(0.0) 
) const
pure virtual

Moves thePoint to the closest icf box right, then adds extra to the x value of thePoint, and then transforms.

Parameters
thePointINOUT the point to adjust.
transformIN The transform apply before moving the point.
extraIN The extra distance to add after finding the closest right.
Returns
virtual bool16 ICJKGridManager::MoveToClosestICFBoxTop (PMPointthePoint,
const PMMatrixtransform = nil,
const PMRealextra = PMReal(0.0) 
) const
pure virtual

Moves thePoint to the closest icf box top, then adds extra to the x value of thePoint, and then transforms.

Parameters
thePointINOUT the point to adjust.
transformIN The transform apply before moving the point.
extraIN The extra distance to add after finding the closest top.
Returns
virtual void ICJKGridManager::RecalcGrid ()
pure virtual

Calculates and caches cell counts, grid data, scaled size, and more.

Parameters
dynamicBoundsIN Optional argument specifying the bounds of the grid during dynamic resize.