57 const TInt ERefreshMenu = 0x04; |
58 const TInt ERefreshMenu = 0x04; |
58 const TInt EIgnoreState = 0x08; |
59 const TInt EIgnoreState = 0x08; |
59 const TInt EViewDirty = 0x10; |
60 const TInt EViewDirty = 0x10; |
60 const TInt EEffectStarted = 0x20; |
61 const TInt EEffectStarted = 0x20; |
61 } |
62 } |
62 |
|
63 NONSHARABLE_STRUCT( TXnDirtyRegion ) |
|
64 { |
|
65 RRegion iRegion; |
|
66 CCoeControl* iControl; // Not own. |
|
67 |
|
68 ~TXnDirtyRegion() |
|
69 { |
|
70 iRegion.Close(); |
|
71 } |
|
72 }; |
|
73 |
|
74 |
63 |
75 NONSHARABLE_STRUCT( TXnSplitScreenState ) |
64 NONSHARABLE_STRUCT( TXnSplitScreenState ) |
76 { |
65 { |
77 /** Partial screen editor node. Not own */ |
66 /** Partial screen editor node. Not own */ |
78 CXnNode* iPartialScreenEditorNode; |
67 CXnNode* iPartialScreenEditorNode; |
145 * @param aNode Starting point of the layout |
134 * @param aNode Starting point of the layout |
146 */ |
135 */ |
147 void LayoutUIL( CXnNode* aNode = NULL ); |
136 void LayoutUIL( CXnNode* aNode = NULL ); |
148 |
137 |
149 /** |
138 /** |
150 * Lays out the UI |
|
151 * |
|
152 * This generates full re-layout starting from the given node, |
|
153 * regardless of the current dirty set or the active view. |
|
154 * I.e. this can be used to layout an inactive view. |
|
155 * |
|
156 * @since Series 60 5.2 |
|
157 * @param aNode Starting point of the layout |
|
158 */ |
|
159 void LayoutFromNodeL( CXnNode& aNode ); |
|
160 |
|
161 /** |
|
162 * Creates UI implementations for the UI, adjusts control coordinates |
139 * Creates UI implementations for the UI, adjusts control coordinates |
163 * according to the layout |
140 * according to the layout |
164 * |
141 * |
165 * @since Series 60 3.1 |
142 * @since Series 60 3.1 |
166 * @param aNode Starting point |
143 * @param aNode Starting point |
167 */ |
144 */ |
168 void RenderUIL( CXnNode* aNode = NULL ); |
145 void RenderUIL( CXnNode* aNode = NULL ); |
169 |
|
170 /** |
|
171 * Creates UI implementations for the UI, adjusts control coordinates |
|
172 * according to the layout |
|
173 * |
|
174 * This generates full re-layout starting from the given node, |
|
175 * regardless of the current dirty set or the active view. |
|
176 * I.e. this can be used to layout an inactive view. |
|
177 * |
|
178 * @since Series 60 5.2 |
|
179 * @param aNode Starting point |
|
180 */ |
|
181 void RenderFromNodeL( CXnNode& aNode ); |
|
182 |
146 |
183 /** |
147 /** |
184 * Gets the root node of the UI |
148 * Gets the root node of the UI |
185 * |
149 * |
186 * @since Series 60 3.1 |
150 * @since Series 60 3.1 |
553 TBool IsTextEditorActive(); |
518 TBool IsTextEditorActive(); |
554 |
519 |
555 private: |
520 private: |
556 |
521 |
557 IMPORT_C static void EnableRenderUi( TAny* aAny ); |
522 IMPORT_C static void EnableRenderUi( TAny* aAny ); |
558 |
523 |
559 private: |
524 private: |
560 // constructors |
525 // constructors |
561 |
526 |
562 /** |
527 /** |
563 * C++ default constructor. |
528 * C++ default constructor. |
564 */ |
529 */ |
565 CXnUiEngineImpl( CXnUiEngine& aUiEngine, CXnAppUiAdapter& aAdapter ); |
530 CXnUiEngineImpl( CXnUiEngine& aUiEngine, CXnAppUiAdapter& aAdapter ); |
566 |
531 |
567 private: |
532 private: |
568 // new functions |
533 // new functions |
569 |
534 |
|
535 /** |
|
536 * Lays out the UI |
|
537 */ |
|
538 void LayoutL( TXnDirtyRegion& aRegion ); |
|
539 void RenderL( TXnDirtyRegion& aRegion ); |
|
540 |
570 /** |
541 /** |
571 * Prepares to the layout algorithm run |
542 * Prepares to the layout algorithm run |
572 * |
543 * |
573 * @since Series 60 3.2 |
544 * @since Series 60 3.2 |
574 */ |
545 */ |
575 void PrepareRunLayoutL(); |
546 void PrepareRunLayoutL( TXnDirtyRegion& aDirtyRegion ); |
576 void PrepareRunLayoutL( CXnNode& aNode ); |
|
577 |
547 |
578 /** |
548 /** |
579 * Runs the layout algorithm |
549 * Runs the layout algorithm |
580 * |
550 * |
581 * @since Series 60 3.2 |
551 * @since Series 60 3.2 |
582 */ |
552 */ |
583 TInt RunLayoutL( CXnNode* aNode ); |
553 TInt RunLayoutL( TXnDirtyRegion& aDirtyRegion, CXnNode& aNode ); |
584 TInt RunLayoutFromNodeL( CXnNode& aNode ); |
|
585 |
554 |
586 /** |
555 /** |
587 * Checks if layout is currently disabled |
556 * Checks if layout is currently disabled |
588 * |
557 * |
589 * @since Series 60 3.2 |
558 * @since Series 60 3.2 |
590 */ |
559 */ |
591 TBool IsLayoutDisabled(); |
560 TBool IsLayoutDisabled( TXnDirtyRegion& aDirtyRegion ); |
592 |
561 |
593 void AddToRedrawListL( CXnNode* aNode, TRect aRect = |
562 void AddToRedrawListL( TXnDirtyRegion& aRegion, CXnNode& aNode, |
594 TRect::EUninitialized ); |
563 TRect aRect = TRect::EUninitialized ); |
595 |
564 |
596 void AddToDirtyListL( CXnNode* aNode ); |
565 void AddToDirtyListL( TXnDirtyRegion& aRegion, CXnNode& aNode ); |
597 |
566 |
598 /** |
567 /** |
599 * Finds a node where to start layout |
568 * Finds a node where to start layout |
600 * |
569 * |
601 * @since Series 60 5.0 |
570 * @since Series 60 5.0 |
602 */ |
571 */ |
603 CXnNode* StartLayoutFromL(); |
572 CXnNode* StartLayoutFromL( TXnDirtyRegion& aDirtyRegion ); |
604 |
573 |
605 void ForceRenderUIL( TBool aLayoutOnly = EFalse ); |
574 void ForceRenderUIL( TBool aLayoutOnly = EFalse ); |
606 |
575 |
607 CCoeControl* WindowOwningControl( CXnNode& aNode ); |
576 CXnNode* WindowOwningNode( CXnNode& aNode ); |
608 |
577 |
609 TXnDirtyRegion* FindDirtyRegionL( CXnNode& aNode ); |
578 TXnDirtyRegion* FindDirtyRegionL( CXnNode& aNode ); |
610 |
579 |
611 void AddRedrawRectL( TRect aRect, CXnNode& aNode ); |
|
612 |
|
613 void ReportScreenDeviceChangeL(); |
580 void ReportScreenDeviceChangeL(); |
|
581 |
|
582 void EnableRenderUiL(); |
614 |
583 |
615 /** |
584 /** |
616 * Handle partial touch input |
585 * Handle partial touch input |
617 * |
586 * |
618 * @since Series 60 5.2 |
587 * @since Series 60 5.2 |
750 CXnViewManager& iViewManager; |
719 CXnViewManager& iViewManager; |
751 /** Key event dispatcher, Not owned */ |
720 /** Key event dispatcher, Not owned */ |
752 CXnKeyEventDispatcher* iKeyEventDispatcher; |
721 CXnKeyEventDispatcher* iKeyEventDispatcher; |
753 /** ControlAdapters, not owned */ |
722 /** ControlAdapters, not owned */ |
754 const RPointerArray< CXnControlAdapter >* iControlAdapterList; |
723 const RPointerArray< CXnControlAdapter >* iControlAdapterList; |
755 /** Region pending redraw */ |
|
756 RPointerArray<TXnDirtyRegion> iRedrawRegions; |
|
757 /** List of currently dirty nodes */ |
|
758 RPointerArray< CXnNode > iDirtyList; |
|
759 /** Array of nodes which can be focused */ |
724 /** Array of nodes which can be focused */ |
760 RPointerArray< CXnNode > iFocusCandidateList; |
725 RPointerArray< CXnNode > iFocusCandidateList; |
761 /** current view */ |
726 /** current view */ |
762 CXnNode* iCurrentView; |
727 CXnNode* iCurrentView; |
763 /** current view control adapter, not owned */ |
728 /** current view control adapter, not owned */ |
764 CXnControlAdapter* iCurrentViewControlAdapter; |
729 CXnControlAdapter* iCurrentViewControlAdapter; |
765 /** Controls layouting */ |
|
766 TInt iLayoutControl; |
|
767 /** Layout algo phase */ |
730 /** Layout algo phase */ |
768 TInt iLayoutPhase; |
731 TInt iLayoutPhase; |
769 /** Unit in pixels (width). */ |
732 /** Unit in pixels (width). */ |
770 TReal iHorizontalUnitInPixels; |
733 TReal iHorizontalUnitInPixels; |
771 /** Unit in pixels (height). */ |
734 /** Unit in pixels (height). */ |