Alf::IAlfWidget Class Reference
class Alf::IAlfWidget : public Alf::IAlfInterfaceBase
|
An interface for all widgets. Widgets consist of a model and a control. The model is owned by the widget, but all controls are owned by Alfred environment. The widget can be queried for interfaces provided by derived widget classes, the control or the model. Widgets can be constructed using the widget factory. Widgets are owned and accessed using the Alfred environment.
alfwidgetmodel.lib
-
Since
-
S60 ?S60_version Draft
Constructor & Destructor Documentation
~IAlfWidget()
~IAlfWidget
|
(
|
)
|
[inline, virtual]
|
Member Functions Documentation
control()
CAlfWidgetControl
*
|
control
|
(
|
)
|
const [pure virtual]
|
Getter for the control. The ownership is not passed.
model()
Getter for the model. The ownership is not passed.
parent()
Getter for the parent container. The ownership is not passed.
setChildFocus(bool)
void
|
setChildFocus
|
(
|
bool
|
aFocus
|
)
|
[pure 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)
void
|
setControl
|
(
|
CAlfWidgetControl
*
|
aControl,
|
|
bool
|
aDeletePreviousControl = true
|
|
)
|
[pure virtual]
|
Sets a new widget control. After this call has been succesfully executed, the control is owned by this widget. When a new widget control is set to a widget the previously set widget control is removed.
Through the aDeletePreviousControl - parameter user can specify whether the previously set control is destroyed when new control is set. Otherwise the previous control is left on the ownership of the caller. The caller has to manually delete the control or reset it to another widget or control group.
If the control passed through this method exists in a control group it is appended to the control group of the view where this widget is contained in and removed from its previous control group.
Widget should always have a valid control. An
osncore::AlfException
is thrown with error code osncore::EInvalidArgument if a control that is already used in another widget is attempted to be used with this widget. You have to replace the control in the source widget first before you can reuse that control in the target widget. See two code snippets below for details:
// This will throw an osncore::AlfException with error code osncore::EInvalidArgument.
targetWidget.setControl(sourceWidget.control());
CAlfWidgetControl* control = sourceWidget.control();
sourceWidget.setControl(newControl, false);
// This is ok, since control is not set in sourceWidget anymore.
targetWidget.setControl(control);
IAlfViewWidget
-
Exceptions
-
osncore::AlfException
|
If the given control is already set to another widget an
osncore::AlfException
is thrown with error code osncore::EInvalidArgument.
|
Parameters
CAlfWidgetControl
* aControl
|
The new widget control to be used with this widget.
|
bool aDeletePreviousControl = true
|
If set to true will destroy the previously set control from UI Accelerator Toolkit Environment.
|
setModel(IAlfModel *, bool)
void
|
setModel
|
(
|
IAlfModel
*
|
aModel,
|
|
bool
|
aTakeOwnership = true
|
|
)
|
[pure virtual]
|
Setter for the model. Ownership is passed and the old model is released.
Parameters
IAlfModel
* aModel
|
The model for this widget.
|
bool aTakeOwnership = true
|
Whether takes ownership of model or not return void
|
setPresentation(const char *)
void
|
setPresentation
|
(
|
const char *
|
aFilePath
|
)
|
[pure 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.
|
type()
const
IfId
&
|
type
|
(
|
)
|
[static, inline]
|
widgetName()
const char *
|
widgetName
|
(
|
)
|
const [pure virtual]
|
Get the name of the widget instance.
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.