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

voidaddWidget(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 & aWidgetChild widget to be added to container.

applyLayout(IAlfLayoutManager &)

voidapplyLayout(IAlfLayoutManager &aLayout)[pure virtual]

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

Parameters

IAlfLayoutManager & aLayoutNew base layout of container widget.

getWidget(int)

IAlfWidget *getWidget(intaIndex)const [pure virtual]

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

Parameters

int aIndexIndex of widget to be returned.

getWidgetIndex(IAlfWidget &)

intgetWidgetIndex(IAlfWidget &aWidget)const [pure virtual]

Returns the child index, when given the child widget.

Parameters

IAlfWidget & aWidgetchild widget, which index is returned

removeWidget(int)

voidremoveWidget(intaIndex)[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 aIndexIndex from which widget has to be removed.

type()

const IfId &type()[static, inline]

widgetCount()

intwidgetCount()const [pure virtual]

Returns total number of widgets contained by this container.