class Alf::IAlfWidgetFactory : public Alf::IAlfInterfaceBase |
Interface to create widgets, register custom widget factories and query factory products.
MAlfListWidget* list = widgetFactory.CreateWidget<MAlfListWidget>( "alflistwidget"); if( list ) { // do operations with widget }
Public Member Functions | |
---|---|
~IAlfWidgetFactory () | |
int | appendWidget ( IAlfWidget *) |
T * | createControl (const char *, const char *, CAlfDisplay *, AlfCustomInitDataBase *) |
T * | createElement (const char *, const char *, IAlfWidgetControl &, DuiNode *, AlfCustomInitDataBase *) |
T * | createEventHandler (const char *, const char *, DuiNode *, AlfCustomInitDataBase *) |
T * | createLayoutManager (const char *, const char *, DuiNode *, AlfCustomInitDataBase *) |
T * | createModel (const char *, AlfCustomInitDataBase *) |
IAlfViewWidget * | createViewWidget (const char *, int, DuiNode *, CAlfDisplay *, const char *, AlfCustomInitDataBase *) |
T * | createVisualTemplate (const char *, const char *, DuiNode *, AlfCustomInitDataBase *) |
T * | createWidget (const char *, const char *, IAlfContainerWidget &, DuiNode *, const char *, AlfCustomInitDataBase *) |
int | destroyWidget (T *) |
int | destroyWidget ( IAlfWidget *) |
IAlfWidget * | findWidget (const char *) |
void | registerCustomWidgetFactory (IAlfFactoryPlugin *) |
const IfId & | type () |
Inherited Functions | |
---|---|
Alf::IAlfInterfaceBase::makeInterface(IAlfInterfaceBase *) | |
Alf::IAlfInterfaceBase::makeInterface(const IfId &) | |
Alf::IAlfInterfaceBase::~IAlfInterfaceBase() |
int | appendWidget | ( | IAlfWidget * | aWidget | ) | [pure virtual] |
Append widgets into the widget factory
IAlfWidget * aWidget | A widget to be added |
T * | createControl | ( | const char * | aLoadId, |
const char * | aInstanceId, | |||
CAlfDisplay * | aDisplay = 0, | |||
AlfCustomInitDataBase * | aCustomData = 0 | |||
) | [inline] |
Create a control
const char * aLoadId | Load identifier |
const char * aInstanceId | Instance identifier |
CAlfDisplay * aDisplay = 0 | Display where control is bound |
AlfCustomInitDataBase * aCustomData = 0 | Custom data to be passed to the control during construction. |
T * | createElement | ( | const char * | aLoadId, |
const char * | aInstanceId, | |||
IAlfWidgetControl & | aControl, | |||
DuiNode * | aNode = 0, | |||
AlfCustomInitDataBase * | aCustomData = 0 | |||
) | [inline] |
Create an element
const char * aLoadId | Load identifier |
const char * aInstanceId | Instance identifier |
IAlfWidgetControl & aControl | Control Use by element contructor |
DuiNode * aNode = 0 | |
AlfCustomInitDataBase * aCustomData = 0 | Custom data to be passed to the element during construction. |
T * | createEventHandler | ( | const char * | aLoadId, |
const char * | aInstanceId, | |||
DuiNode * | aNode = 0, | |||
AlfCustomInitDataBase * | aCustomData = 0 | |||
) | [inline] |
Create an event handler
const char * aLoadId | Load identifier |
const char * aInstanceId | Instance identifier |
DuiNode * aNode = 0 | |
AlfCustomInitDataBase * aCustomData = 0 | Custom data to be passed to the event handler during construction. |
T * | createLayoutManager | ( | const char * | aLoadId, |
const char * | aInstanceId, | |||
DuiNode * | aNode = 0, | |||
AlfCustomInitDataBase * | aCustomData = 0 | |||
) | [inline] |
Create an layoutmanager.
const char * aLoadId | Load identifier |
const char * aInstanceId | Instance identifier |
DuiNode * aNode = 0 | declaration node. |
AlfCustomInitDataBase * aCustomData = 0 | Custom data to be passed to the layout manager during construction. |
T * | createModel | ( | const char * | aLoadId, |
AlfCustomInitDataBase * | aCustomData = 0 | |||
) | [inline] |
Create a widget model
const char * aLoadId | Implementation to load |
AlfCustomInitDataBase * aCustomData = 0 | Custom data to be passed to the model during construction. |
IAlfViewWidget * | createViewWidget | ( | const char * | aInstanceId, |
int | aControlGroupId, | |||
DuiNode * | aNode = 0, | |||
CAlfDisplay * | aDisplay = 0, | |||
const char * | aFilePath = 0, | |||
AlfCustomInitDataBase * | aCustomData = 0 | |||
) | [pure virtual] |
Constructs a new view widget.
Application user interface contains always at least one view widget.
View widget is a container widget that can be used to contain other container or leaf widgets. View widget is the root of the application user interface view into which the widget hierarchy can be built.
View widget control is appended in a control group. Each view will be associated with a unique control group. A unique, unreserved control group ID should be passed through this construction method. Construction method will then create a new control group for the given ID and append the view widget's control into the control group. When the view widget is destroyed also its control group is destroyed and the control group ID is free to be used again. If an already reserved control group ID is passed an osncore::AlfException is thrown with error code osncore::EInvalidArgument.
If the application contains multiple views it is possible to apply transitions from a view widget to another by manipulating the associated control groups.
View widget is bound to a single display. If no display is given as a construction parameter then primary display of the UI Accelerator Toolkit environment is used. If no display is given and there is no primary display in the environment an osncore::AlfException is thrown with error code osncore::EDisplayNotFound.
osncore::AlfException |
Thrown with error code osncore::EInvalidArgument if a control group with the provided id already exists and with error code osncore::EDisplayNotFound if no display object is provided and there is no primary display. |
osncore::AlfWidgetException |
Thrown with error code osncore::EInvalidArgument if both node and declaration file path have non-null value at the same time. |
osncore::AlfWidgetException |
Thrown with error code osncore::EInvalidWidgetInstanceId if an attempt is made to create a view widget with the Instance ID of an existing widget. |
const char * aInstanceId | Id or name of the view widget to be created. |
int aControlGroupId | Id of the control group to be created. This has to be unique and unreserved control group id. |
DuiNode * aNode = 0 | Declarative UI node which is used to construct and configure this widget from a declaration. Default implementation if aNode is NULL. |
CAlfDisplay * aDisplay = 0 | Display in which the view widget is maintained. Primary display is used if no display is provided. |
const char * aFilePath = 0 | File handle to an XML file describing the presentation of the view widget. Both aNode and aFilePath cannot be non-null values at the same time. |
AlfCustomInitDataBase * aCustomData = 0 | Custom data to be passed to the widget during construction. |
T * | createVisualTemplate | ( | const char * | aLoadId, |
const char * | aInstanceId, | |||
DuiNode * | aNode = 0, | |||
AlfCustomInitDataBase * | aCustomData = 0 | |||
) | [inline] |
Create a visual template
const char * aLoadId | Load identifier |
const char * aInstanceId | Instance identifier |
DuiNode * aNode = 0 | |
AlfCustomInitDataBase * aCustomData = 0 | Custom data to be passed to the visual template during construction. |
T * | createWidget | ( | const char * | aLoadId, |
const char * | aInstanceId, | |||
IAlfContainerWidget & | aContainerWidget, | |||
DuiNode * | aNode = 0, | |||
const char * | aFilePath = 0, | |||
AlfCustomInitDataBase * | aCustomData = 0 | |||
) | [inline] |
Constructs a new widget.
Each widget will have to be added into a container widget. The root container widget of an application user interface view can be created with the createViewWidget() method. The widget hierarchy can be constructed from the root container widget by using container and leaf widgets. When a new widget is created a container has to be specified that is going to contain the created widget. The container can be a root container widget or some of the inner container widgets in the widget containment hierarchy.
Widget's control is bound to a display object when this widget is first shown. The widget is bound to the same display that was given in the constructor of its containing view.
osncore::AlfWidgetException |
Thrown with error code osncore::EInvalidArgument if both node and declaration file path have non-null value at the same time. |
osncore::AlfWidgetException |
Thrown with error code osncore::EInvalidWidgetInstanceId if an attempt is made to create a widget with the Instance ID of an existing widget. |
const char * aLoadId | Widget type identifier. |
const char * aInstanceId | Id or name of the widget to be created. |
IAlfContainerWidget & aContainerWidget | Reference to a container widget that will contain the created widget. |
DuiNode * aNode = 0 | Declarative UI node which is used to construct and configure this widget from a declaration. Default implementation if aNode is NULL. |
const char * aFilePath = 0 | File handle to an XML file describing the presentation of the widget. Both aNode and aFilePath cannot be non-null values at the same time. |
AlfCustomInitDataBase * aCustomData = 0 | Custom data to be passed to the widget during construction. |
int | destroyWidget | ( | T * | aWidget | ) | [inline] |
Destroy widget
T * aWidget | A widget to be destroyed. |
int | destroyWidget | ( | IAlfWidget * | aWidget | ) | [pure virtual] |
Destroy widget
IAlfWidget * aWidget | A widget to be destroyed. |
IAlfWidget * | findWidget | ( | const char * | aWidgetName | ) | const [pure virtual] |
Find named widgets owned by the factory
const char * aWidgetName | A widget name to be found. |
void | registerCustomWidgetFactory | ( | IAlfFactoryPlugin * | aFactory | ) | [pure virtual] |
Application can register a custom factory to create custom factory products. Ownership is transferred to a widget factory chain, if call is successfull.
std::bad_alloc |
|
IAlfFactoryPlugin * aFactory | Custom factory |
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.