uifw/AvKon/aknhlist/inc/akntreelistview.h
branchRCL_3
changeset 23 3d340a0166ff
parent 18 0aa5fbdfbc30
child 25 941195f2d488
equal deleted inserted replaced
18:0aa5fbdfbc30 23:3d340a0166ff
    27 #include <babitflags.h>
    27 #include <babitflags.h>
    28 #include <eikcmobs.h>
    28 #include <eikcmobs.h>
    29 #include <akntreelistobserver.h>
    29 #include <akntreelistobserver.h>
    30 #include <akncollection.h>
    30 #include <akncollection.h>
    31 #include <aknlongtapdetector.h>
    31 #include <aknlongtapdetector.h>
       
    32 #include <aknmarkingmodeobserver.h>
    32 
    33 
    33 #include "akntreeobserver.h"
    34 #include "akntreeobserver.h"
    34 #include "akntreelistviewitem.h"
    35 #include "akntreelistviewitem.h"
    35 
    36 
    36 class CAknTreeNode;
    37 class CAknTreeNode;
    38 class TAknWindowComponentLayout;
    39 class TAknWindowComponentLayout;
    39 class CAknsBasicBackgroundControlContext;
    40 class CAknsBasicBackgroundControlContext;
    40 class CEikScrollBarFrame;
    41 class CEikScrollBarFrame;
    41 class CAknTreeListPhysicsHandler;
    42 class CAknTreeListPhysicsHandler;
    42 class CAknItemActionMenu;
    43 class CAknItemActionMenu;
       
    44 class CAknIconArray;
    43 
    45 
    44 /**
    46 /**
    45  *  Hierarchical list view.
    47  *  Hierarchical list view.
    46  *
    48  *
    47  *  The hierarchical list view is responsible of maintaining the set of tree
    49  *  The hierarchical list view is responsible of maintaining the set of tree
    56                                         public MEikScrollBarObserver,
    58                                         public MEikScrollBarObserver,
    57                                         public MAknTreeObserver,
    59                                         public MAknTreeObserver,
    58                                         public MAknsEffectAnimObserver,
    60                                         public MAknsEffectAnimObserver,
    59                                         public MEikCommandObserver,
    61                                         public MEikCommandObserver,
    60                                         public MAknCollection,
    62                                         public MAknCollection,
    61                                         public MAknLongTapDetectorCallBack
    63                                         public MAknLongTapDetectorCallBack,
    62                                         
    64                                         public MAknMarkingCollection
    63     {
    65     {
    64 
    66 
    65 public:
    67 public:
    66 
    68 
    67     /**
    69     /**
   811      * view object given as parameter.
   813      * view object given as parameter.
   812      */
   814      */
   813     void DoHandleLongPressL();
   815     void DoHandleLongPressL();
   814 
   816 
   815     /**
   817     /**
   816      * Enters marking mode. When in marking mode, the list controls the MSK
   818      * Enters normal marking. When in marking state, the list controls the MSK
   817      * commands depending on whether the currently focused item is marked or
   819      * commands depending on whether the currently focused item is marked or
   818      * unmarked. Marking mode is entered after specified timeout, when user
   820      * unmarked. Marking state is entered after specified timeout, when user
   819      * keeps one of the marking modifier keys pressed.
   821      * keeps one of the marking modifier keys pressed.
   820      *
   822      *
   821      * Notifications of the beginning and ending of marking mode is sent to
   823      * Notifications of the beginning and ending of marking mode is sent to
   822      * list observers, so that they would not update the MSK commands, when
   824      * list observers, so that they would not update the MSK commands, when
   823      * they are handled by the list.
   825      * they are handled by the list.
   824      */
   826      */
   825     void EnterMarkingMode();
   827     void EnterMarking();
   826 
   828 
   827     /**
   829     /**
   828      * Exits marking mode. Marking mode is exited when user releases
   830      * Exits marking state. Marking state is exited when user releases
   829      * all the marking modifier keys. After that, the list no longer
   831      * all the marking modifier keys. After that, the list no longer
   830      * handles the MSK commands.
   832      * handles the MSK commands.
   831      */
   833      */
   832     void ExitMarkingMode();
   834     void ExitMarking();
   833 
   835 
   834     /**
   836     /**
   835      * Updates correct mark/unmark command to MSK depending on the marking
   837      * Updates correct mark/unmark command to MSK depending on the marking
   836      * of current focused item.
   838      * of current focused item.
   837      */
   839      */
   868     /**
   870     /**
   869      * Updates indexes 
   871      * Updates indexes 
   870      */
   872      */
   871 	void UpdateIndexes();
   873 	void UpdateIndexes();
   872 	
   874 	
       
   875 	/**
       
   876 	 * Loads marking mode icons.
       
   877 	 */
       
   878     void LoadMarkingIconsL();
   873 	
   879 	
   874 // from base class CCoeControl
   880 // from base class CCoeControl
   875 
   881 
   876     /**
   882     /**
   877      * From CCoeControl.
   883      * From CCoeControl.
   892     
   898     
   893     /**
   899     /**
   894      * Enables or disables highlight
   900      * Enables or disables highlight
   895      * 
   901      * 
   896      * @param ETrue to enable highlight, EFalse to disable
   902      * @param ETrue to enable highlight, EFalse to disable
   897      */
   903      * @param aPointerEnabled ETrue if highlight was enabled by pointer event.
   898     void EnableHighlight( TBool aEnabled );
   904      */    
       
   905     void EnableHighlight( TBool aEnabled, TBool aPointerEnabled = EFalse );
   899 
   906 
   900     /**
   907     /**
   901      * Is highlight enabled
   908      * Is highlight enabled
   902      * 
   909      * 
   903      * @return ETrue if highlight is enabled
   910      * @return ETrue if highlight is enabled
   920     /**
   927     /**
   921      * Has list marked items
   928      * Has list marked items
   922      * 
   929      * 
   923      * @return ETrue if list has marked items
   930      * @return ETrue if list has marked items
   924      */    
   931      */    
   925     TBool HasMarkedItemsL();    
   932     TBool HasMarkedItemsL() const;
   926     
   933     
   927 // From MAknCollection
   934 // From MAknCollection
   928     /**
   935     /**
   929      * Returns the collection state. The state is combination of
   936      * Returns the collection state. The state is combination of
   930      * flags defined in MAknCollection::TStateFlag. 
   937      * flags defined in MAknCollection::TStateFlag. 
   945      * @param  aExtensionId  Extension id. 
   952      * @param  aExtensionId  Extension id. 
   946      * @param  a0            First extension method parameter.
   953      * @param  a0            First extension method parameter.
   947      * @param  a1            Second extension method parameter.
   954      * @param  a1            Second extension method parameter.
   948      */    
   955      */    
   949     TInt CollectionExtension( TUint aExtensionId, TAny*& a0, TAny* a1 );    
   956     TInt CollectionExtension( TUint aExtensionId, TAny*& a0, TAny* a1 );    
       
   957 
       
   958 // From MAknMarkingCollection
       
   959     /**
       
   960      * Sets multiple marking state.
       
   961      *
       
   962      * @param aActive ETrue if multiple marking should be active.
       
   963      */
       
   964     void SetMultipleMarkingState( TBool aActive );
       
   965 
       
   966     /**
       
   967      * Returns the collection marking state. The state is combination of
       
   968      * flags defined in @c TStateFlag. 
       
   969      *
       
   970      * @return  Collection state.
       
   971      */
       
   972     TUint MarkingState() const;
       
   973 
       
   974     /**
       
   975      * Marks the currently selected item.
       
   976      */
       
   977     void MarkCurrentItemL();
       
   978      
       
   979     /**
       
   980      * Marks all items in the collection.
       
   981      */
       
   982     void MarkAllL(); 
       
   983 
       
   984     /**
       
   985      * Unmarks all items in the collection.
       
   986      */
       
   987     void UnmarkAll();
       
   988     
       
   989     /*
       
   990      * Can current item be marked.
       
   991      */
       
   992     TBool CurrentItemMarkable();    
       
   993 
       
   994     /**
       
   995      * Returns whether the observer accepts ending of marking mode
       
   996      * 
       
   997      * @return ETrue if observer accepts exiting marking mode
       
   998      */
       
   999     TBool ExitMarkingMode();
       
  1000 
       
  1001     /**
       
  1002      * Reports collection change event.
       
  1003      */    
       
  1004     void ReportCollectionChangedEvent();   
       
  1005 
   950 
  1006 
   951 // From MAknLongTapDetectorCallBack
  1007 // From MAknLongTapDetectorCallBack
   952     /**
  1008     /**
   953      * Long tap detector callback 
  1009      * Long tap detector callback 
   954      *
  1010      *
  1097 	/**
  1153 	/**
  1098 	 * Whether or not mirrored layout is currently in use.
  1154 	 * Whether or not mirrored layout is currently in use.
  1099 	 */
  1155 	 */
  1100 	TBool iMirroredLayoutInUse;
  1156 	TBool iMirroredLayoutInUse;
  1101 	
  1157 	
  1102 
       
  1103     /**
  1158     /**
  1104      * Remember pointer to bottom item. Use for drawing line seperator only.
  1159      * Remember pointer to bottom item. Use for drawing line seperator only.
  1105      * iBottomIndex is not valid in some case becaue of iItems already changed.
  1160      * iBottomIndex is not valid in some case becaue of iItems already changed.
  1106      * Not own.
  1161      * Not own.
  1107      */
  1162      */
  1108 	CAknTreeItem* iBottomItem;	
  1163 	CAknTreeItem* iBottomItem;	
       
  1164 
       
  1165 	/**
       
  1166 	 * Whether marking mode is activated or not.
       
  1167 	 */
       
  1168 	TBool iMarkingMode;
       
  1169 	
       
  1170 	/**
       
  1171 	 * Array for marking mode icons.
       
  1172 	 * Own.
       
  1173 	 */
       
  1174     CAknIconArray* iMarkingIconArray;
  1109     };
  1175     };
  1110 
  1176 
  1111 
       
  1112 #endif // C_AKNTREELISTVIEW_H
  1177 #endif // C_AKNTREELISTVIEW_H