Alf::IAlfContainerWidget Class Reference

class Alf::IAlfContainerWidget : public Alf::IAlfWidget

The interface for container widget.

Container widget maintains it's own control group. When a widget control is set to container widget throught the IAlfWidget::setControl() - method the control is automatically appended to the container widget's control group. If the control that is being set to the container widget is already part of another control group it will be removed from the previous control group and appended to the container widget's control group.

alfwidgetmodel.lib
Since
S60 ?S60_version Draft

Inherits from

Constructor & Destructor Documentation

~IAlfContainerWidget()

~IAlfContainerWidget ( ) [inline, virtual]

Member Functions Documentation

addWidget(IAlfWidget &)

void addWidget ( IAlfWidget & aWidget ) [pure virtual]

Adds a child widget to the container.

This will throw an osncore::AlfException exception with error code osncore::EInvalidArgument if the aWidget is the same widget that the container widget itself or if user tries to add a view widget into a container widget.

Adding a widget instance that is already added will be silently ignored.

Exceptions
osncore::AlfException

with error code osncore::EInvalidArgument if the aWidget is the same widget as the container widget or when a view widget is attempted to be added to a container.

Parameters

IAlfWidget & aWidget Child widget to be added to container.

applyLayout(IAlfLayoutManager &)

void applyLayout ( IAlfLayoutManager & aLayout ) [pure virtual]

Sets the base layout of container widget. Ownership of the layout manager is transferred to container widget.

Parameters

IAlfLayoutManager & aLayout New base layout of container widget.

getWidget(int)

IAlfWidget * getWidget ( int aIndex ) const [pure virtual]

Returns child widget at given index. If index is not found return null.

Parameters

int aIndex Index of widget to be returned.

getWidgetIndex(IAlfWidget &)

int getWidgetIndex ( IAlfWidget & aWidget ) const [pure virtual]

Returns the child index, when given the child widget.

Parameters

IAlfWidget & aWidget child widget, which index is returned

removeWidget(int)

void removeWidget ( int aIndex ) [pure virtual]

Removes the child widget from given index.

If widget for the given index is not found then the call is silently ignored.

Parameters

int aIndex Index from which widget has to be removed.

type()

const IfId & type ( ) [static, inline]

widgetCount()

int widgetCount ( ) const [pure virtual]

Returns total number of widgets contained by this container.