Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: gulutil.h
Link against: egul.lib

Class TMargins8

class TMargins8;

Description

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

Members

Defined in TMargins8:
InnerRect(), OuterRect(), SetAllValuesTo(), SizeDelta(), TMargins8(), TMargins8(), iBottom, iLeft, iRight, iTop


Construction and destruction


TMargins8()

IMPORT_C TMargins8();

Description

The constructor initialises all four margins to zero.


TMargins8()

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

Description

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)

[Top]


Member functions


SetAllValuesTo()

IMPORT_C void SetAllValuesTo(TInt aCommonValue);

Description

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

Parameters

TInt aCommonValue

The new value for all margins.


InnerRect()

IMPORT_C TRect InnerRect(const TRect &aOuterRect) const;

Description

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.

Return value

TRect

Inner rectangle.


OuterRect()

IMPORT_C TRect OuterRect(const TRect &aInnerRect) const;

Description

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.

Return value

TRect

Outer rectangle.


SizeDelta()

IMPORT_C TSize SizeDelta() const;

Description

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

Return value

TSize

Size difference between outer and inner rectangles.

[Top]


Member data


iLeft

TInt8 iLeft;

Description

Left margin in twips or pixels.


iRight

TInt8 iRight;

Description

Right margin in twips or pixels.


iTop

TInt8 iTop;

Description

Top margin in twips or pixels.


iBottom

TInt8 iBottom;

Description

Bottom margin in twips or pixels.