Alf::AlfLayoutManager Class Reference
class Alf::AlfLayoutManager : public Alf::IAlfLayoutManager |
The interface for layout managers
Layout manager handles the layouting of child widgets in the container widget. It uses IAlfLayoutPreferences-interface (IAlfLayoutPreferences) of child widgets as a guide for laying out the widgets. The layoutmanager is set to the IAlfHostApi- interface (IAlfHostApi::setBaseLayout) createLayout-method should be the first call after creating the layoutmanager.Layout manager may also provide information about the layout preferences of its children. If this is supported the layout manager will combine the layout preferences of its children taking into consideration the technique used to lay out the children using the layout manager. This will provide information about the whole display area occupied by the layout manager. For instance vertical flow layout manager will provide preferred size area of its children by summing their heights and providing the maximum width among the children.
// Create layout manager interface.
IAlfLayoutManager* layoutManager = IAlfInterfaceBase::makeInterface<IAlfLayoutManager>(control);
// See if layout preferences is supported in the given layout manager.
IAlfLayoutPreferences* layoutPreferences = IAlfInterfaceBase::makeInterface<IAlfLayoutPreferences>(layoutManager);
if(layoutPreferences != 0)
{
TAlfXYMetric preferredSize;
// This will report the preferred size of the layout by combining together preferred sizes of its children.
bool result = layoutPreferences->getPreferredSize(preferredSize);
}
Constructor & Destructor Documentation
AlfLayoutManager(TAlfLayoutType)
layout manager constructor
~AlfLayoutManager()
OSN_IMPORT | ~AlfLayoutManager | ( | ) | [virtual] |
Member Functions Documentation
childRemoved(CAlfWidgetControl *)
from IAlfLayoutManager Notifies the layout manager, that the control's has been removed from the layout.
controlRect(CAlfWidgetControl &, TAlfRealRect &)
returns the rect of the control.
count()
OSN_IMPORT int | count | ( | ) | const |
returns the count of controls inside layoutmanager.
createLayout(CAlfWidgetControl &, CAlfLayout *, int)
creates the layout used by this layoutmanager.
Parameters
CAlfWidgetControl & aOwner | |
CAlfLayout * aParentLayout | parent for the created layout |
int aLayoutIndex | index, where created visual should be placed in the parent layout. |
doUpdateChildLayout(CAlfWidgetControl *)
Notifies the layout manager, that the child control's layout must be updated. Called in updateChildLayout for the updated control and in updateChildrenLayout for all the controls in the layout.
getControl(int)
returns the control at aIndex.
Parameters
int aIndex | index for the control. |
getLayoutPreferences(CAlfWidgetControl *)
returns layout preferences for aControl
makeInterface(const IfId &)
Interface getter. IAlfInterfaceBase::MakeInterface
- Since
- S60 ?S60_version
Parameters
const IfId & aType | The type id of the queried interface. |
setControlPosition(CAlfWidgetControl &, const TAlfRealPoint &)
sets the position to the control
setControlRect(CAlfWidgetControl &, const TAlfRealRect &)
sets the size and position to the control
setControlSize(CAlfWidgetControl &, const TAlfRealPoint &)
updateChildLayout(CAlfWidgetControl *)
from IAlfLayoutManager Notifies the layout manager, that the child control's layout must be updated
updateChildrenLayout()
OSN_IMPORT void | updateChildrenLayout | ( | ) | [virtual] |
from
IAlfLayoutManager Notifies the layout manager, that all the child control's layouts must be updated.
- Exceptions
-
Member Data Documentation
auto_ptr< AlfLayoutManagerImpl > mData
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.