uifw/AvKon/aknhlist/inc/akntreelistview.h
branchRCL_3
changeset 23 3d340a0166ff
parent 18 0aa5fbdfbc30
child 25 941195f2d488
--- a/uifw/AvKon/aknhlist/inc/akntreelistview.h	Tue Apr 27 16:55:05 2010 +0300
+++ b/uifw/AvKon/aknhlist/inc/akntreelistview.h	Tue May 11 16:27:42 2010 +0300
@@ -29,6 +29,7 @@
 #include <akntreelistobserver.h>
 #include <akncollection.h>
 #include <aknlongtapdetector.h>
+#include <aknmarkingmodeobserver.h>
 
 #include "akntreeobserver.h"
 #include "akntreelistviewitem.h"
@@ -40,6 +41,7 @@
 class CEikScrollBarFrame;
 class CAknTreeListPhysicsHandler;
 class CAknItemActionMenu;
+class CAknIconArray;
 
 /**
  *  Hierarchical list view.
@@ -58,8 +60,8 @@
                                         public MAknsEffectAnimObserver,
                                         public MEikCommandObserver,
                                         public MAknCollection,
-                                        public MAknLongTapDetectorCallBack
-                                        
+                                        public MAknLongTapDetectorCallBack,
+                                        public MAknMarkingCollection
     {
 
 public:
@@ -813,23 +815,23 @@
     void DoHandleLongPressL();
 
     /**
-     * Enters marking mode. When in marking mode, the list controls the MSK
+     * Enters normal marking. When in marking state, the list controls the MSK
      * commands depending on whether the currently focused item is marked or
-     * unmarked. Marking mode is entered after specified timeout, when user
+     * unmarked. Marking state is entered after specified timeout, when user
      * keeps one of the marking modifier keys pressed.
      *
      * Notifications of the beginning and ending of marking mode is sent to
      * list observers, so that they would not update the MSK commands, when
      * they are handled by the list.
      */
-    void EnterMarkingMode();
+    void EnterMarking();
 
     /**
-     * Exits marking mode. Marking mode is exited when user releases
+     * Exits marking state. Marking state is exited when user releases
      * all the marking modifier keys. After that, the list no longer
      * handles the MSK commands.
      */
-    void ExitMarkingMode();
+    void ExitMarking();
 
     /**
      * Updates correct mark/unmark command to MSK depending on the marking
@@ -870,6 +872,10 @@
      */
 	void UpdateIndexes();
 	
+	/**
+	 * Loads marking mode icons.
+	 */
+    void LoadMarkingIconsL();
 	
 // from base class CCoeControl
 
@@ -894,8 +900,9 @@
      * Enables or disables highlight
      * 
      * @param ETrue to enable highlight, EFalse to disable
-     */
-    void EnableHighlight( TBool aEnabled );
+     * @param aPointerEnabled ETrue if highlight was enabled by pointer event.
+     */    
+    void EnableHighlight( TBool aEnabled, TBool aPointerEnabled = EFalse );
 
     /**
      * Is highlight enabled
@@ -922,7 +929,7 @@
      * 
      * @return ETrue if list has marked items
      */    
-    TBool HasMarkedItemsL();    
+    TBool HasMarkedItemsL() const;
     
 // From MAknCollection
     /**
@@ -948,6 +955,55 @@
      */    
     TInt CollectionExtension( TUint aExtensionId, TAny*& a0, TAny* a1 );    
 
+// From MAknMarkingCollection
+    /**
+     * Sets multiple marking state.
+     *
+     * @param aActive ETrue if multiple marking should be active.
+     */
+    void SetMultipleMarkingState( TBool aActive );
+
+    /**
+     * Returns the collection marking state. The state is combination of
+     * flags defined in @c TStateFlag. 
+     *
+     * @return  Collection state.
+     */
+    TUint MarkingState() const;
+
+    /**
+     * Marks the currently selected item.
+     */
+    void MarkCurrentItemL();
+     
+    /**
+     * Marks all items in the collection.
+     */
+    void MarkAllL(); 
+
+    /**
+     * Unmarks all items in the collection.
+     */
+    void UnmarkAll();
+    
+    /*
+     * Can current item be marked.
+     */
+    TBool CurrentItemMarkable();    
+
+    /**
+     * Returns whether the observer accepts ending of marking mode
+     * 
+     * @return ETrue if observer accepts exiting marking mode
+     */
+    TBool ExitMarkingMode();
+
+    /**
+     * Reports collection change event.
+     */    
+    void ReportCollectionChangedEvent();   
+
+
 // From MAknLongTapDetectorCallBack
     /**
      * Long tap detector callback 
@@ -1099,14 +1155,23 @@
 	 */
 	TBool iMirroredLayoutInUse;
 	
-
     /**
      * Remember pointer to bottom item. Use for drawing line seperator only.
      * iBottomIndex is not valid in some case becaue of iItems already changed.
      * Not own.
      */
 	CAknTreeItem* iBottomItem;	
+
+	/**
+	 * Whether marking mode is activated or not.
+	 */
+	TBool iMarkingMode;
+	
+	/**
+	 * Array for marking mode icons.
+	 * Own.
+	 */
+    CAknIconArray* iMarkingIconArray;
     };
 
-
 #endif // C_AKNTREELISTVIEW_H