Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



Location: gulalign.h
Link against: egul.lib

Class TGulAlignment

TGulAlignment

Support

Supported from 6.0

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.

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


Construction


TGulAlignment()

TGulAlignment();

Description

Default constructor.


TGulAlignment()

TGulAlignment(TGulAlignmentValue aValue);

Description

Constructor initialising the object with an alignment value.

Parameters

TGulAlignmentValue aValue

The alignment value.

[Top]


Member functions


TGulAlignmentValue()

operator TGulAlignmentValue() const;

Description

Gets the object's alignment value (TGulAlignmentValue).


VAlignment()

TGulVAlignment VAlignment() const;

Description

Gets the vertical alignment.

Return value

TGulVAlignment

Vertical alignment.


HAlignment()

TGulHAlignment HAlignment() const;

Description

Gets the horizontal alignment.

Return value

TGulHAlignment

Horizontal alignment.


TextAlign()

CGraphicsContext::TTextAlign TextAlign() const;

Description

Gets the horizontal text alignment.

Return value

CGraphicsContext::TTextAlign

On return, provides the horizontal text alignment.


SetVAlignment()

void SetVAlignment(TGulVAlignment aVAlign);

Description

Sets the vertical alignment.

Parameters

TGulVAlignment aVAlign

The vertical alignment.


SetHAlignment()

void SetHAlignment(TGulHAlignment aHAlign);

Description

Sets the horizontal alignment.

Parameters

TGulHAlignment aHAlign

The horizontal alignment.


InnerTopLeft()

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()

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.