THuiMetric Struct Reference
A Metric is used to represent a value in a specified unit type. This is to support the definition of Layouts using screen-size independent as well as screen-size dependent measurements.
The metrics are used for different things in different contexts: coordinate base units, anchor offsets, grid column/row weights, paddings, etc. The interpretation of the units used in the metric depends on the context, the type of Layout in which they are used, etc.
Constructor & Destructor Documentation
THuiMetric(TReal32, TInt, TInt)
IMPORT_C | THuiMetric | ( | TReal32 | aMagnitude = 1.f, |
| TInt | aUnit = EHuiUnitPixel, |
| TInt | aReferenceTextStyleId = EHuiTextStyleNormal |
| ) | |
Constructor. The constructor defaults to using [1px] units.
Parameters
TReal32 aMagnitude = 1.f | the size of the metric value, for example it may represent a length or a scale factor |
TInt aUnit = EHuiUnitPixel | the unit type in which the metric value is represented |
TInt aReferenceTextStyleId = EHuiTextStyleNormal | |
THuiMetric(TInt)
IMPORT_C | THuiMetric | ( | TInt | aPixels | ) | |
Constructor. Allows the compiler to pass integers instead of THuiMetric in parameters, in place of pixel metrics.
Parameters
TInt aPixels | Number of pixels for the metric. |
Member Functions Documentation
Abs()
Returns a copy of the metric with the absolute value of the magnitude component.
Member Data Documentation
TInt
iReferenceTextStyleId
TInt
| iReferenceTextStyleId |
CHuiTextStyleManager::TextStyle
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.