38 class TAknWindowComponentLayout; |
38 class TAknWindowComponentLayout; |
39 class CAknsBasicBackgroundControlContext; |
39 class CAknsBasicBackgroundControlContext; |
40 class CEikScrollBarFrame; |
40 class CEikScrollBarFrame; |
41 class CAknTreeListPhysicsHandler; |
41 class CAknTreeListPhysicsHandler; |
42 class CAknItemActionMenu; |
42 class CAknItemActionMenu; |
43 class CAknIconArray; |
|
44 |
43 |
45 /** |
44 /** |
46 * Hierarchical list view. |
45 * Hierarchical list view. |
47 * |
46 * |
48 * The hierarchical list view is responsible of maintaining the set of tree |
47 * The hierarchical list view is responsible of maintaining the set of tree |
57 public MEikScrollBarObserver, |
56 public MEikScrollBarObserver, |
58 public MAknTreeObserver, |
57 public MAknTreeObserver, |
59 public MAknsEffectAnimObserver, |
58 public MAknsEffectAnimObserver, |
60 public MEikCommandObserver, |
59 public MEikCommandObserver, |
61 public MAknCollection, |
60 public MAknCollection, |
62 public MAknLongTapDetectorCallBack, |
61 public MAknLongTapDetectorCallBack |
63 public MAknMarkingCollection |
62 |
64 { |
63 { |
65 |
64 |
66 public: |
65 public: |
67 |
66 |
68 /** |
67 /** |
447 TInt& ItemCountLimit(); |
446 TInt& ItemCountLimit(); |
448 TInt& HighlightIndex(); |
447 TInt& HighlightIndex(); |
449 TInt& TopIndex(); |
448 TInt& TopIndex(); |
450 TInt& BottomIndex(); |
449 TInt& BottomIndex(); |
451 |
450 |
|
451 void UpdateIndexes(); |
|
452 |
452 TInt iItemCountLimit; |
453 TInt iItemCountLimit; |
453 TInt iHighlightIndex; |
454 TInt iHighlightIndex; |
454 TInt iTopIndex; |
455 TInt iTopIndex; |
|
456 TInt iBottomIndex; |
455 |
457 |
456 #endif //RD_UI_TRANSITION_EFFECTS_LIST |
458 #endif //RD_UI_TRANSITION_EFFECTS_LIST |
457 |
459 |
458 public: // new method |
460 public: // new method |
459 /** |
461 /** |
641 */ |
643 */ |
642 void LayoutView(); |
644 void LayoutView(); |
643 |
645 |
644 /** |
646 /** |
645 * Updates scrollbars. |
647 * Updates scrollbars. |
646 * |
648 */ |
647 * @param aDrawNow Whether or not to draw the scrollbar. |
649 void UpdateScrollbars(); |
648 */ |
|
649 void UpdateScrollbars( TBool aDrawNow ); |
|
650 |
650 |
651 /** |
651 /** |
652 * Updates the horizontal position of the view so that the beginning of |
652 * Updates the horizontal position of the view so that the beginning of |
653 * the currently focused item can be seen. If the focused item is not in |
653 * the currently focused item can be seen. If the focused item is not in |
654 * the set of visible items, this method has no effect. |
654 * the set of visible items, this method has no effect. |
812 * view object given as parameter. |
812 * view object given as parameter. |
813 */ |
813 */ |
814 void DoHandleLongPressL(); |
814 void DoHandleLongPressL(); |
815 |
815 |
816 /** |
816 /** |
817 * Enters normal marking. When in marking state, the list controls the MSK |
817 * Enters marking mode. When in marking mode, the list controls the MSK |
818 * commands depending on whether the currently focused item is marked or |
818 * commands depending on whether the currently focused item is marked or |
819 * unmarked. Marking state is entered after specified timeout, when user |
819 * unmarked. Marking mode is entered after specified timeout, when user |
820 * keeps one of the marking modifier keys pressed. |
820 * keeps one of the marking modifier keys pressed. |
821 * |
821 * |
822 * Notifications of the beginning and ending of marking mode is sent to |
822 * Notifications of the beginning and ending of marking mode is sent to |
823 * list observers, so that they would not update the MSK commands, when |
823 * list observers, so that they would not update the MSK commands, when |
824 * they are handled by the list. |
824 * they are handled by the list. |
825 */ |
825 */ |
826 void EnterMarking(); |
826 void EnterMarkingMode(); |
827 |
827 |
828 /** |
828 /** |
829 * Exits marking state. Marking state is exited when user releases |
829 * Exits marking mode. Marking mode is exited when user releases |
830 * all the marking modifier keys. After that, the list no longer |
830 * all the marking modifier keys. After that, the list no longer |
831 * handles the MSK commands. |
831 * handles the MSK commands. |
832 */ |
832 */ |
833 void ExitMarking(); |
833 void ExitMarkingMode(); |
834 |
834 |
835 /** |
835 /** |
836 * Updates correct mark/unmark command to MSK depending on the marking |
836 * Updates correct mark/unmark command to MSK depending on the marking |
837 * of current focused item. |
837 * of current focused item. |
838 */ |
838 */ |
864 * |
864 * |
865 * @param aItem Tree item that should be visible. |
865 * @param aItem Tree item that should be visible. |
866 */ |
866 */ |
867 void UpdateViewItemAsVisible( CAknTreeItem* aItem ); |
867 void UpdateViewItemAsVisible( CAknTreeItem* aItem ); |
868 |
868 |
869 /** |
|
870 * Updates indexes |
|
871 */ |
|
872 void UpdateIndexes(); |
|
873 |
|
874 /** |
|
875 * Loads marking mode icons. |
|
876 */ |
|
877 void LoadMarkingIconsL(); |
|
878 |
|
879 // from base class CCoeControl |
869 // from base class CCoeControl |
880 |
870 |
881 /** |
871 /** |
882 * From CCoeControl. |
872 * From CCoeControl. |
883 * Draws the tree list view. |
873 * Draws the tree list view. |
897 |
887 |
898 /** |
888 /** |
899 * Enables or disables highlight |
889 * Enables or disables highlight |
900 * |
890 * |
901 * @param ETrue to enable highlight, EFalse to disable |
891 * @param ETrue to enable highlight, EFalse to disable |
902 * @param aPointerEnabled ETrue if highlight was enabled by pointer event. |
892 */ |
903 */ |
893 void EnableHighlight( TBool aEnabled ); |
904 void EnableHighlight( TBool aEnabled, TBool aPointerEnabled = EFalse ); |
|
905 |
894 |
906 /** |
895 /** |
907 * Is highlight enabled |
896 * Is highlight enabled |
908 * |
897 * |
909 * @return ETrue if highlight is enabled |
898 * @return ETrue if highlight is enabled |
926 /** |
915 /** |
927 * Has list marked items |
916 * Has list marked items |
928 * |
917 * |
929 * @return ETrue if list has marked items |
918 * @return ETrue if list has marked items |
930 */ |
919 */ |
931 TBool HasMarkedItemsL() const; |
920 TBool HasMarkedItemsL(); |
932 |
921 |
933 // From MAknCollection |
922 // From MAknCollection |
934 /** |
923 /** |
935 * Returns the collection state. The state is combination of |
924 * Returns the collection state. The state is combination of |
936 * flags defined in MAknCollection::TStateFlag. |
925 * flags defined in MAknCollection::TStateFlag. |
952 * @param a0 First extension method parameter. |
941 * @param a0 First extension method parameter. |
953 * @param a1 Second extension method parameter. |
942 * @param a1 Second extension method parameter. |
954 */ |
943 */ |
955 TInt CollectionExtension( TUint aExtensionId, TAny*& a0, TAny* a1 ); |
944 TInt CollectionExtension( TUint aExtensionId, TAny*& a0, TAny* a1 ); |
956 |
945 |
957 // From MAknMarkingCollection |
|
958 /** |
|
959 * Sets multiple marking state. |
|
960 * |
|
961 * @param aActive ETrue if multiple marking should be active. |
|
962 */ |
|
963 void SetMultipleMarkingState( TBool aActive ); |
|
964 |
|
965 /** |
|
966 * Returns the collection marking state. The state is combination of |
|
967 * flags defined in @c TStateFlag. |
|
968 * |
|
969 * @return Collection state. |
|
970 */ |
|
971 TUint MarkingState() const; |
|
972 |
|
973 /** |
|
974 * Marks the currently selected item. |
|
975 */ |
|
976 void MarkCurrentItemL(); |
|
977 |
|
978 /** |
|
979 * Marks all items in the collection. |
|
980 */ |
|
981 void MarkAllL(); |
|
982 |
|
983 /** |
|
984 * Unmarks all items in the collection. |
|
985 */ |
|
986 void UnmarkAll(); |
|
987 |
|
988 /* |
|
989 * Can current item be marked. |
|
990 */ |
|
991 TBool CurrentItemMarkable(); |
|
992 |
|
993 /** |
|
994 * Returns whether the observer accepts ending of marking mode |
|
995 * |
|
996 * @return ETrue if observer accepts exiting marking mode |
|
997 */ |
|
998 TBool ExitMarkingMode(); |
|
999 |
|
1000 /** |
|
1001 * Reports collection change event. |
|
1002 */ |
|
1003 void ReportCollectionChangedEvent(); |
|
1004 |
|
1005 |
|
1006 // From MAknLongTapDetectorCallBack |
946 // From MAknLongTapDetectorCallBack |
1007 /** |
947 /** |
1008 * Long tap detector callback |
948 * Long tap detector callback |
1009 * |
949 * |
1010 * @param aPenEventLocation Long tap event location relative to parent control. |
950 * @param aPenEventLocation Long tap event location relative to parent control. |
1110 * Pointer to the list item that was focused before EButton1Down event. |
1050 * Pointer to the list item that was focused before EButton1Down event. |
1111 * Not own. |
1051 * Not own. |
1112 */ |
1052 */ |
1113 CAknTreeItem* iPreviouslyFocusedItem; |
1053 CAknTreeItem* iPreviouslyFocusedItem; |
1114 |
1054 |
|
1055 TBool iIsPressedDownState; |
|
1056 |
|
1057 TBool iIsDragged; |
1115 |
1058 |
1116 /** |
1059 /** |
1117 * Physics handler. Used only when physics feature is enabled. |
1060 * Physics handler. Used only when physics feature is enabled. |
1118 * Own. |
1061 * Own. |
1119 */ |
1062 */ |
1120 CAknTreeListPhysicsHandler* iPhysicsHandler; |
1063 CAknTreeListPhysicsHandler* iPhysicsHandler; |
1121 |
1064 |
|
1065 /** |
|
1066 * ETrue if physics view should be adjusted according to top item. |
|
1067 */ |
|
1068 TBool iScrollPhysicsTop; |
1122 |
1069 |
1123 /** |
1070 /** |
1124 * Pointer to tfx redirect gc for effects |
1071 * Pointer to tfx redirect gc for effects |
1125 * |
1072 * |
1126 */ |
1073 */ |
1134 |
1081 |
1135 /** |
1082 /** |
1136 * Long tap detector |
1083 * Long tap detector |
1137 */ |
1084 */ |
1138 CAknLongTapDetector* iLongTapDetector; |
1085 CAknLongTapDetector* iLongTapDetector; |
1139 |
|
1140 /** |
|
1141 * Last visible item index |
|
1142 */ |
|
1143 TInt iBottomIndex; |
|
1144 |
|
1145 |
|
1146 /** |
|
1147 * Remember pointer to bottom item. Use for drawing line seperator only. |
|
1148 * iBottomIndex is not valid in some case becaue of iItems already changed. |
|
1149 * Not own. |
|
1150 */ |
|
1151 CAknTreeItem* iBottomItem; |
|
1152 |
|
1153 |
|
1154 /** |
|
1155 * Array for marking mode icons. |
|
1156 * Own. |
|
1157 */ |
|
1158 CAknIconArray* iMarkingIconArray; |
|
1159 |
|
1160 /** |
|
1161 * Ordinal position of window, before stylus menu is opened. |
|
1162 */ |
|
1163 TInt iOldWinPos; |
|
1164 }; |
1086 }; |
1165 |
1087 |
|
1088 |
1166 #endif // C_AKNTREELISTVIEW_H |
1089 #endif // C_AKNTREELISTVIEW_H |