#include <IUnitOfMeasure.h>
IUnitOfMeasure represents a unit of measurement in the measurement system.
- See Also
- IMeasurementSystem
Unit Type Flags
| Enumerator |
|---|
| kUnitIsXMeasure | use this unit in X measurements on spread |
| kUnitIsYMeasure | use this unit in Y measurements on spread |
| kUnitIsTextMeasure | use this unit in typographic distance measurements (excludes text size) |
| kUnitIsTextSizeMeasure | use this unit in text size measurements |
| kUnitIsPrintMeasure | use this unit in print dialog measurements |
| kUnitIsLineMeasure | use this unit in line dialog measurements |
| virtual void IUnitOfMeasure::Format | ( | const PMReal & | units, | | | PMString & | str, | | | PMString * | fractionalPortionString = nil | | ) | | const |
| pure virtual |
Format a value in this unit as a string
Implemented in CstUni, and Points.
| virtual PMReal IUnitOfMeasure::GetLargeIncrement | ( | | ) | const |
| pure virtual |
| virtual void IUnitOfMeasure::GetName | ( | PMString * | pName | ) | |
| pure virtual |
Return the name of this unit
Implemented in CstUni, and Points.
| virtual RsrcSpec IUnitOfMeasure::GetRulerSpecRsrcSpec | ( | | ) | const |
| pure virtual |
Get the ruler spec for this unit
Implemented in CstUni, and Points.
Returns the ScriptID associated with this unit of measure in the given scripting DOM
Implemented in CstUni, and Points.
| virtual PMReal IUnitOfMeasure::GetSmallIncrement | ( | | ) | const |
| pure virtual |
| virtual UnitFlags IUnitOfMeasure::GetUnitFlags | ( | | ) | const |
| pure virtual |
| virtual bool16 IUnitOfMeasure::Parse | ( | const PMString & | str, | | | PMReal & | points, | | | const bool16 | alwaysUseEnglishAbbreviations = kFalse | | ) | | |
| pure virtual |
Parse a string like "1 in" into points. str IN, the string to be parsed
- Parameters
| points | OUT, the resulting points alwaysUseEnglishAbbreviations IN, whether to always use the English abbreviations for units such as "in". If false then the translation of the string in the current locale is used. |
- Returns
- bool16, Whether the parsing succeeded.
Implemented in CstUni, and Points.
| virtual PMReal IUnitOfMeasure::PointsToUnits | ( | const PMReal & | points | ) | const |
| pure virtual |
Convert a value in points to this unit
Implemented in CstUni, and Points.
| virtual PMReal IUnitOfMeasure::UnitsToPoints | ( | const PMReal & | units | ) | const |
| pure virtual |
Convert a value in this unit to points
Implemented in CstUni, and Points.