THuiMetric Struct Reference

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.

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()

THuiMetric Abs ( ) const [inline]

Returns a copy of the metric with the absolute value of the magnitude component.

operator*(TReal32)

THuiMetric operator* ( TReal32 aValue ) const [inline]

Parameters

TReal32 aValue

Member Data Documentation

TReal32 iMagnitude

TReal32 iMagnitude

TInt iReferenceTextStyleId

TInt iReferenceTextStyleId

CHuiTextStyleManager::TextStyle

TInt iSpare1

TInt iSpare1 [private]

TInt iSpare2

TInt iSpare2 [private]

TInt iUnit

TInt iUnit