TMargins8 Class Reference

class TMargins8

A set of margins stored as 8 bit integer values which can represent either pixels or twips between -128 and +127.

Constructor & Destructor Documentation

TMargins8()

IMPORT_C TMargins8 ( )

The constructor initialises all four margins to zero.

TMargins8(TInt8, TInt8, TInt8, TInt8)

IMPORT_C TMargins8 ( TInt8 aLeft,
TInt8 aTop,
TInt8 aRight,
TInt8 aBottom
)

Constructor setting the left, top, right, and bottom margins.

Parameters

TInt8 aLeft Left margin (between -128 and +127)
TInt8 aTop Top margin (between -128 and +127)
TInt8 aRight Right margin (between -128 and +127)
TInt8 aBottom Bottom margin (between -128 and +127)

Member Functions Documentation

InnerRect(const TRect &)

IMPORT_C TRect InnerRect ( const TRect & aOuterRect ) const

Calculates and returns an inner rectangle by applying the margins to the specified outer rectangle.

Parameters

const TRect & aOuterRect The coordinates of the outer rectangle from which the inner rectangle is calculated.

OuterRect(const TRect &)

IMPORT_C TRect OuterRect ( const TRect & aInnerRect ) const

Calculates and returns an outer rectangle by applying the margins to the specified inner rectangle.

Parameters

const TRect & aInnerRect The coordinates of the inner rectangle from which the outer rectangle is calculated.

SetAllValuesTo(TInt)

IMPORT_C void SetAllValuesTo ( TInt aCommonValue )

Sets all four margins to a common value (between -128 and +127).

Parameters

TInt aCommonValue The new value for all margins.

SizeDelta()

IMPORT_C TSize SizeDelta ( ) const

Calculates and returns the difference in size between the outer and inner rectangles.

Member Data Documentation

TInt8 iBottom

TInt8 iBottom

Bottom margin in twips or pixels.

TInt8 iLeft

TInt8 iLeft

Left margin in twips or pixels.

TInt8 iRight

TInt8 iRight

Right margin in twips or pixels.

TInt8 iTop

TInt8 iTop

Top margin in twips or pixels.