#include <ICJKGridUtils.h>
|
| enum | { kDefaultIID = IID_ICJKGRIDUTILS } |
| |
| enum | WhichAttributes { kParaAttributes = 1, kCharAttributes = 2, kAllAttributes = 3 } |
| |
|
| virtual IPMUnknown * | QueryLayoutGrid (const IPMUnknown *thePage, PMIID iid=IID_ICJKLAYOUTGRIDDATA)=0 |
| |
| virtual ICJKGridManager * | QueryLayoutGridManager (const IPMUnknown *thePage)=0 |
| |
| virtual void | DrawCirclePath (IGraphicsPort *gPort, const PMRect &bounds)=0 |
| |
| virtual bool16 | MoveAcrossSingleColumn (PMReal &newCord, PMReal colStart, const PMReal &colEnd, const PMReal &spacing, bool16 onlyAdvance, const PMReal &extra)=0 |
| |
| virtual UID | ConvertFontUID (UID sourceUID, IDataBase *srcDB, IDataBase *destDB)=0 |
| |
| virtual PMPoint | MeasureString (const PMString &str, const PMReal &fontSize, const PMReal &scaleX, const PMReal &scaleY)=0 |
| |
| virtual PMReal | CJKGridGetQTextSize ()=0 |
| |
| virtual bool16 | TextFrameDrawsCJKCharCount (const IPMUnknown *obj)=0 |
| |
| virtual void | ApplyAttributesToGridData (const AttributeBossList &attributeBossList, ICJKGridData *cjkGridData, bool16 isVertical)=0 |
| |
| virtual void | ApplyGridLeadingToAttributes (const ICJKGridData *gridData, AttributeBossList *attrBossList, bool16 isVertical)=0 |
| |
| virtual void | ApplyGridDataToAttributes (const ICJKGridData *cjkGridData, AttributeBossList *attributeBossList, ICJKGridUtils::WhichAttributes whichAttributes=ICJKGridUtils::kAllAttributes)=0 |
| |
| virtual ErrorCode | ApplyGridDataToAttributeLists (const UIDList &itemList)=0 |
| |
| virtual IPMFont * | QueryCharacterCountFont ()=0 |
| |
| virtual void | SetupSetCJKGridDataCmd (UID namedGridUID, ICJKGridData *gridData, UIDList &itemList, ICommand *cmd)=0 |
| |
| virtual void | AdjustFrameEndPoint (const UIDRef &parent, const bool16 &bVertical, const PMPoint &location, PMPoint &defaultEndPoint, int32 &xUnits, int32 &yUnits)=0 |
| |
| virtual void | CalcCJKGridMetrics (const UIDRef &parent, const PBPMPoint &pt, const bool16 &bVertical, PMReal &lineOkuri, PMReal &charOkuri, PMReal &lineAki, PMReal &charAki)=0 |
| |
| virtual void | GetCJKGridMetrics (const UIDRef &parent, const PBPMPoint &pt, PMReal &textSize, PMReal &charAki, PMReal &lineAki, PMReal &hScale, PMReal &vScale)=0 |
| |
| virtual IPMUnknown * | QueryInterface (PMIID interfaceID) const =0 |
| |
| virtual void | AddRef () const =0 |
| |
| virtual void | Release () const =0 |
| |
ICJKGridUtils is the interface for utilities related to the CJK grid.
| virtual void ICJKGridUtils::AdjustFrameEndPoint | ( | const UIDRef & | parent, | | | const bool16 & | bVertical, | | | const PMPoint & | location, | | | PMPoint & | defaultEndPoint, | | | int32 & | xUnits, | | | int32 & | yUnits | | ) | | |
| pure virtual |
Adjust the right bottom point of the newly created frame grid which holds the passed in story.
- Parameters
| parent | IN the parent object where the frame is in. |
| bVertical | IN the direction of the frame. |
| location | IN the left top point of the frame. |
| defaultEndPoint | OUT the right bottom point of the frame. |
| xUnits | OUT x units for adjusting defaultEndPoint.X(). |
| yUnits | OUT y units for adjusting defaultEndPoint.Y(). |
| virtual void ICJKGridUtils::ApplyAttributesToGridData | ( | const AttributeBossList & | attributeBossList, | | | ICJKGridData * | cjkGridData, | | | bool16 | isVertical | | ) | | |
| pure virtual |
Applies to cjkGridData based on the attributes passed in.
- Parameters
| attributeBossList | IN Attributes that will be used to determine ICJKGridData. |
| cjkGridData | OUT The ICJKGridData you want filled out. |
- Precondition
- attributeBossList should be complete.
| virtual ErrorCode ICJKGridUtils::ApplyGridDataToAttributeLists | ( | const UIDList & | itemList | ) | |
| pure virtual |
| virtual void ICJKGridUtils::ApplyGridDataToAttributes | ( | const ICJKGridData * | cjkGridData, | | | AttributeBossList * | attributeBossList, | | | ICJKGridUtils::WhichAttributes | whichAttributes = ICJKGridUtils::kAllAttributes | | ) | | |
| pure virtual |
Applies to attributeBossList based on ICJKGridData
- Parameters
| cjkGridData | IN The ICJKGridData you want attributes for. |
| attributeBossList | OUT The list to apply to. |
| isVertical | IN Whether or not object containing attributes is of the vertical writing direction. |
Applies auto leading at some percent that matches the line okuri of the grid.
- Parameters
| gridData | IN The ICJKGridData to pull line okuri from. |
| *attrBossList | OUT The attributes we are applying to. |
| virtual void ICJKGridUtils::CalcCJKGridMetrics | ( | const UIDRef & | parent, | | | const PBPMPoint & | pt, | | | const bool16 & | bVertical, | | | PMReal & | lineOkuri, | | | PMReal & | charOkuri, | | | PMReal & | lineAki, | | | PMReal & | charAki | | ) | | |
| pure virtual |
Calculate the CJK grid metric.
- Parameters
| parent | IN the parent object where the frame is. |
| pt | IN the click point on the layout in PasteBoard coordinates |
| bVertical | IN the direction of the frame. |
| lineOkuri | OUT Okuri for line. |
| charOkuri | OUT Okuri for char. |
| lineAki | OUT x Aki for line. |
| charAki | OUT y Aki for char. |
| virtual PMReal ICJKGridUtils::CJKGridGetQTextSize | ( | | ) | |
| pure virtual |
- Returns
- default 13Q in points.
Converts sourceUID from srcDB to destDB, creating it if it doesn't exist.
- Parameters
| sourceUID | IN Source font UID. |
| srcDB | IN Source database. |
| destDB | IN Destination database. |
- Returns
- UID for font in destDB.
Puts the path of a circle into the gPort
- Parameters
| gPort | IN The IGraphicsPort you want to draw the circle into. |
| bounds | IN The rectangular bounds of the circle. |
Calculate the CJK grid metric.
- Parameters
| parent | IN the parent object where the frame is. |
| pt | IN the click point on the layout in PasteBoard coordinates |
| textSize | OUT textSize for grid. |
| charAki | OUT x Aki for char. |
| lineAki | OUT y Aki for line. |
| hScale | OUT x scale. |
| vScale | OUT y scale |
- Parameters
| str | IN The string you want to measure. |
| fontSize | IN The font size. |
| scaleX | IN The x scale factor. |
| scaleY | IN The y scale factor. |
- Returns
- Height in width in PMPoint x/y.
| virtual bool16 ICJKGridUtils::MoveAcrossSingleColumn | ( | PMReal & | newCord, | | | PMReal | colStart, | | | const PMReal & | colEnd, | | | const PMReal & | spacing, | | | bool16 | onlyAdvance, | | | const PMReal & | extra | | ) | | |
| pure virtual |
Moves newCord to the next closest grid boundary.
- Parameters
| newCord | IN/OUT Coordinate you would like to move to the next closest grid boundary. |
| colStart | IN Coordinate of column start. |
| colEnd | IN Coordinate of column end. |
| spacing | IN Space between each grid boundary. |
| onlyAdvance | IN kTrue if newCord only advances and never moves back. |
| extra | IN Any extra space that will be added after newCord is aligned to the next grid boundary. |
- Returns
- kTrue when newCord is moved.
| virtual IPMFont* ICJKGridUtils::QueryCharacterCountFont | ( | | ) | |
| pure virtual |
Returns an IPMFont * for the character count adornment's font. This will be KozGoStd-Regular if available, or the default system font.
- Returns
- An IPMFont of the character count adornment's font.
- Postcondition
- Returned IPMFont must be released by the caller.
Queries the proper interface for thePage. The master page's instance is returned if a master is used.
- Parameters
| thePage | IN An interface on the kPageBoss you want to query on. |
| iid | IN The desired PMIID or IID_ICJKLAYOUTGRIDDATA by default. |
- Returns
- A pointer to interface instance.
- Postcondition
- Caller must release returned interface.
Queries the proper ICJKGridManager for thePage. The master page's instance is returned if a master is used and no column, margin, or grid overrides have taken place.
- Parameters
| thePage | IN An interface on the kPageBoss you want to query on. |
- Returns
- Pointer to ICJKGridManager or nil on failure.
- Postcondition
- Caller must release returned interface.
Set up the command data for SetCJKGridDataCmd.
- Parameters
| namedGridUID | IN The UID of named grid may be used in the command data. |
| gridData | IN The gridData for the selected page. |
| itemList | IN The items the command applies to. |
| cmd | IN The command which the command data attached to. |
| virtual bool16 ICJKGridUtils::TextFrameDrawsCJKCharCount | ( | const IPMUnknown * | obj | ) | |
| pure virtual |
Returns whether or not a text frame contains a characer count
- Parameters
| obj | IN Interface on text frame boss (kFrameItemBoss or kMultiColumnFrameBoss). |
- Returns
- kTrue if it is an active frame grid with a visible character count