class CAlfFlowLayout : public CAlfLayout |
Flow layout positions children next to each other either horizontally or vertically. The sizes of child visuals are not changed by default.
The layout inner padding is used to determine the gap between children.
//create flowlayout CAlfFlowLayout* flowLayout = CAlfFlowLayout::AddNewL( control ); //Add two child text visuals to flow layout CAlfTextVisual* text1 = CAlfTextVisual::AddNewL( control, flowLayout ); CAlfTextVisual* text2 = CAlfTextVisual::AddNewL( control, flowLayout ); text1->SetTextL( _L"Text1" ); text2->SetTextL( _L"Text2" ); //set Flow direction flowLayout->SetFlowDirection( CAlfFlowLayout::EFlowHorizontal ); flowLayout->UpdateChildrenLayout( 1 ); // Set Centring flowLayout->SetCentering( ETrue ); flowLayout->UpdateChildrenLayout(transitionTimeInMilliSeconds); //Set flow mode flowLayout->SetMode( CAlfFlowLayout::EModeFitPerpendicular ); flowLayout->UpdateChildrenLayout( 1 );alfclient.lib
Public Member Functions | |
---|---|
CAlfFlowLayout() | |
~CAlfFlowLayout() | |
IMPORT_C CAlfFlowLayout * | AddNewL(CAlfControl &, CAlfLayout *) |
IMPORT_C TAlfXYMetric | BaseUnit() |
IMPORT_C void | ConstructL(CAlfControl &) |
IMPORT_C CAlfVisual * | FindTag(const TDesC8 &) |
IMPORT_C TInt | Mode() |
IMPORT_C void | RemoveAndDestroyAllD() |
IMPORT_C void | SetCentering(TBool) |
IMPORT_C void | SetFlowDirection(TFlowDirection) |
IMPORT_C void | SetMode(TInt) |
IMPORT_C void | UpdateChildrenLayout(TInt) |
Protected Member Functions | |
---|---|
IMPORT_C void | DoRemoveAndDestroyAllD() |
IMPORT_C void | PropertyOwnerExtension(const TUid &, TAny **) |
Public Member Enumerations | |
---|---|
enum | TFlowDirection { EFlowHorizontal = 0, EFlowVertical } |
enum | TMode { EModeCenterPerpendicular = 0x1, EModeFitPerpendicular = 0x2 } |
Inherited Enumerations | |
---|---|
CAlfLayout:TExpansionFlags |
Private Attributes | |
---|---|
TFlowLayoutPrivateData * | iFlowLayoutData |
IMPORT_C CAlfFlowLayout * | AddNewL | ( | CAlfControl & | aOwnerControl, |
CAlfLayout * | aParentLayout = 0 | |||
) | [static] |
Two-phased constructor, which attach new object into the control.
CAlfControl & aOwnerControl | Control that owns this new obejct. |
CAlfLayout * aParentLayout = 0 | If given, the new object is set as child. |
IMPORT_C void | ConstructL | ( | CAlfControl & | aOwner | ) | [virtual] |
Second-phase constructor.
CAlfControl & aOwner |
IMPORT_C void | DoRemoveAndDestroyAllD | ( | ) | [protected, virtual] |
From CAlfVisual CAlfVisual
IMPORT_C CAlfVisual * | FindTag | ( | const TDesC8 & | aTag | ) | [virtual] |
CAlfVisual Finds a visual whose tag descriptor contains a specific tag.
CAlfLayout::FindTag() extends the search into child visuals, covering recursively entire visual hierarchies.
Todo: how should several visuals with matching tag to be handled ??
CAlfVisual::Tag() CAlfVisual::SetTagL() CAlfVisual::IsTagged() CAlfVisual::FindTag()
const TDesC8 & aTag | Tag to look for. If this tag is found as a part of a visual's colon-separated tag descriptor, it is treated as a match and the visual is returned. The tag to look for cannot contain separator characters (:). |
IMPORT_C void | PropertyOwnerExtension | ( | const TUid & | aExtensionUid, |
TAny ** | aExtensionParams | |||
) | [protected, virtual] |
! future proofing
IMPORT_C void | SetCentering | ( | TBool | aCentering | ) |
Sets the centering mode of the flow. This sets/clears the EModeCenterPerpendicular flag. Calling this is equivalent to calling SetMode() with that flag included or missing from the mode.
TBool aCentering | ETrue to set the EModeCenterPerpendicular mode. EFalse to clear it. |
IMPORT_C void | SetFlowDirection | ( | TFlowDirection | aDirection | ) |
Sets the direction of the flow.
TFlowDirection aDirection | Flow direction. |
IMPORT_C void | SetMode | ( | TInt | aMode | ) |
Sets the mode of the flow. The mode flags determine how the flow layout behaves.
TInt aMode | Mode flags (OR'd together). |
IMPORT_C void | UpdateChildrenLayout | ( | TInt | aTransitionTime = 0 | ) | [virtual] |
CAlfVisual Update the layout of all children. Subclasses can call this to recalculate the layout of all children.
TInt aTransitionTime = 0 | Time for layout transition in milliseconds. Any negative value uses value given in CAlfEnv::StaticSetLayoutTransitionTime() |
Flow directions.
EFlowHorizontal = 0 |
Flow horizontally. System wide layout mirroring is considered to determine whether visuals are layed from left to right or from right to left. AknLayoutUtils::LayoutMirrored() |
EFlowVertical |
Flow vertically. |
Mode flags that specify how the flow is laid out.
EModeCenterPerpendicular = 0x1 |
Center the children perpendicular to the flow direction. For example, if the flow direction is horizontal (left->right) this flag will center the children vertically along the flow. |
EModeFitPerpendicular = 0x2 |
Fit the children perpendicular to the flow direction. For example, if the flow direction is horizontal, the children will be vertically resized to fit the layout's rectangle. |
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.