58 const TInt ERefreshMenu = 0x04; |
57 const TInt ERefreshMenu = 0x04; |
59 const TInt EIgnoreState = 0x08; |
58 const TInt EIgnoreState = 0x08; |
60 const TInt EViewDirty = 0x10; |
59 const TInt EViewDirty = 0x10; |
61 const TInt EEffectStarted = 0x20; |
60 const TInt EEffectStarted = 0x20; |
62 } |
61 } |
|
62 |
|
63 NONSHARABLE_STRUCT( TXnDirtyRegion ) |
|
64 { |
|
65 RRegion iRegion; |
|
66 CCoeControl* iControl; // Not own. |
|
67 |
|
68 ~TXnDirtyRegion() |
|
69 { |
|
70 iRegion.Close(); |
|
71 } |
|
72 }; |
|
73 |
63 |
74 |
64 NONSHARABLE_STRUCT( TXnSplitScreenState ) |
75 NONSHARABLE_STRUCT( TXnSplitScreenState ) |
65 { |
76 { |
66 /** Partial screen editor node. Not own */ |
77 /** Partial screen editor node. Not own */ |
67 CXnNode* iPartialScreenEditorNode; |
78 CXnNode* iPartialScreenEditorNode; |
494 |
504 |
495 /** |
505 /** |
496 * Enables partial touch input |
506 * Enables partial touch input |
497 * |
507 * |
498 * @since Series 60 5.2 |
508 * @since Series 60 5.2 |
499 * @param aNode Editor Node, can be NULL when disabling partial input |
509 * @param aNode Editor Node |
500 * @param TBool Partial input is enabled |
510 * @param TBool Partial input is enabled |
501 */ |
511 */ |
502 void EnablePartialTouchInput( CXnNode* aNode, TBool aEnable ); |
512 void EnablePartialTouchInput( CXnNode& aNode, TBool aEnable ); |
503 |
513 |
504 /** |
514 /** |
505 * Is partial input active |
515 * Is partial input active |
506 * |
516 * |
507 * @since Series 60 5.2 |
517 * @since Series 60 5.2 |
518 TBool IsTextEditorActive(); |
528 TBool IsTextEditorActive(); |
519 |
529 |
520 private: |
530 private: |
521 |
531 |
522 IMPORT_C static void EnableRenderUi( TAny* aAny ); |
532 IMPORT_C static void EnableRenderUi( TAny* aAny ); |
523 |
533 |
524 private: |
534 private: |
525 // constructors |
535 // constructors |
526 |
536 |
527 /** |
537 /** |
528 * C++ default constructor. |
538 * C++ default constructor. |
529 */ |
539 */ |
530 CXnUiEngineImpl( CXnUiEngine& aUiEngine, CXnAppUiAdapter& aAdapter ); |
540 CXnUiEngineImpl( CXnUiEngine& aUiEngine, CXnAppUiAdapter& aAdapter ); |
531 |
541 |
532 private: |
542 private: |
533 // new functions |
543 // new functions |
534 |
544 |
535 /** |
|
536 * Lays out the UI |
|
537 */ |
|
538 void LayoutL( TXnDirtyRegion& aRegion ); |
|
539 void RenderL( TXnDirtyRegion& aRegion ); |
|
540 |
|
541 /** |
545 /** |
542 * Prepares to the layout algorithm run |
546 * Prepares to the layout algorithm run |
543 * |
547 * |
544 * @since Series 60 3.2 |
548 * @since Series 60 3.2 |
545 */ |
549 */ |
546 void PrepareRunLayoutL( TXnDirtyRegion& aDirtyRegion ); |
550 void PrepareRunLayoutL(); |
547 |
551 |
548 /** |
552 /** |
549 * Runs the layout algorithm |
553 * Runs the layout algorithm |
550 * |
554 * |
551 * @since Series 60 3.2 |
555 * @since Series 60 3.2 |
552 */ |
556 */ |
553 TInt RunLayoutL( TXnDirtyRegion& aDirtyRegion, CXnNode& aNode ); |
557 TInt RunLayoutL( CXnNode* aNode ); |
554 |
558 |
555 /** |
559 /** |
556 * Checks if layout is currently disabled |
560 * Checks if layout is currently disabled |
557 * |
561 * |
558 * @since Series 60 3.2 |
562 * @since Series 60 3.2 |
559 */ |
563 */ |
560 TBool IsLayoutDisabled( TXnDirtyRegion& aDirtyRegion ); |
564 TBool IsLayoutDisabled(); |
561 |
565 |
562 void AddToRedrawListL( TXnDirtyRegion& aRegion, CXnNode& aNode, |
566 void AddToRedrawListL( CXnNode* aNode, TRect aRect = |
563 TRect aRect = TRect::EUninitialized ); |
567 TRect::EUninitialized ); |
564 |
568 |
565 void AddToDirtyListL( TXnDirtyRegion& aRegion, CXnNode& aNode ); |
569 void AddToDirtyListL( CXnNode* aNode ); |
566 |
570 |
567 /** |
571 /** |
568 * Finds a node where to start layout |
572 * Finds a node where to start layout |
569 * |
573 * |
570 * @since Series 60 5.0 |
574 * @since Series 60 5.0 |
571 */ |
575 */ |
572 CXnNode* StartLayoutFromL( TXnDirtyRegion& aDirtyRegion ); |
576 CXnNode* StartLayoutFromL(); |
573 |
577 |
574 void ForceRenderUIL( TBool aLayoutOnly = EFalse ); |
578 void ForceRenderUIL( TBool aLayoutOnly = EFalse ); |
575 |
579 |
576 CXnNode* WindowOwningNode( CXnNode& aNode ); |
580 CCoeControl* WindowOwningControl( CXnNode& aNode ); |
577 |
581 |
578 TXnDirtyRegion* FindDirtyRegionL( CXnNode& aNode ); |
582 TXnDirtyRegion* FindDirtyRegionL( CXnNode& aNode ); |
579 |
583 |
|
584 void AddRedrawRectL( TRect aRect, CXnNode& aNode ); |
|
585 |
580 void ReportScreenDeviceChangeL(); |
586 void ReportScreenDeviceChangeL(); |
581 |
|
582 void EnableRenderUiL(); |
|
583 |
587 |
584 /** |
588 /** |
585 * Handle partial touch input |
589 * Handle partial touch input |
586 * |
590 * |
587 * @since Series 60 5.2 |
591 * @since Series 60 5.2 |
588 * @param TInt aType |
592 * @param TInt aType |
589 */ |
593 */ |
590 void HandlePartialTouchInputL( CXnNode* aNode, TBool aEnable ); |
594 void HandlePartialTouchInputL( CXnNode& aNode, TBool aEnable ); |
591 |
595 |
592 /** |
596 /** |
593 * Set node visible |
597 * Set node visible |
594 * |
598 * |
595 * @since Series 60 5.2 |
599 * @since Series 60 5.2 |
629 * from MXnViewObserver |
633 * from MXnViewObserver |
630 */ |
634 */ |
631 void NotifyViewActivatedL( const CXnViewData& aViewData ); |
635 void NotifyViewActivatedL( const CXnViewData& aViewData ); |
632 |
636 |
633 /** |
637 /** |
|
638 * from MXnViewObserver |
|
639 */ |
|
640 void NotifyViewDeactivatedL( const CXnViewData& /*aViewData*/ ); |
|
641 |
|
642 /** |
634 * from MXnViewObserver |
643 * from MXnViewObserver |
635 */ |
644 */ |
636 void NotifyViewLoadedL( const CXnViewData& aViewData ); |
645 void NotifyConfigureWidgetL( const CHsContentInfo& /*aContentInfo*/, |
|
646 CXnPluginData& /*aPluginData*/ ); |
|
647 |
|
648 /** |
|
649 * from MXnViewObserver |
|
650 */ |
|
651 void NotifyWidgetAdditionL( const CXnPluginData& aPluginData ); |
637 |
652 |
638 /** |
653 /** |
639 * from MXnViewObserver |
654 * from MXnViewObserver |
640 */ |
655 */ |
641 void NotifyViewDeactivatedL( const CXnViewData& /*aViewData*/ ); |
656 void NotifyWidgetRemovalL( const CXnPluginData& /*aPluginData*/ ); |
642 |
657 |
643 /** |
|
644 * from MXnViewObserver |
|
645 */ |
|
646 void NotifyConfigureWidgetL( const CHsContentInfo& /*aContentInfo*/, |
|
647 CXnPluginData& /*aPluginData*/ ); |
|
648 |
|
649 /** |
658 /** |
650 * from MXnViewObserver |
659 * from MXnViewObserver |
651 */ |
660 */ |
652 void NotifyWidgetAdditionL( const CXnPluginData& aPluginData ); |
661 void NotifyViewAdditionL( const CXnPluginData& /*aPluginData*/ ){}; |
653 |
662 |
654 /** |
663 /** |
655 * from MXnViewObserver |
664 * from MXnViewObserver |
656 */ |
665 */ |
657 void NotifyWidgetRemovalL( const CXnPluginData& /*aPluginData*/ ); |
666 void NotifyViewRemovalL( const CXnPluginData& /*aPluginData*/ ){}; |
658 |
|
659 /** |
|
660 * from MXnViewObserver |
|
661 */ |
|
662 void NotifyViewAdditionL( const CXnViewData& aViewData ); |
|
663 |
|
664 /** |
|
665 * from MXnViewObserver |
|
666 */ |
|
667 void NotifyViewRemovalL( const CXnViewData& /*aViewData*/ ){}; |
|
668 |
667 |
669 /** |
668 /** |
670 * from MXnViewObserver |
669 * from MXnViewObserver |
671 */ |
670 */ |
672 void NotifyAllViewsLoadedL(){}; |
671 void NotifyAllViewsLoadedL(){}; |
719 CXnViewManager& iViewManager; |
718 CXnViewManager& iViewManager; |
720 /** Key event dispatcher, Not owned */ |
719 /** Key event dispatcher, Not owned */ |
721 CXnKeyEventDispatcher* iKeyEventDispatcher; |
720 CXnKeyEventDispatcher* iKeyEventDispatcher; |
722 /** ControlAdapters, not owned */ |
721 /** ControlAdapters, not owned */ |
723 const RPointerArray< CXnControlAdapter >* iControlAdapterList; |
722 const RPointerArray< CXnControlAdapter >* iControlAdapterList; |
|
723 /** Region pending redraw */ |
|
724 RPointerArray<TXnDirtyRegion> iRedrawRegions; |
|
725 /** List of currently dirty nodes */ |
|
726 RPointerArray< CXnNode > iDirtyList; |
724 /** Array of nodes which can be focused */ |
727 /** Array of nodes which can be focused */ |
725 RPointerArray< CXnNode > iFocusCandidateList; |
728 RPointerArray< CXnNode > iFocusCandidateList; |
726 /** current view */ |
729 /** current view */ |
727 CXnNode* iCurrentView; |
730 CXnNode* iCurrentView; |
728 /** current view control adapter, not owned */ |
731 /** current view control adapter, not owned */ |
729 CXnControlAdapter* iCurrentViewControlAdapter; |
732 CXnControlAdapter* iCurrentViewControlAdapter; |
|
733 /** Controls layouting */ |
|
734 TInt iLayoutControl; |
730 /** Layout algo phase */ |
735 /** Layout algo phase */ |
731 TInt iLayoutPhase; |
736 TInt iLayoutPhase; |
732 /** Unit in pixels (width). */ |
737 /** Unit in pixels (width). */ |
733 TReal iHorizontalUnitInPixels; |
738 TReal iHorizontalUnitInPixels; |
734 /** Unit in pixels (height). */ |
739 /** Unit in pixels (height). */ |