struct THuiMetric |
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.
Public Member Functions | |
---|---|
THuiMetric ( TReal32 , TInt , TInt ) | |
THuiMetric ( TInt ) | |
THuiMetric | Abs () |
THuiMetric | operator* ( TReal32 ) |
Public Attributes | |
---|---|
TReal32 | iMagnitude |
TInt | iReferenceTextStyleId |
TInt | iUnit |
Private Attributes | |
---|---|
TInt | iSpare1 |
TInt | iSpare2 |
IMPORT_C | THuiMetric | ( | TReal32 | aMagnitude = 1.f, |
TInt | aUnit = EHuiUnitPixel, | |||
TInt | aReferenceTextStyleId = EHuiTextStyleNormal | |||
) |
Constructor. The constructor defaults to using [1px] units.
IMPORT_C | THuiMetric | ( | TInt | aPixels | ) |
Constructor. Allows the compiler to pass integers instead of THuiMetric in parameters, in place of pixel metrics.
TInt aPixels | Number of pixels for the metric. |
THuiMetric | Abs | ( | ) | const [inline] |
Returns a copy of the metric with the absolute value of the magnitude component.
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.