UIQ Technology
Symbian OS Library

UIQ 3.1 SDK        UIQ developer portal

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



Location: GULALIGN.H
Link against: egul.lib

Class TGulAlignment

class TGulAlignment;

Description

Provides a convenient way to describe horizontal and vertical layouts of rectangular objects and to enquire how they occupy an area given their alignment.

Members

Defined in TGulAlignment:
HAlignment(), InnerRect(), InnerTopLeft(), SetHAlignment(), SetHAlignment(), SetVAlignment(), TGulAlignment(), TGulAlignment(), TGulAlignment(), TextAlign(), VAlignment(), operator TGulAlignmentValue()


Construction and destruction


TGulAlignment()

inline TGulAlignment();

Description

Default constructor.


TGulAlignment()

inline TGulAlignment(TGulAlignmentValue aValue);

Description

Constructor initialising the object with an alignment value.

Parameters

TGulAlignmentValue aValue

The alignment value.


TGulAlignment()

inline TGulAlignment(CGraphicsContext::TTextAlign aHAlign, TGulVAlignment aVAlign=EVTop);

Description

Constructor initialising the object with an alignment value.

Parameters

CGraphicsContext::TTextAlign aHAlign

The horizontal alignment value.

TGulVAlignment aVAlign

The vertical alignment value.

[Top]


Member functions


operator TGulAlignmentValue()

inline operator TGulAlignmentValue() const;

Description

Gets the object's alignment value (TGulAlignmentValue).

Return value


VAlignment()

inline TGulVAlignment VAlignment() const;

Description

Gets the vertical alignment.

Return value

TGulVAlignment

Vertical alignment.


HAlignment()

inline TGulHAlignment HAlignment() const;

Description

Gets the horizontal alignment.

Return value

TGulHAlignment

Horizontal alignment.


TextAlign()

inline CGraphicsContext::TTextAlign TextAlign() const;

Description

Gets the horizontal text alignment.

Return value

CGraphicsContext::TTextAlign

The horizontal text alignment.


SetVAlignment()

IMPORT_C void SetVAlignment(TGulVAlignment aVAlign);

Description

Sets the vertical alignment.

Parameters

TGulVAlignment aVAlign

The vertical alignment.


SetHAlignment()

IMPORT_C void SetHAlignment(TGulHAlignment aHAlign);

Description

Sets the horizontal alignment.

Parameters

TGulHAlignment aHAlign

The horizontal alignment.


SetHAlignment()

IMPORT_C void SetHAlignment(CGraphicsContext::TTextAlign aHAlign);

Description

Sets the horizontal alignment.

Parameters

CGraphicsContext::TTextAlign aHAlign

The horizontal alignment.


InnerTopLeft()

IMPORT_C TPoint InnerTopLeft(const TRect &aOuter, const TSize &aInnerSize) const;

Description

Gets the co-ordinates of the top left corner of an object of size aInnerSize, which is placed in the area of the rectangle aOuter according to the current alignment.

Parameters

const TRect &aOuter

The outer rectangle.

const TSize &aInnerSize

The size of the inner rectangle.

Return value

TPoint

The inner top left point.


InnerRect()

IMPORT_C TRect InnerRect(const TRect &aOuter, const TSize &aInnerSize) const;

Description

Gets the rectangle occupied by an object of size aInnerSize, which is placed in the area of the rectangle aOuter according to the current alignment.

Parameters

const TRect &aOuter

The outer rectangle.

const TSize &aInnerSize

The size of the inner rectangle.

Return value

TRect

The rectangle.