Alf::AlfWidget Class Reference
class Alf::AlfWidget : public Alf::IAlfContainerWidget
|
Constructor & Destructor Documentation
AlfWidget(const char *, IAlfContainerWidget &, CAlfEnv &)
OSN_IMPORT
|
AlfWidget
|
(
|
const char *
|
aWidgetName,
|
|
IAlfContainerWidget
&
|
aContainer,
|
|
CAlfEnv &
|
aEnv
|
|
)
|
|
Constructor.
This will create a default control to the widget to enable the widget containment hierarchy from the beginning.
User
can replace the default control with custom control by calling the
setControl()
- method.
-
Exceptions
-
setControl()
Parameters
const char * aWidgetName
|
The name of the widget.
|
IAlfContainerWidget
& aContainer
|
Container widget that will contain this widget.
|
CAlfEnv & aEnv
|
Toolkit environment object that will be used to create the default control.
|
AlfWidget(const char *)
OSN_IMPORT
|
AlfWidget
|
(
|
const char *
|
aWidgetName
|
)
|
|
Parameters
const char * aWidgetName
|
The name of the widget.
|
AlfWidget()
OSN_IMPORT
|
AlfWidget
|
(
|
)
|
[protected]
|
The protected constructor.
~AlfWidget()
OSN_IMPORT
|
~AlfWidget
|
(
|
)
|
[virtual]
|
Destructor.
It also takes care that all the child widgets contained by this widget are destroyed correctly, provided that they have been instantiated correctly (e.g. through widget factory) and thus added to the ALF environment (CAlfEnv).
In other words, client code does not need to take care of destroying the child widgets contained by a container widget.
Member Functions Documentation
addCommonWidgetProperties()
void
|
addCommonWidgetProperties
|
(
|
)
|
[private]
|
Adds the Common Properties for the widget
addWidget(IAlfWidget &)
OSN_IMPORT void
|
addWidget
|
(
|
IAlfWidget
&
|
aWidget
|
)
|
[virtual]
|
Adds a child widget to the container.
Parameters
IAlfWidget
& aWidget
|
Child widget to be added to container. return void
|
applyLayout(IAlfLayoutManager &)
Sets the base layout of container widget.
control()
OSN_IMPORT
CAlfWidgetControl
*
|
control
|
(
|
)
|
const [virtual]
|
Constructor. The new widget is left on the cleanup stack.
getWidget(int)
OSN_IMPORT
IAlfWidget
*
|
getWidget
|
(
|
int
|
aIndex
|
)
|
const [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 &)
OSN_IMPORT int
|
getWidgetIndex
|
(
|
IAlfWidget
&
|
aWidget
|
)
|
const [virtual]
|
Returns the child index, when given the child widget.
Parameters
IAlfWidget
& aWidget
|
child widget, which index is returned
|
makeInterface(AlfWidget *, const IfId &)
Getter for interfaces provided by the widget, the control, or the model.
Parameters
AlfWidget
* aWidget
|
The widget to get the interface for.
|
const
IfId
& aType
|
The type id of the queried interface.
|
makeInterface(AlfWidget *)
T *
|
makeInterface
|
(
|
AlfWidget
*
|
aWidget
|
)
|
[static]
|
Template getter for interfaces provided by the widget, the control, or the model. The type of the queried interface is specified by the template parameter.
Parameters
AlfWidget
* aWidget
|
The widget to get the interface for.
|
makeInterface(const IfId &)
From
IAlfInterfaceBase
. Getter for interfaces provided by the widget classes. Derived classes should always call the base class method from the overridden MakeInterface.
Parameters
const
IfId
& aType
|
A descriptor to identify the type of the queried interface.
|
model()
Constructor. The new widget is left on the cleanup stack.
parent()
Getter for the parent container. The ownership is not passed.
removeReferenceFromControl()
void
|
removeReferenceFromControl
|
(
|
)
|
[private]
|
Removes reference from this widget's control to this widget.
removeWidget(int)
void
|
removeWidget
|
(
|
int
|
aIndex
|
)
|
[virtual]
|
Removes the child widget from given index.
Parameters
int aIndex
|
Index from which widget has to be removed. return void
|
removeWidget(IAlfWidget &)
OSN_IMPORT void
|
removeWidget
|
(
|
IAlfWidget
&
|
aWidget
|
)
|
|
Removes the given widget from this widget's child widget array. Does not modify control connections or control group containment.
Does nothing if the given widget is not found from widget array.
Parameters
IAlfWidget
& aWidget
|
Reference to a widget that is searched from the widget array of this widget and removed of found.
|
setChildFocus(bool)
OSN_IMPORT void
|
setChildFocus
|
(
|
bool
|
aFocus
|
)
|
[virtual]
|
Sets/Releases the Focus from child widget of container. Does not set the actual focused status in roster.
Parameters
bool aFocus
|
boolean value for focused status return void
|
setControl(CAlfWidgetControl *, bool)
OSN_IMPORT void
|
setControl
|
(
|
CAlfWidgetControl
*
|
aControl,
|
|
bool
|
aDeletePreviousControl = true
|
|
)
|
[virtual]
|
Sets new widget control to this widget.
-
Exceptions
-
osncore::AlfException
|
Thrown with error code osncore::EInvalidArgument if aControl is alreasy associated with another widget.
|
IAlfWidget::setControl()
-
Since
-
S60 ?S60_version
Parameters
CAlfWidgetControl
* aControl
|
Control to be set to the widget.
|
bool aDeletePreviousControl = true
|
If true, the previous widget control is destroyed.
|
setModel(IAlfModel *, bool)
OSN_IMPORT void
|
setModel
|
(
|
IAlfModel
*
|
aModel,
|
|
bool
|
aTakeOwnerShip = true
|
|
)
|
[virtual]
|
Sets the model for the Widget.
Parameters
IAlfModel
* aModel
|
Model to be set to this widget.
|
bool aTakeOwnerShip = true
|
|
setPresentation(const char *)
OSN_IMPORT void
|
setPresentation
|
(
|
const char *
|
aFilePath
|
)
|
[virtual]
|
Sets the presentation for the widget using presentation XML file. Destroys any existing presentation.
-
Exceptions
-
AlfWidgetException
|
if no visualization node available in Presentation XML or if no control is associated with the widget.
|
bad_alloc
|
|
-
Since
-
S60 ?S60_version
Parameters
const char * aFilePath
|
Path to XML file describing the presentation of the widget. Not Owned.
|
widgetCount()
OSN_IMPORT int
|
widgetCount
|
(
|
)
|
const [virtual]
|
Returns total number of widgets contained by this container.
widgetName()
OSN_IMPORT const char *
|
widgetName
|
(
|
)
|
const [virtual]
|
Constructor. The new widget is left on the cleanup stack.
Member Data Documentation
auto_ptr< AlfWidgetImpl > mImpl
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.