19 #include "alf/alfelement.h" |
19 #include "alf/alfelement.h" |
20 #include <alf/alfwidgetcontrol.h> |
20 #include <alf/alfwidgetcontrol.h> |
21 #include <alf/alfvarianttype.h> |
21 #include <alf/alfvarianttype.h> |
22 #include "alf/ialfvisualtemplate.h" |
22 #include "alf/ialfvisualtemplate.h" |
23 #include "alf/alfreferencetovisual.h" |
23 #include "alf/alfreferencetovisual.h" |
24 #include "alf/alfperf.h" |
24 //#include "alf/alfperf.h" |
25 #include <alf/alfexceptions.h> |
25 #include <alf/alfexceptions.h> |
26 |
26 |
27 #include "alfelementattributeownerimpl.h" |
27 #include "alfelementattributeownerimpl.h" |
28 |
28 |
29 namespace Alf |
29 namespace Alf |
147 IAlfElement* aElement, IAlfVariantType& aChildData, |
147 IAlfElement* aElement, IAlfVariantType& aChildData, |
148 IAlfBranch& aData, int aIndex, uint aDataID ) |
148 IAlfBranch& aData, int aIndex, uint aDataID ) |
149 { |
149 { |
150 // Pass directly to the child element CreateVisualTree, no need |
150 // Pass directly to the child element CreateVisualTree, no need |
151 // to do anything else. Derived classes may need additional steps here. |
151 // to do anything else. Derived classes may need additional steps here. |
152 ALF_PERF_START( perfdata, "AlfElement-createVisualTree-createChildVisualTree") |
152 // ALF_PERF_START( perfdata, "AlfElement-createVisualTree-createChildVisualTree") |
153 aElement->createVisualTree( aChildData, aData, aIndex, aDataID, |
153 aElement->createVisualTree( aChildData, aData, aIndex, aDataID, |
154 aElement->defaultParentLayout( aDataID ), |
154 aElement->defaultParentLayout( aDataID ), |
155 aIndex ); |
155 aIndex ); |
156 ALF_PERF_STOP( perfdata, "AlfElement-createVisualTree-createChildVisualTree") |
156 // ALF_PERF_STOP( perfdata, "AlfElement-createVisualTree-createChildVisualTree") |
157 } |
157 } |
158 |
158 |
159 OSN_EXPORT CAlfVisual* AlfElement::createVisualTree( |
159 OSN_EXPORT CAlfVisual* AlfElement::createVisualTree( |
160 IAlfVariantType& aData, IAlfBranch& aParentData, int aIndex, |
160 IAlfVariantType& aData, IAlfBranch& aParentData, int aIndex, |
161 uint aParentDataID, CAlfLayout* aParentLayout, int aLayoutIndex ) |
161 uint aParentDataID, CAlfLayout* aParentLayout, int aLayoutIndex ) |
328 int index = findFromArray( aDataID ); |
328 int index = findFromArray( aDataID ); |
329 if (index >= 0) |
329 if (index >= 0) |
330 { |
330 { |
331 // Update the contents of the visual tree |
331 // Update the contents of the visual tree |
332 CAlfVisual* visual = mData->mVisualTreeArray[index]->mVisualTree; |
332 CAlfVisual* visual = mData->mVisualTreeArray[index]->mVisualTree; |
333 ALF_PERF_START( perfdata, "AlfElement-updateVisualTree-VTUpdateVisualTree") |
333 //ALF_PERF_START( perfdata, "AlfElement-updateVisualTree-VTUpdateVisualTree") |
334 mData->mVisualTreeArray[index]->mVisualTree = |
334 mData->mVisualTreeArray[index]->mVisualTree = |
335 mData->mVisualTemplate->updateVisualTree( |
335 mData->mVisualTemplate->updateVisualTree( |
336 currentNewData, currentOldData, *visual ); |
336 currentNewData, currentOldData, *visual ); |
337 ALF_PERF_STOP( perfdata, "AlfElement-UpdateVisualTree-VTUpdateVisualTree") |
337 //ALF_PERF_STOP( perfdata, "AlfElement-UpdateVisualTree-VTUpdateVisualTree") |
338 } |
338 } |
339 } |
339 } |
340 |
340 |
341 if ( branch ) |
341 if ( branch ) |
342 { |
342 { |