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.

Public Member Functions
TMargins8()
TMargins8(TInt8, TInt8, TInt8, TInt8)
IMPORT_C TRectInnerRect(const TRect &)
IMPORT_C TRectOuterRect(const TRect &)
IMPORT_C voidSetAllValuesTo(TInt)
IMPORT_C TSizeSizeDelta()
Public Attributes
TInt8 iBottom
TInt8 iLeft
TInt8 iRight
TInt8 iTop

Constructor & Destructor Documentation

TMargins8()

IMPORT_CTMargins8()

The constructor initialises all four margins to zero.

TMargins8(TInt8, TInt8, TInt8, TInt8)

IMPORT_CTMargins8(TInt8aLeft,
TInt8aTop,
TInt8aRight,
TInt8aBottom
)

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

Parameters

TInt8 aLeftLeft margin (between -128 and +127)
TInt8 aTopTop margin (between -128 and +127)
TInt8 aRightRight margin (between -128 and +127)
TInt8 aBottomBottom margin (between -128 and +127)

Member Functions Documentation

InnerRect(const TRect &)

IMPORT_C TRectInnerRect(const TRect &aOuterRect)const

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

Parameters

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

OuterRect(const TRect &)

IMPORT_C TRectOuterRect(const TRect &aInnerRect)const

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

Parameters

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

SetAllValuesTo(TInt)

IMPORT_C voidSetAllValuesTo(TIntaCommonValue)

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

Parameters

TInt aCommonValueThe new value for all margins.

SizeDelta()

IMPORT_C TSizeSizeDelta()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.