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_CTHuiMetric(TReal32aMagnitude = 1.f,
TIntaUnit = EHuiUnitPixel,
TIntaReferenceTextStyleId = EHuiTextStyleNormal
)

Constructor. The constructor defaults to using [1px] units.

Parameters

TReal32 aMagnitude = 1.fthe size of the metric value, for example it may represent a length or a scale factor
TInt aUnit = EHuiUnitPixelthe unit type in which the metric value is represented
TInt aReferenceTextStyleId = EHuiTextStyleNormal

THuiMetric(TInt)

IMPORT_CTHuiMetric(TIntaPixels)

Constructor. Allows the compiler to pass integers instead of THuiMetric in parameters, in place of pixel metrics.

Parameters

TInt aPixelsNumber 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*(TReal32aValue)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