IAlignmentAttribute

The IAlignmentAttribute class represents horizontal and vertical alignments. This class is a data class that provides attribute objects to manipulate the alignment layout of a child window in a IMultiCellCanvas or ISetCanvas.

These functions do not affect the child window layout unless you call IWindow::addOrReplaceAttribute to associate the alignment attribute object with a child window.


IAlignmentAttribute - Member Functions and Data by Group

Constructors & Destructor

Creates an IAlignmentAttribute object with the specified horizontal and vertical alignments.


[view class]
~IAlignmentAttribute
public:
virtual ~IAlignmentAttribute()

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
IAlignmentAttribute


Overload 1
public:
IAlignmentAttribute( const IAlignmentAttribute& alignmentAttribute )

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Overload 2
public:
IAlignmentAttribute( EHorizontalAlignment horizontalAlignment, EVerticalAlignment verticalAlignment )
horizontalAlignment
The value from the enumeration EHorizontalAlignment.
verticalAlignment
The value from the enumeration EVerticalAlignment.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Alignment

Use these members to set and query alignment attributes.


[view class]
horizontalAlignment
public:
EHorizontalAlignment horizontalAlignment() const

Returns an enumerator identifying the horizontal alignment of the attribute. The returned value is an enumerator provided by EHorizontalAlignment.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
setHorizontalAlignment
public:
virtual IAlignmentAttribute& setHorizontalAlignment( EHorizontalAlignment horizontalAlignment )

Defines the horizontal alignment for the attribute. Use values from the enumeration EHorizontalAlignment to specify the horizontal alignment.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
setVerticalAlignment
public:
virtual IAlignmentAttribute& setVerticalAlignment( EVerticalAlignment verticalAlignment )

Defines the vertical alignment for the attribute. Use values from the enumeration EVerticalAlignment to specify the vertical alignment.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
verticalAlignment
public:
EVerticalAlignment verticalAlignment() const

Returns an enumerator identifying the vertical alignment of the attribute. The returned value is an enumerator provided by EVerticalAlignment.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Assignment

Use this member to assign alignment attributes.


[view class]
operator =
public:
IAlignmentAttribute& operator =( const IAlignmentAttribute& alignmentAttribute )

Assignment operator.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Cloning

Use this member to clone alignment attributes.


[view class]
clone
public:
virtual IAttribute* clone() const

Returns a polymorphic copy of the alignment attribute.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Equality

Use this member to test alignment attributes.


[view class]
operator ==
public:
virtual bool operator ==(const IAttribute& attribute) const

Tests two attributes for equality.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


IAlignmentAttribute - Enumerations


[view class]
EHorizontalAlignment
enum EHorizontalAlignment { kLeft, 
                            kRight, 
                            kCenter, 
                            kStretch }

Use the following enumerators to specify horizontal alignment of a child window: deck.

kLeft
Aligns a child window in the canvas to the left edge in its cell.
kRight
Aligns a child window in the canvas to the right edge in its cell.
kCenter
Aligns a child window in the canvas centered horizontally in its cell.
kStretch
Stretches the child window horizontally to fill its cell.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
EVerticalAlignment
enum EVerticalAlignment { kTop, 
                          kBottom, 
                          kCenterVertical, 
                          kStretchVertical }

Use the following enumerators to specify vertical alignment of a child window: deck.

kTop
Aligns a child window in the canvas to the top edge in its cell.
kBottom
Aligns a child window in the canvas to the bottom edge in its cell.
kCenterVertical
Aligns a child window in the canvas centered vertically in its cell.
kStretchVertical
Stretches the child window vertically to fill its cell.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


IAlignmentAttribute - Inherited Member Functions and Data

Inherited Public Functions

IAttribute

Inherited Public Data

Inherited Protected Functions

Inherited Protected Data