equal
deleted
inserted
replaced
23 //////SYSTEM INCLUDES |
23 //////SYSTEM INCLUDES |
24 #include <e32base.h> |
24 #include <e32base.h> |
25 #include <babitflags.h> |
25 #include <babitflags.h> |
26 |
26 |
27 //////TOOLKIT INCLUDES |
27 //////TOOLKIT INCLUDES |
28 // <cmail> SF |
|
29 #include <alf/alfenv.h> //MAlfActionObserver |
28 #include <alf/alfenv.h> //MAlfActionObserver |
30 // </cmail> |
|
31 |
29 |
32 //////PROJECT INCLUDES |
30 //////PROJECT INCLUDES |
33 //<cmail> removed __FS_ALFRED_SUPPORT flag |
|
34 //#include <fsconfig.h> |
|
35 //</cmail> removed __FS_ALFRED_SUPPORT flag |
|
36 #include <aknphysicsobserveriface.h> |
31 #include <aknphysicsobserveriface.h> |
37 |
32 |
38 #include "fstreevisualizer.h" |
33 #include "fstreevisualizer.h" |
39 #include "fstreeobserver.h" |
34 #include "fstreeobserver.h" |
40 #include "fsfadeeffectobserver.h" |
35 #include "fsfadeeffectobserver.h" |
41 #include "fsslideeffectobserver.h" |
36 #include "fsslideeffectobserver.h" |
42 #include "fsscrollbarset.h" |
37 #include "fsscrollbarset.h" |
|
38 #include "muicscrollbar.h" |
43 |
39 |
44 //////TOOLKIT CLASSES |
40 //////TOOLKIT CLASSES |
45 class CAlfLayout; |
41 class CAlfLayout; |
46 class CAlfTexture; |
42 class CAlfTexture; |
47 class CAlfBrush; |
43 class CAlfBrush; |
63 class CFsTreePlainOneLineItemData; |
59 class CFsTreePlainOneLineItemData; |
64 class CFsWatermark; |
60 class CFsWatermark; |
65 class MFsTreeItemVisualizer; |
61 class MFsTreeItemVisualizer; |
66 class CFsInteractionInterval; |
62 class CFsInteractionInterval; |
67 class CFsAlfTextStyleManager; |
63 class CFsAlfTextStyleManager; |
68 class CAknDoubleSpanScrollBar; |
|
69 |
|
70 class CAknPhysics; |
64 class CAknPhysics; |
|
65 class CAlfAnchorLayout; |
71 |
66 |
72 /** |
67 /** |
73 * Contains the visual structure of the list. |
68 * Contains the visual structure of the list. |
74 * |
69 * |
75 */ |
70 */ |
396 |
391 |
397 /** |
392 /** |
398 * Get items visible in viewport's area. |
393 * Get items visible in viewport's area. |
399 */ |
394 */ |
400 void GetVisibleItemsL(RArray<TFsTreeItemId>& aVisible, TInt& aOffset); |
395 void GetVisibleItemsL(RArray<TFsTreeItemId>& aVisible, TInt& aOffset); |
401 |
396 |
402 /** |
397 /** |
403 * Returns ETrue if the world is higher than viewport. |
398 * Returns ETrue if the world is higher than viewport. |
404 */ |
399 */ |
405 TBool IsScrollBarNeeded() const; |
400 TBool IsScrollBarNeeded() const; |
406 |
401 |
472 |
467 |
473 /** |
468 /** |
474 * Called when viewport is updated. |
469 * Called when viewport is updated. |
475 */ |
470 */ |
476 void UpdatedL(TUpdatedByPhysic aUpdateByPhysic = ENotUpdatedByPhisic); |
471 void UpdatedL(TUpdatedByPhysic aUpdateByPhysic = ENotUpdatedByPhisic); |
477 |
472 |
478 |
473 |
479 |
474 |
480 private: // from TWorld::MObserver |
475 private: // from TWorld::MObserver |
481 |
476 |
482 /** |
477 /** |
483 * @see TWorld::MObserver::WorldUpdatedL |
478 * @see TWorld::MObserver::WorldUpdatedL |
559 // Size of the viewport |
554 // Size of the viewport |
560 TSize iSize; |
555 TSize iSize; |
561 |
556 |
562 // Viewport cache |
557 // Viewport cache |
563 TCache iCache; |
558 TCache iCache; |
564 |
559 |
565 // Wold index of the first item in Cache |
560 // Wold index of the first item in Cache |
566 TInt iWorldIndex; |
561 TInt iWorldIndex; |
567 |
562 |
568 }; |
563 }; |
569 |
564 |
586 public MFsTreeVisualizer, |
581 public MFsTreeVisualizer, |
587 public MFsTreeObserver, |
582 public MFsTreeObserver, |
588 public MFsFadeEffectObserver, |
583 public MFsFadeEffectObserver, |
589 public MFsSlideEffectObserver, |
584 public MFsSlideEffectObserver, |
590 public MAlfActionObserver, |
585 public MAlfActionObserver, |
591 public MEikScrollBarObserver, |
586 public MUiCScrollBar::MObserver, |
592 public TWorld::MObserver, |
587 public TWorld::MObserver, |
593 public TViewPort::MObserver, |
588 public TViewPort::MObserver, |
594 public MAknPhysicsObserver |
589 public MAknPhysicsObserver |
595 { |
590 { |
596 |
591 |
777 * this class. |
772 * this class. |
778 * |
773 * |
779 * @return Pointer to the newly constructed object. |
774 * @return Pointer to the newly constructed object. |
780 */ |
775 */ |
781 IMPORT_C static CFsTreeVisualizerBase* NewL( CAlfControl* aOwnerControl, |
776 IMPORT_C static CFsTreeVisualizerBase* NewL( CAlfControl* aOwnerControl, |
782 CAlfLayout& aParent, const TBool aDirectTouchMode = EFalse ); |
777 CAlfLayout& aParent, const TBool aPopUpMode = EFalse ); |
783 |
778 |
784 /** |
779 /** |
785 * C++ destructor |
780 * C++ destructor |
786 */ |
781 */ |
787 virtual ~CFsTreeVisualizerBase(); |
782 virtual ~CFsTreeVisualizerBase(); |
1016 */ |
1011 */ |
1017 // <cmail> |
1012 // <cmail> |
1018 virtual void SetFocusedItemL( const TFsTreeItemId aItem, TBool aCheckFocus = ETrue ); |
1013 virtual void SetFocusedItemL( const TFsTreeItemId aItem, TBool aCheckFocus = ETrue ); |
1019 // </cmail> |
1014 // </cmail> |
1020 |
1015 |
1021 /** |
1016 /** |
1022 * Gets item vertical position in the list |
1017 * Gets item vertical position in the list |
1023 * |
1018 * |
1024 * @param aIdx indicates item index |
1019 * @param aIdx indicates item index |
1025 */ |
1020 */ |
1026 virtual TInt GetItemWorldPosition( const TInt aIdx ); |
1021 virtual TInt GetItemWorldPosition( const TInt aIdx ); |
1027 |
1022 |
1028 /** |
1023 /** |
1029 * Returns item id of the currently focused item. |
1024 * Returns item id of the currently focused item. |
1030 * |
1025 * |
1031 * @return Id of the focused item. |
1026 * @return Id of the focused item. |
1032 */ |
1027 */ |
1626 * |
1621 * |
1627 * @param aActionCommand The command that is being executed. |
1622 * @param aActionCommand The command that is being executed. |
1628 */ |
1623 */ |
1629 virtual void HandleActionL(const TAlfActionCommand& aActionCommand); |
1624 virtual void HandleActionL(const TAlfActionCommand& aActionCommand); |
1630 |
1625 |
1631 // <cmail> Change scrollbar to avkon (to support skinning & touch) |
|
1632 public: |
1626 public: |
1633 |
1627 |
1634 /** |
1628 /** |
1635 * From MEikScrollBarObserver |
1629 * @see MUiCScrollBar::MObserver::HandleScrollEventL |
1636 * |
1630 */ |
1637 * Callback method for scroll bar events |
1631 void HandleScrollEventL( const MUiCScrollBar& aScrollBar, |
1638 * |
1632 MUiCScrollBar::TEvent aEvent ); |
1639 * Scroll bar observer should implement this method to get scroll bar events. |
|
1640 * |
|
1641 * @since S60 0.9 |
|
1642 * @param aScrollBar A pointer to scrollbar which created the event |
|
1643 * @param aEventType The event occured on the scroll bar |
|
1644 */ |
|
1645 void HandleScrollEventL(CEikScrollBar* aScrollBar, TEikScrollEvent aEventType); |
|
1646 |
1633 |
1647 /** |
1634 /** |
1648 * |
1635 * |
1649 */ |
1636 */ |
1650 void NotifyControlVisibilityChange( TBool aIsVisible ); |
1637 void NotifyControlVisibilityChange( TBool aIsVisible ); |
1660 * Returns status of kinetic scrolling. |
1647 * Returns status of kinetic scrolling. |
1661 * |
1648 * |
1662 * @return ETrue if kinetic scrolling is disabled. |
1649 * @return ETrue if kinetic scrolling is disabled. |
1663 */ |
1650 */ |
1664 TBool IsKineticScrollingDisabled() const; |
1651 TBool IsKineticScrollingDisabled() const; |
1665 |
1652 |
1666 /** |
1653 /** |
1667 * Returns viewPort top-left position |
1654 * Returns viewPort top-left position |
1668 */ |
1655 */ |
1669 virtual TPoint ViewPortTopPosition() const; |
1656 virtual TPoint ViewPortTopPosition() const; |
1670 |
1657 |
1776 * @param aTimeout Timeout needed for the update. |
1763 * @param aTimeout Timeout needed for the update. |
1777 */ |
1764 */ |
1778 void UpdateScrollBarL( const TInt aTimeout = 0 ); |
1765 void UpdateScrollBarL( const TInt aTimeout = 0 ); |
1779 TInt UpdateScrollBar( const TInt aTimeout = 0 ); |
1766 TInt UpdateScrollBar( const TInt aTimeout = 0 ); |
1780 void UpdateScrollBarIfNeededL(); |
1767 void UpdateScrollBarIfNeededL(); |
1781 |
1768 void SetScrollBarModelValues(); |
|
1769 |
1782 /** |
1770 /** |
1783 * Finds next focusable item. |
1771 * Finds next focusable item. |
1784 * |
1772 * |
1785 * @param aItemId Focusable item for whom next focusable should be |
1773 * @param aItemId Focusable item for whom next focusable should be |
1786 * found. |
1774 * found. |
1930 * |
1918 * |
1931 * @param aOwnerControl Owner control. |
1919 * @param aOwnerControl Owner control. |
1932 * @param aParent Parent layout for all the new layouts constructed by |
1920 * @param aParent Parent layout for all the new layouts constructed by |
1933 * this class. |
1921 * this class. |
1934 */ |
1922 */ |
1935 CFsTreeVisualizerBase( CAlfControl* aOwnerControl, CAlfLayout& aParent, const TBool aDirectTouchMode ); |
1923 CFsTreeVisualizerBase( CAlfControl* aOwnerControl, |
|
1924 CAlfLayout& aParent, const TBool aPopUpMode ); |
1936 |
1925 |
1937 /** |
1926 /** |
1938 * Second phase constructor |
1927 * Second phase constructor |
1939 * |
1928 * |
1940 */ |
1929 */ |
2057 * Layout in which items are placed. |
2046 * Layout in which items are placed. |
2058 */ |
2047 */ |
2059 CAlfFlowLayout* iListLayout; |
2048 CAlfFlowLayout* iListLayout; |
2060 |
2049 |
2061 /** |
2050 /** |
|
2051 * Layout in which scroll bar is shown (on top of others) |
|
2052 */ |
|
2053 CAlfAnchorLayout* iScrollBarLayout; |
|
2054 |
|
2055 /** |
2062 * Layout in which watermark is placed. |
2056 * Layout in which watermark is placed. |
2063 */ |
2057 */ |
2064 CAlfDeckLayout* iWatermarkLayout; |
2058 CAlfDeckLayout* iWatermarkLayout; |
2065 |
2059 |
2066 /** |
2060 /** |
2095 |
2089 |
2096 /** |
2090 /** |
2097 * Scrollbar |
2091 * Scrollbar |
2098 */ |
2092 */ |
2099 CAlfImageVisual* iDummyScrollbar; |
2093 CAlfImageVisual* iDummyScrollbar; |
2100 CAknDoubleSpanScrollBar* iScrollBar; |
2094 MUiCScrollBar* iScrollBar; |
2101 TAknDoubleSpanScrollBarModel iScrollbarModel; |
2095 TUiCScrollBarModel iScrollBarModel; |
2102 TFsScrollbarVisibility iScrollbarVisibility; |
2096 TFsScrollbarVisibility iScrollbarVisibility; |
2103 |
2097 |
2104 /** |
2098 /** |
2105 * Image visual for the selector. |
2099 * Image visual for the selector. |
2106 * Own. |
2100 * Own. |
2353 |
2347 |
2354 /** |
2348 /** |
2355 * Do physics update when simulation has finished. |
2349 * Do physics update when simulation has finished. |
2356 */ |
2350 */ |
2357 EUpdatePhysicsAfterSimulationFinished, |
2351 EUpdatePhysicsAfterSimulationFinished, |
2358 |
2352 |
2359 /** |
2353 /** |
2360 * Ignore next pointer up event. |
2354 * Ignore next pointer up event. |
2361 */ |
2355 */ |
2362 EIgnorePointerUpAction |
2356 EIgnorePointerUpAction, |
|
2357 |
|
2358 /** |
|
2359 * List is shown in popup mode. |
|
2360 */ |
|
2361 EPopupMode |
2363 }; |
2362 }; |
2364 |
2363 |
2365 // Flags |
2364 // Flags |
2366 TBitFlagsT<TUint> iFlags; |
2365 TBitFlagsT<TUint> iFlags; |
2367 |
2366 |