![]() | InDesign SDK 20.5 |

Public Member Functions | |
| CstUni (IPMUnknown *boss) | |
| virtual | ~CstUni () |
| virtual PMReal | UnitsToPoints (const PMReal &units) const |
| virtual PMReal | PointsToUnits (const PMReal &points) const |
| virtual PMReal | GetSmallIncrement () const |
| virtual PMReal | GetLargeIncrement () const |
| virtual void | GetName (PMString *pName) |
| virtual void | Format (const PMReal &units, PMString &str, PMString *fractionalPortionString) const |
| virtual bool16 | Parse (const PMString &str, PMReal &points, const bool16 alwaysUseEnglishAbbreviations) |
| virtual RsrcSpec | GetRulerSpecRsrcSpec () const |
| virtual IUnitOfMeasure::UnitFlags | GetUnitFlags () const |
| virtual ScriptID | GetScriptID (const ScriptInfo::RequestContext &) const |
Public Member Functions inherited from CUnitOfMeasure | |
| CUnitOfMeasure (IPMUnknown *boss) | |
Additional Inherited Members | |
Public Types inherited from IUnitOfMeasure | |
| enum | UnitFlags { kUnitIsXMeasure = 0x0001, kUnitIsYMeasure = 0x0002, kUnitIsTextMeasure = 0x0004, kUnitIsTextSizeMeasure = 0x0008, kUnitIsPrintMeasure = 0x0010, kUnitIsLineMeasure = 0x0020 } |
Protected Member Functions inherited from CUnitOfMeasure | |
| virtual bool16 | EvaluateRemoveLeadingNumber (PMString *strInOut, PMReal *numOut, bool16 *isNegOut=nil) |
| virtual void | FormatFractionalPortion (PMReal units, PMString *outStr, int32 nDecimalPlaces=3, bool16 bStripTrailingZeros=kTrue) const |
CstUni Methods provide for the conversion between the points and the custom units, formatting and tokenization, the ruler resource for the custom units.
Implements IUnitOfMeasure based on the partial implementation of CUnitOfMeasure.
| inline |
Constructor.
| boss | interface ptr from boss object on which this interface is aggregated. |
| inlinevirtual |
Destructor.
| virtual |
Get the format for the custom units.
Implements IUnitOfMeasure.
| virtual |
Get the large increment for the ruler of this custom units.
Reimplemented from CUnitOfMeasure.
| virtual |
Get the name of the custom units.
Implements IUnitOfMeasure.
| virtual |
Get the ruler resource spec for the custom units.
Implements IUnitOfMeasure.
| inlinevirtual |
Returns the ScriptID associated with this unit of measure in the given scripting DOM
Implements IUnitOfMeasure.
| virtual |
Get the small increment for the ruler of this custom units.
Reimplemented from CUnitOfMeasure.
| virtual |
Get the unit flag which this unit will be used in UI.
Reimplemented from CUnitOfMeasure.
| virtual |
Parse the string and convert it to the points.
Implements IUnitOfMeasure.
Convert from points to custom units. For the purpose of this example, assuming that one custom unit is equal to 20 points.
| points | the points. |
Implements IUnitOfMeasure.
| virtual |
Convert from custom units to points. For the purpose of this example, assuming that one custom unit is equal to 20 points.
| units | the custom units. |
Implements IUnitOfMeasure.