menufw/menufwui/mmwidgets/inc/mmwidgetcontainer.h
changeset 1 5315654608de
parent 0 f72a12da539e
child 2 08c6ee43b396
equal deleted inserted replaced
0:f72a12da539e 1:5315654608de
     9 * Initial Contributors:
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    10 * Nokia Corporation - initial contribution.
    11 *
    11 *
    12 * Contributors:
    12 * Contributors:
    13 *
    13 *
    14 * Description:  
    14 * Description:
    15 *  Version     : %version: MM_48.1.33 % << Don't touch! Updated by Synergy at check-out.
    15 *  Version     : %version: MM_48.1.35 % << Don't touch! Updated by Synergy at check-out.
    16 *
    16 *
    17 */
    17 */
    18 
    18 
    19 
    19 
    20 #ifndef MMMWIDGETCONTAINER_H
    20 #ifndef MMMWIDGETCONTAINER_H
    27 #include <eiklbx.h>
    27 #include <eiklbx.h>
    28 #include <coecntrl.h>
    28 #include <coecntrl.h>
    29 #include <AknsDrawUtils.h>
    29 #include <AknsDrawUtils.h>
    30 #include <AknsLayeredBackgroundControlContext.h>
    30 #include <AknsLayeredBackgroundControlContext.h>
    31 #include <AknsListBoxBackgroundControlContext.h>
    31 #include <AknsListBoxBackgroundControlContext.h>
    32 #include <aknlongtapdetector.h> 
    32 #include <aknlongtapdetector.h>
    33 
    33 
    34 #include "hnsuiteobserver.h"
    34 #include "hnsuiteobserver.h"
    35 #include "mmvisibilityobserver.h"
    35 #include "mmvisibilityobserver.h"
    36 #include "hnglobals.h"
    36 #include "hnglobals.h"
    37 
    37 
    55  */
    55  */
    56 const TInt KDragDelta( 640 );
    56 const TInt KDragDelta( 640 );
    57 
    57 
    58 /**
    58 /**
    59  * Structure used to store cache for widget position.
    59  * Structure used to store cache for widget position.
    60  * 
    60  *
    61  * @since S60 v5.0
    61  * @since S60 v5.0
    62  * @ingroup group_mmwidgets
    62  * @ingroup group_mmwidgets
    63  */
    63  */
    64 class TMmWidgetPosition
    64 class TMmWidgetPosition
    65 	{
    65 	{
    67     /**
    67     /**
    68      * Default constructor.
    68      * Default constructor.
    69      * Initializes member variables with sensible values.
    69      * Initializes member variables with sensible values.
    70      */
    70      */
    71     TMmWidgetPosition();
    71     TMmWidgetPosition();
    72     
    72 
    73 public: // data
    73 public: // data
    74 	/**
    74 	/**
    75 	 * The vertical item offset cache.
    75 	 * The vertical item offset cache.
    76 	 */
    76 	 */
    77 	TInt iVerticalItemOffset;
    77 	TInt iVerticalItemOffset;
    78 	
    78 
    79 	/**
    79 	/**
    80 	 * The top item index cache.
    80 	 * The top item index cache.
    81 	 */
    81 	 */
    82 	TInt iTopItemIndex;
    82 	TInt iTopItemIndex;
    83 	
    83 
    84 	/**
    84 	/**
    85 	 * Tells if the cached values are valid.
    85 	 * Tells if the cached values are valid.
    86 	 */
    86 	 */
    87 	TBool iValid;
    87 	TBool iValid;
    88 	
    88 
    89 	/**
    89 	/**
    90 	 * The mode (portrait/landscape) for which the cache is valid.
    90 	 * The mode (portrait/landscape) for which the cache is valid.
    91 	 */
    91 	 */
    92 	TBool iLandscape;
    92 	TBool iLandscape;
    93 	
    93 
    94 	/**
    94 	/**
    95 	 * Id from model (not index) of the currently highlighted item.
    95 	 * Id from model (not index) of the currently highlighted item.
    96 	 * It should only be set if the currently highlighted item is
    96 	 * It should only be set if the currently highlighted item is
    97 	 * visible (fully or partially), otherwise it must remain 
    97 	 * visible (fully or partially), otherwise it must remain
    98 	 * initialized to KErrNotFound.
    98 	 * initialized to KErrNotFound.
    99 	 */
    99 	 */
   100 	TInt iHighlightedItemId;
   100 	TInt iHighlightedItemId;
   101 	};
   101 	};
   102 
   102 
   103 /**
   103 /**
   104  *  Interface for widget containers.
   104  *  Interface for widget containers.
   105  *  
   105  *
   106  *  @code
   106  *  @code
   107  *  @endcode
   107  *  @endcode
   108  *  @lib mmwidgets
   108  *  @lib mmwidgets
   109  *  @since S60 v3.0
   109  *  @since S60 v3.0
   110  *  @ingroup group_mmwidgets
   110  *  @ingroup group_mmwidgets
   111  */
   111  */
   112 
   112 
   113 NONSHARABLE_CLASS( CMmWidgetContainer ): public CCoeControl, 
   113 NONSHARABLE_CLASS( CMmWidgetContainer ): public CCoeControl,
   114                                          public MMmVisibilityObserver,
   114                                          public MMmVisibilityObserver,
   115                                          public MEikListBoxObserver,
   115                                          public MEikListBoxObserver,
   116                                          public MAknLongTapDetectorCallBack                    
   116                                          public MAknLongTapDetectorCallBack
   117 	{
   117 	{
   118 public:
   118 public:
   119         
   119 
   120     /**
   120     /**
   121      * Creates a new grid container.
   121      * Creates a new grid container.
   122      *
   122      *
   123      * @since S60 v3.0
   123      * @since S60 v3.0
   124      * @param aRect Parent rectangle.
   124      * @param aRect Parent rectangle.
   125      * @param aObjectProvider Object provider.
   125      * @param aObjectProvider Object provider.
   126      * @return GridContainer.
   126      * @return GridContainer.
   127      */
   127      */
   128      IMPORT_C static CMmWidgetContainer* NewGridContainerL( const TRect& aRect, 
   128      IMPORT_C static CMmWidgetContainer* NewGridContainerL( const TRect& aRect,
   129             MObjectProvider* aObjectProvider, CMmTemplateLibrary* aTemplateLibrary );
   129             MObjectProvider* aObjectProvider, CMmTemplateLibrary* aTemplateLibrary );
   130 	
   130 
   131     /**
   131     /**
   132      * Creates a new listbox container.
   132      * Creates a new listbox container.
   133      *
   133      *
   134      * @since S60 v3.0
   134      * @since S60 v3.0
   135      * @param aRect Parent rectangle.
   135      * @param aRect Parent rectangle.
   136      * @param aObjectProvider Object provider.
   136      * @param aObjectProvider Object provider.
   137      * @param aTemplateLibrary Template library for drawer. 
   137      * @param aTemplateLibrary Template library for drawer.
   138      * @return ListboxContainer.
   138      * @return ListboxContainer.
   139      */
   139      */
   140      IMPORT_C static CMmWidgetContainer* NewListBoxContainerL( const TRect& aRect, 
   140      IMPORT_C static CMmWidgetContainer* NewListBoxContainerL( const TRect& aRect,
   141             MObjectProvider* aObjectProvider, CMmTemplateLibrary* aTemplateLibrary );
   141             MObjectProvider* aObjectProvider, CMmTemplateLibrary* aTemplateLibrary );
   142 	
   142 
   143 public: // Highlight related methods    
   143 public: // Highlight related methods
   144     
   144 
   145 	/**
   145 	/**
   146 	 * Sets the default highlight.
   146 	 * Sets the default highlight.
   147 	 *
   147 	 *
   148      * @since S60 v3.0
   148      * @since S60 v3.0
   149      * @param aRedraw Is highlight to redraw.
   149      * @param aRedraw Is highlight to redraw.
   150      */
   150      */
   151 	virtual void SetDefaultHighlightL( TBool aRedraw = ETrue ) = 0;
   151 	virtual void SetDefaultHighlightL( TBool aRedraw = ETrue ) = 0;
   152 	    
   152 
   153     /**
   153     /**
   154      * Sets the highlight.
   154      * Sets the highlight.
   155      * 
   155      *
   156      * @since S60 v3.0
   156      * @since S60 v3.0
   157      * @param aItemIndex Index to set the highlight at.
   157      * @param aItemIndex Index to set the highlight at.
   158      * @param aRedraw Is highlight to redraw.
   158      * @param aRedraw Is highlight to redraw.
   159      */
   159      */
   160 	IMPORT_C virtual void SetManualHighlightL(TInt aItemIndex,  TBool aRedraw = ETrue );
   160 	IMPORT_C virtual void SetManualHighlightL(TInt aItemIndex,  TBool aRedraw = ETrue );
   161     
   161 
   162     /**
   162     /**
   163      * Gets the highlight from the widget.
   163      * Gets the highlight from the widget.
   164      * 
   164      *
   165      * @since S60 v3.0
   165      * @since S60 v3.0
   166      * @return Current Highlight in the widget.
   166      * @return Current Highlight in the widget.
   167      */
   167      */
   168 	IMPORT_C virtual TInt GetHighlight();
   168 	IMPORT_C virtual TInt GetHighlight();
   169     
   169 
   170     /**
   170     /**
   171      * Gets the highlight from the widget.
   171      * Gets the highlight from the widget.
   172      * 
   172      *
   173      * @since S60 v3.0
   173      * @since S60 v3.0
   174      * @return Previous Highlight in the widget.
   174      * @return Previous Highlight in the widget.
   175      */
   175      */
   176 	IMPORT_C virtual TInt GetPreviousHighlight();
   176 	IMPORT_C virtual TInt GetPreviousHighlight();
   177     
   177 
   178     /**
   178     /**
   179      * Set highlight visibility.
   179      * Set highlight visibility.
   180      * 
   180      *
   181      * @since S60 v3.0
   181      * @since S60 v3.0
   182      * @param aVisible Visibility status. 
   182      * @param aVisible Visibility status.
   183      */
   183      */
   184 	IMPORT_C virtual void SetHighlightVisibilityL( TBool aVisible );
   184 	IMPORT_C virtual void SetHighlightVisibilityL( TBool aVisible );
   185     
   185 
   186     /**
   186     /**
   187      * Set highlight visibility.
   187      * Set highlight visibility.
   188      * 
   188      *
   189      * @since S60 v3.0
   189      * @since S60 v3.0
   190      * @return Visibility status.
   190      * @return Visibility status.
   191      */
   191      */
   192 	IMPORT_C virtual TBool IsHighlightVisible();
   192 	IMPORT_C virtual TBool IsHighlightVisible();
   193 	
   193 
   194     /**
   194     /**
   195      * Handle item addition.
   195      * Handle item addition.
   196      * 
   196      *
   197      * @since S60 v3.0
   197      * @since S60 v3.0
   198      */
   198      */
   199 	IMPORT_C virtual void HandleItemAdditionL();
   199 	IMPORT_C virtual void HandleItemAdditionL();
   200     
   200 
   201 	
   201 
   202     /**
   202     /**
   203      * Handle item removal.
   203      * Handle item removal.
   204      * 
   204      *
   205      * @since S60 v3.0
   205      * @since S60 v3.0
   206      */
   206      */
   207 	IMPORT_C virtual void HandleItemRemovalL();
   207 	IMPORT_C virtual void HandleItemRemovalL();
   208 	
   208 
   209     /**
   209     /**
   210      * Handle item removal.
   210      * Handle item removal.
   211      * 
   211      *
   212      * @since S60 v3.0
   212      * @since S60 v3.0
   213      */
   213      */
   214 	IMPORT_C CHnSuiteModel* GetSuiteModelL(); 	
   214 	IMPORT_C CHnSuiteModel* GetSuiteModelL();
   215 	
   215 
   216     /**
   216     /**
   217      * Retrieve type of widget.
   217      * Retrieve type of widget.
   218      * 
   218      *
   219      * @since S60 v3.0
   219      * @since S60 v3.0
   220      * @return Type of widget.
   220      * @return Type of widget.
   221      */
   221      */
   222 	IMPORT_C virtual THnSuiteWidgetType WidgetType();
   222 	IMPORT_C virtual THnSuiteWidgetType WidgetType();
   223 	
   223 
   224 	/**
   224 	/**
   225 	 * Removes all LIW objects owned by this object.
   225 	 * Removes all LIW objects owned by this object.
   226      * 
   226      *
   227      * LIW objects owned by non-LIW objects that are owned by
   227      * LIW objects owned by non-LIW objects that are owned by
   228      * this object are also removed.  
   228      * this object are also removed.
   229 	 */
   229 	 */
   230 	virtual void RemoveLiwObjects();
   230 	virtual void RemoveLiwObjects();
   231 	
   231 
   232 	/**
   232 	/**
   233 	 * Checks if timer is active. 
   233 	 * Checks if timer is active.
   234 	 * Calling this method without parameters will cause to return
   234 	 * Calling this method without parameters will cause to return
   235 	 * timer activity state globally (without reference to a specific item index - which tells
   235 	 * timer activity state globally (without reference to a specific item index - which tells
   236 	 * if timer is active at all).
   236 	 * if timer is active at all).
   237      * 
   237      *
   238      * @param aItemIndex Item index for which to check timer activity. Can be not defined.
   238      * @param aItemIndex Item index for which to check timer activity. Can be not defined.
   239      * @return ETrue if timer is active which means highlight is visible.
   239      * @return ETrue if timer is active which means highlight is visible.
   240 	 */
   240 	 */
   241 	TBool IsTimerActive( TInt aItemIndex = KErrNotFound );
   241 	TBool IsTimerActive( TInt aItemIndex = KErrNotFound );
   242 	
   242 
   243 	/**
   243 	/**
   244 	 * Sets the long tap observer.
   244 	 * Sets the long tap observer.
   245      * 
   245      *
   246      * @param aObserver Observer to receive long tap events. 
   246      * @param aObserver Observer to receive long tap events.
   247 	 */
   247 	 */
   248 	IMPORT_C virtual void SetLongTapObserver( MMmLongTapObserver* aObserver );
   248 	IMPORT_C virtual void SetLongTapObserver( MMmLongTapObserver* aObserver );
   249 	
   249 
   250 	/**
   250 	/**
   251 	 * Handles top focus notification. This is called when we want to explicitly inform
   251 	 * Informs the container that long tap event is finished (e.g. because 
   252 	 * the container that it is in top focus state (or not).
   252 	 * a command from the context menu has been issued).
   253 	 * @param aIsTopFocus ETrue if container is in top focus.
   253 	 * 
   254 	 */
   254 	 * @param aStopTimer ETrue when the highlight timer should be stopped.
   255 	IMPORT_C virtual void HandleTopFocusL( TBool aIsTopFocus = ETrue );
   255 	 */
   256 	
   256 	IMPORT_C virtual void EndLongTapL( TBool aStopTimer = ETrue );
       
   257 
   257 	/**
   258 	/**
   258 	 * Is called when options menu visibility changes (hides or pops up)
   259 	 * Is called when options menu visibility changes (hides or pops up)
   259 	 * @param aOptionsMenuVisible ETrue when option menu pops up.
   260 	 * @param aOptionsMenuVisible ETrue when option menu pops up.
   260 	 */
   261 	 */
   261 	IMPORT_C virtual void HandleOptionsMenuVisibilityChangeL( 
   262 	IMPORT_C virtual void HandleOptionsMenuVisibilityChangeL(
   262 			TBool aOptionsMenuVisible );
   263 			TBool aOptionsMenuVisible );
   263 public:    
   264 public:
   264 
   265 
   265 	/**
   266 	/**
   266 	 * Sets suite model.
   267 	 * Sets suite model.
   267 	 * 
   268 	 *
   268 	 * @since S60 v3.0
   269 	 * @since S60 v3.0
   269 	 * @param aModel Suite model.
   270 	 * @param aModel Suite model.
   270 	 */
   271 	 */
   271 	virtual void SetSuiteModelL( CHnSuiteModel* aModel );
   272 	virtual void SetSuiteModelL( CHnSuiteModel* aModel );
   272 	
   273 
   273     /**
   274     /**
   274      * Gets Multimedia Menu model.
   275      * Gets Multimedia Menu model.
   275      * 
   276      *
   276      * @since S60 v3.0
   277      * @since S60 v3.0
   277      * @return Model.
   278      * @return Model.
   278      */
   279      */
   279 	virtual CMmListBoxModel* GetMmModel() = 0;
   280 	virtual CMmListBoxModel* GetMmModel() = 0;
   280     
   281 
   281     /**
   282     /**
   282      * Sets widget observer.
   283      * Sets widget observer.
   283      * 
   284      *
   284      * @since S60 v3.0
   285      * @since S60 v3.0
   285      * @param aObserver Widget observer.
   286      * @param aObserver Widget observer.
   286      */
   287      */
   287 	IMPORT_C virtual void SetObserver( MMmWidgetObserver*  aObserver);
   288 	IMPORT_C virtual void SetObserver( MMmWidgetObserver*  aObserver);
   288     
   289 
   289     /**
   290     /**
   290      * Gets item rectangle according to item index.
   291      * Gets item rectangle according to item index.
   291      * 
   292      *
   292      * @since S60 v3.0
   293      * @since S60 v3.0
   293      * @param aItemIndex Item index.
   294      * @param aItemIndex Item index.
   294      * @return Item rectangle.
   295      * @return Item rectangle.
   295      */
   296      */
   296     IMPORT_C TRect GetItemRectL( TInt aItemIndex );
   297     IMPORT_C TRect GetItemRectL( TInt aItemIndex );
   297     
   298 
   298     /**
   299     /**
   299      * Sets empty text visible when model has no items.
   300      * Sets empty text visible when model has no items.
   300      * 
   301      *
   301      * @since S60 v3.0
   302      * @since S60 v3.0
   302      * @param aText Text to be shown when view is empty.
   303      * @param aText Text to be shown when view is empty.
   303      */
   304      */
   304 	virtual void SetEmptyTextL(const TDesC& aText) = 0 ;
   305 	virtual void SetEmptyTextL(const TDesC& aText) = 0 ;
   305     
   306 
   306     /**
   307     /**
   307      * Sets flag.
   308      * Sets flag.
   308      * 
   309      *
   309      * @since S60 v3.0
   310      * @since S60 v3.0
   310      * @param Flag Flag.
   311      * @param Flag Flag.
   311      */
   312      */
   312 	virtual void SetFlag(TInt Flag);
   313 	virtual void SetFlag(TInt Flag);
   313     
   314 
   314     /**
   315     /**
   315      * Gets widget.
   316      * Gets widget.
   316      * 
   317      *
   317      * @since S60 v3.0
   318      * @since S60 v3.0
   318      * @return Widget.
   319      * @return Widget.
   319      */
   320      */
   320 	virtual CEikListBox* Widget();
   321 	virtual CEikListBox* Widget();
   321     
   322 
   322     /**
   323     /**
   323      * Sets background context for item drawer and view.
   324      * Sets background context for item drawer and view.
   324      * 
   325      *
   325      * @since S60 v3.0
   326      * @since S60 v3.0
   326      * @param aBgContext Background context.
   327      * @param aBgContext Background context.
   327      */
   328      */
   328 	virtual void SetItemDrawerAndViewBgContext(
   329 	virtual void SetItemDrawerAndViewBgContext(
   329 			CAknsBasicBackgroundControlContext * aBgContext ) =0;
   330 			CAknsBasicBackgroundControlContext * aBgContext ) =0;
   330     
   331 
   331     /**
   332     /**
   332      * Sets edit mode so UI is aware.
   333      * Sets edit mode so UI is aware.
   333      * 
   334      *
   334      * @since S60 v3.0
   335      * @since S60 v3.0
   335      * @param aIsEditMode Is edit mode.
   336      * @param aIsEditMode Is edit mode.
   336      */
   337      */
   337 	virtual void SetEditModeL( TBool aIsEditMode );
   338 	virtual void SetEditModeL( TBool aIsEditMode );
   338 	
   339 
   339     /**
   340     /**
   340      * Tells if UI is aware of edit mode.
   341      * Tells if UI is aware of edit mode.
   341      * 
   342      *
   342      * @since S60 v5.0
   343      * @since S60 v5.0
   343      * @return Edit mode status.
   344      * @return Edit mode status.
   344      */
   345      */
   345 	virtual TBool IsEditMode() const;
   346 	virtual TBool IsEditMode() const;
   346     
   347 
   347     /**
   348     /**
   348      * Sets up widget layout (needed for grid).
   349      * Sets up widget layout (needed for grid).
   349      * 
   350      *
   350      * @since S60 v3.0
   351      * @since S60 v3.0
   351      */
   352      */
   352 	virtual void SetupWidgetLayoutL() =0;
   353 	virtual void SetupWidgetLayoutL() =0;
   353     
   354 
   354     /**
   355     /**
   355      * Constructor.
   356      * Constructor.
   356      */
   357      */
   357 	CMmWidgetContainer();
   358 	CMmWidgetContainer();
   358     
   359 
   359     /**
   360     /**
   360      * Destructor.
   361      * Destructor.
   361      */
   362      */
   362     ~CMmWidgetContainer();
   363     ~CMmWidgetContainer();
   363     
   364 
   364     /**
   365     /**
   365      * from CCoeControl.
   366      * from CCoeControl.
   366      * 
   367      *
   367      * @since S60 v3.0
   368      * @since S60 v3.0
   368      */
   369      */
   369     void SizeChanged();
   370     void SizeChanged();
   370     
   371 
   371     /**
   372     /**
   372      * Draws the widget.
   373      * Draws the widget.
   373      * 
   374      *
   374      * @since S60 v3.0
   375      * @since S60 v3.0
   375      * @param aRect Rectangle within the widget shuld be drawn.
   376      * @param aRect Rectangle within the widget shuld be drawn.
   376      */
   377      */
   377     void Draw(const TRect& aRect) const;
   378     void Draw(const TRect& aRect) const;
   378     
   379 
   379     /**
   380     /**
   380       * Draws the widget view.
   381       * Draws the widget view.
   381       *
   382       *
   382       * @since S60 v5.0
   383       * @since S60 v5.0
   383       */
   384       */
   384     virtual void DrawView() = 0;
   385     virtual void DrawView() = 0;
   385     
   386 
   386     /**
   387     /**
   387      * Returns type UID pointer that can be used in MopSupplyObject.
   388      * Returns type UID pointer that can be used in MopSupplyObject.
   388      * 
   389      *
   389      * @since S60 v3.0
   390      * @since S60 v3.0
   390      * @param aId Type UID, should be the same that was given as aId. 
   391      * @param aId Type UID, should be the same that was given as aId.
   391      * parameter of MopSupplyObject.
   392      * parameter of MopSupplyObject.
   392      * @return Type UID pointer.
   393      * @return Type UID pointer.
   393      */
   394      */
   394     TTypeUid::Ptr MopSupplyObject(TTypeUid aId);
   395     TTypeUid::Ptr MopSupplyObject(TTypeUid aId);
   395        
   396 
   396     /**
   397     /**
   397      * From CCoeControl.
   398      * From CCoeControl.
   398      * 
   399      *
   399      * @since S60 v3.0
   400      * @since S60 v3.0
   400      * @param aPointerEvent Pointer event.
   401      * @param aPointerEvent Pointer event.
   401      */
   402      */
   402     void HandlePointerEventL(const TPointerEvent& aPointerEvent);
   403     void HandlePointerEventL(const TPointerEvent& aPointerEvent);
   403     
   404 
   404     /**
   405     /**
   405      * From CCoeControl.
   406      * From CCoeControl.
   406      * 
   407      *
   407      * @since S60 v5.0
   408      * @since S60 v5.0
   408      * @param aPointerEvent Pointer event.
   409      * @param aPointerEvent Pointer event.
   409      */
   410      */
   410     void HandlePointerEventsInEditModeL(const TPointerEvent& aPointerEvent,
   411     void HandlePointerEventsInEditModeL(const TPointerEvent& aPointerEvent,
   411     		TBool aAbortAnimations );
   412     		TBool aAbortAnimations );
   412     
   413 
   413     /**
   414     /**
   414      * Set draggable.
   415      * Set draggable.
   415      * 
   416      *
   416      * @since S60 v3.0
   417      * @since S60 v3.0
   417      * @param aDraggable Is draggable.
   418      * @param aDraggable Is draggable.
   418      */
   419      */
   419     void SetDraggableL( TBool aDraggable );
   420     void SetDraggableL( TBool aDraggable );
   420     
   421 
   421     /**
   422     /**
   422      * Gets draggable status.
   423      * Gets draggable status.
   423      * Draggable status determines if the item has
   424      * Draggable status determines if the item has
   424      * the capability to be dragged at the momont.
   425      * the capability to be dragged at the momont.
   425      * So before threshold is crossed the container
   426      * So before threshold is crossed the container
   426      * is not draggable in the sense of this method
   427      * is not draggable in the sense of this method
   427      * because the dragged item is not yet drawn.
   428      * because the dragged item is not yet drawn.
   428      * It becomes draggable when it start to be drawn
   429      * It becomes draggable when it start to be drawn
   429      * 
   430      *
   430      * @since S60 v3.0
   431      * @since S60 v3.0
   431      * @return Is draggable.
   432      * @return Is draggable.
   432      */
   433      */
   433     IMPORT_C TBool IsDraggable();
   434     IMPORT_C TBool IsDraggable();
   434     
   435 
   435     /**
   436     /**
   436      * From CCoeControl.
   437      * From CCoeControl.
   437      * 
   438      *
   438      * @since S60 v3.0
   439      * @since S60 v3.0
   439      * @return count component controls.
   440      * @return count component controls.
   440      */
   441      */
   441     TInt CountComponentControls() const;
   442     TInt CountComponentControls() const;
   442     
   443 
   443     /**
   444     /**
   444      * From CCoeControl.
   445      * From CCoeControl.
   445      * 
   446      *
   446      * @since S60 v3.0
   447      * @since S60 v3.0
   447      * @param aIndex index of control.
   448      * @param aIndex index of control.
   448      * @return component control.
   449      * @return component control.
   449      */
   450      */
   450     CCoeControl* ComponentControl(TInt aIndex) const;
   451     CCoeControl* ComponentControl(TInt aIndex) const;
   451     
   452 
   452     /**
   453     /**
   453      * From CCoeControl.
   454      * From CCoeControl.
   454      * 
   455      *
   455      * @since S60 v3.0
   456      * @since S60 v3.0
   456      * @param aKeyEvent key event.
   457      * @param aKeyEvent key event.
   457      * @param aType event type.
   458      * @param aType event type.
   458      * @return response to key event.
   459      * @return response to key event.
   459      */
   460      */
   460     TKeyResponse OfferKeyEventL(const TKeyEvent &aKeyEvent, TEventCode aType);
   461     TKeyResponse OfferKeyEventL(const TKeyEvent &aKeyEvent, TEventCode aType);
   461     
   462 
   462     /**
   463     /**
   463      * Zooms item icon.
   464      * Zooms item icon.
   464      * 
   465      *
   465      * @since S60 v3.0
   466      * @since S60 v3.0
   466      * @param aItemIndex Item index.
   467      * @param aItemIndex Item index.
   467      */
   468      */
   468     IMPORT_C void ItemIconZoomL( TInt aItemIndex );
   469     IMPORT_C void ItemIconZoomL( TInt aItemIndex );
   469     
   470 
   470     /**
   471     /**
   471      * Handle button up event.
   472      * Handle button up event.
   472      * 
   473      *
   473      * @since S60 v3.0
   474      * @since S60 v3.0
   474      * @param aPointerEvent Pointer event.
   475      * @param aPointerEvent Pointer event.
   475      */
   476      */
   476     void HandleButtonDownL(const TPointerEvent& aPointerEvent ); 
   477     void HandleButtonDownL(const TPointerEvent& aPointerEvent );
   477     
   478 
   478     /**
   479     /**
   479      * Handle button down event.
   480      * Handle button down event.
   480      * 
   481      *
   481      * @since S60 v3.0
   482      * @since S60 v3.0
   482      * @param aPointerEvent Pointer event.
   483      * @param aPointerEvent Pointer event.
   483      */
   484      */
   484     void HandleButtonUpL(const TPointerEvent& aPointerEvent );
   485     void HandleButtonUpL(const TPointerEvent& aPointerEvent );
   485     
   486 
   486     /**
   487     /**
   487      * Overridden to invalidate item drawer cache on skin change and
   488      * Overridden to invalidate item drawer cache on skin change and
   488      * dynamic variant switch.
   489      * dynamic variant switch.
   489      * 
   490      *
   490      * @param aType A message UID value.
   491      * @param aType A message UID value.
   491      */
   492      */
   492     void HandleResourceChange( TInt aType );
   493     void HandleResourceChange( TInt aType );
   493     
   494 
   494     /**
   495     /**
   495      * Handle dragging of item.
   496      * Handle dragging of item.
   496      * 
   497      *
   497      * @since S60 v3.0
   498      * @since S60 v3.0
   498      * @param aPointerEvent Pointer event.
   499      * @param aPointerEvent Pointer event.
   499      * @param aAbortAnimation Should animation be aborted.
   500      * @param aAbortAnimation Should animation be aborted.
   500      */
   501      */
   501     void HandleDragL(const TPointerEvent& aPointerEvent, TBool aAbortAnimation );
   502     void HandleDragL(const TPointerEvent& aPointerEvent, TBool aAbortAnimation );
   502     
   503 
   503     /**
   504     /**
   504      * Sets marquee adapter.
   505      * Sets marquee adapter.
   505      * 
   506      *
   506      * @since S60 v3.0
   507      * @since S60 v3.0
   507      * @param aAdapter A marquee adapter.
   508      * @param aAdapter A marquee adapter.
   508      */  
   509      */
   509     void SetMarqueeAdapter( CMmMarqueeAdapter* aAdapter );
   510     void SetMarqueeAdapter( CMmMarqueeAdapter* aAdapter );
   510     
   511 
   511     /**
   512     /**
   512      * Sets up item drawer.
   513      * Sets up item drawer.
   513      * 
   514      *
   514      * @since S60 v3.0
   515      * @since S60 v3.0
   515      */
   516      */
   516     void SetupDrawer();
   517     void SetupDrawer();
   517     
   518 
   518     /**
   519     /**
   519      * Cancels gragging of item.
   520      * Cancels gragging of item.
   520      * 
   521      *
   521      * @since S60 v3.0
   522      * @since S60 v3.0
   522      * @param aAnimate Should dragged item transition be animated.
   523      * @param aAnimate Should dragged item transition be animated.
   523      */
   524      */
   524     IMPORT_C void CancelDragL( TBool aAnimate );
   525     IMPORT_C void CancelDragL( TBool aAnimate );
   525         
   526 
   526     /**
   527     /**
   527      * Animates item shifting.
   528      * Animates item shifting.
   528      * 
   529      *
   529      * @since S60 v3.0
   530      * @since S60 v3.0
   530      * @param aHighlight Highlighted item index.
   531      * @param aHighlight Highlighted item index.
   531      */
   532      */
   532     void AnimateShiftL(TInt aHighlight);
   533     void AnimateShiftL(TInt aHighlight);
   533     
   534 
   534     /**
   535     /**
   535      * Gest number of items.
   536      * Gest number of items.
   536      * 
   537      *
   537      * @since S60 v3.0
   538      * @since S60 v3.0
   538      * @return Number of items.
   539      * @return Number of items.
   539      */  
   540      */
   540     IMPORT_C TInt NumberOfItems();
   541     IMPORT_C TInt NumberOfItems();
   541     
   542 
   542     /**
       
   543      * Retrieve information if flip is open.
       
   544      * 
       
   545      * @since S60 v5.0
       
   546      * @return ETrue if flip is open. Other cases returns EFalse.
       
   547      */
       
   548     TBool FlipOpen();  
       
   549     
       
   550     /**
       
   551      * Sets the flip open state.
       
   552      * 
       
   553      * @since S60 v5.0
       
   554      * @param aIsFlipOpen Is the flip open.
       
   555      */
       
   556     IMPORT_C void SetFlipOpenL( TBool aIsFlipOpen );
       
   557     
       
   558     /**
       
   559      * This should be called when flip state was changed
       
   560      * 
       
   561      * @since S60 v5.0
       
   562      */
       
   563     virtual void FlipStateChangedL();
       
   564     
       
   565     /**
   543     /**
   566      * This should be called at the end of edit mode in non-touch
   544      * This should be called at the end of edit mode in non-touch
   567      * 
   545      *
   568      * @since S60 v5.0
   546      * @since S60 v5.0
   569      */
   547      */
   570     IMPORT_C void StopMovingL();
   548     IMPORT_C void StopMovingL();
   571     
   549 
   572     /**
       
   573      * Handle zooming change
       
   574      * 
       
   575      * @since S60 v5.0
       
   576      */
       
   577     IMPORT_C void HandleZoomChanged( TAknUiZoom aZoom );
       
   578     
       
   579     /**
       
   580      * Set the zoom
       
   581      * 
       
   582      * @since S60 v5.0
       
   583      */
       
   584     IMPORT_C void SetZoom( TAknUiZoom aZoom );
       
   585     
       
   586     /**
   550     /**
   587      * Set the vertical item offset;
   551      * Set the vertical item offset;
   588      * @param aOffset The offset to set to the widget.
   552      * @param aOffset The offset to set to the widget.
   589      * 
   553      *
   590      * @since S60 v5.0
   554      * @since S60 v5.0
   591      */
   555      */
   592     virtual void SetVerticalItemOffset( TInt aOffset ) = 0;
   556     virtual void SetVerticalItemOffset( TInt aOffset ) = 0;
   593 
   557 
   594     /**
   558     /**
   595      * Gets the current vertical item offset for the widget in the container.
   559      * Gets the current vertical item offset for the widget in the container.
   596      * @since S60 v5.0
   560      * @since S60 v5.0
   597      * 
   561      *
   598      * @return The current vertical item offset.
   562      * @return The current vertical item offset.
   599      */
   563      */
   600     virtual TInt VerticalItemOffset() const = 0;
   564     virtual TInt VerticalItemOffset() const = 0;
   601 
   565 
   602     /**
   566     /**
   603      * Saves the currents position of the widget. The vertical item offset
   567      * Saves the currents position of the widget. The vertical item offset
   604      * and the top item index are cached.
   568      * and the top item index are cached.
   605      * @since S60 v5.0
   569      * @since S60 v5.0
   606      */
   570      */
   607     IMPORT_C void CacheWidgetPosition();
   571     IMPORT_C void CacheWidgetPosition();
   608     
   572 
   609     /**
   573     /**
   610      * Resets the widget position cache to top of view.
   574      * Resets the widget position cache to top of view.
   611      * Both vartical item offset and top index are set to zero
   575      * Both vartical item offset and top index are set to zero
   612      * in cache and widget.
   576      * in cache and widget.
   613      * @since S60 v5.0
   577      * @since S60 v5.0
   614      */
   578      */
   615     IMPORT_C void ResetWidgetPosition();
   579     IMPORT_C void ResetWidgetPosition();
   616     
   580 
   617     /**
   581     /**
   618      * Restores the cached widget position values in the widget.
   582      * Restores the cached widget position values in the widget.
   619      * @since S60 v5.0
   583      * @since S60 v5.0
   620      */
   584      */
   621     IMPORT_C void RestoreWidgetPosition();
   585     IMPORT_C void RestoreWidgetPosition();
   622     
   586 
   623     /**
   587     /**
   624      * Scrolls to the specified item index so that the item is seen entirely on screen.
   588      * Scrolls to the specified item index so that the item is seen entirely on screen.
   625      * @since S60 v5.0
   589      * @since S60 v5.0
   626      * 
   590      *
   627      * @param aIndex The widget item index to scroll to.
   591      * @param aIndex The widget item index to scroll to.
   628      * @return True if any scrolling was done.
   592      * @return True if any scrolling was done.
   629      */
   593      */
   630     IMPORT_C TBool ScrollToItemL( TInt aIndex );
   594     IMPORT_C TBool ScrollToItemL( TInt aIndex );
   631     
   595 
   632     /**
   596     /**
   633      * Called when the number of items in widget model changed.
   597      * Called when the number of items in widget model changed.
   634      * @since S60 v5.0
   598      * @since S60 v5.0
   635      * 
   599      *
   636      * @param aChange Type of change
   600      * @param aChange Type of change
   637      */
   601      */
   638     IMPORT_C void NumberOfItemsChangedL( TItemsChangeType aChange );
   602     IMPORT_C void NumberOfItemsChangedL( TItemsChangeType aChange );
   639     
   603 
   640     /**
   604     /**
   641      * Aligns the bottom of view to the last model item bottom edge so that no extra 
   605      * Aligns the bottom of view to the last model item bottom edge so that no extra
   642      * unused pixels are visible at the bottom of screen.
   606      * unused pixels are visible at the bottom of screen.
   643      * @since S60 v5.0
   607      * @since S60 v5.0
   644      * 
   608      *
   645      * @return True if the view was scrolled.
   609      * @return True if the view was scrolled.
   646      */
   610      */
   647     TBool AlignBottomOfViewL( );
   611     TBool AlignBottomOfViewL( );
   648     
   612 
   649     /**
   613     /**
   650      * Calculate numer of pixels required to scroll when aligning bottom of view.
   614      * Calculate numer of pixels required to scroll when aligning bottom of view.
   651      * @since S60 v5.0 
   615      * @since S60 v5.0
   652      */
   616      */
   653     TInt CalcBottomPixelsToScroll();
   617     TInt CalcBottomPixelsToScroll();
   654     
   618 
   655     /**
   619     /**
   656      * Sets visibility of a widget.
   620      * Sets visibility of a widget.
   657      * 
   621      *
   658      * @param aVisible ETrue if widget should be visible, EFalse - otherwise
   622      * @param aVisible ETrue if widget should be visible, EFalse - otherwise
   659      */
   623      */
   660     void MakeVisible(TBool aVisible);
   624     void MakeVisible(TBool aVisible);
   661     
   625 
   662     /**
   626     /**
   663      * Tells if item is visible (fully or partially).
   627      * Tells if item is visible (fully or partially).
   664      * @param aItemIndex Item index.
   628      * @param aItemIndex Item index.
   665      * @return ETrue if visible, EFalse otherwise.
   629      * @return ETrue if visible, EFalse otherwise.
   666      */
   630      */
   667     virtual TBool ItemIsVisible( TInt aItemIndex ) const;
   631     virtual TBool ItemIsVisible( TInt aItemIndex ) const;
   668     
   632 
   669      /**
   633      /**
   670      * Tells if item is entirely visible.
   634      * Tells if item is entirely visible.
   671      * @param aIndex The index of the item.
   635      * @param aIndex The index of the item.
   672      */
   636      */
   673     IMPORT_C TBool ItemIsFullyVisible(TInt aIndex);
   637     IMPORT_C TBool ItemIsFullyVisible(TInt aIndex);
   674     
   638 
   675     /**
   639     /**
   676     * Prepares the container to be set to the garbage collector.
   640     * Prepares the container to be set to the garbage collector.
   677     */
   641     */
   678     IMPORT_C void PrepareForGarbage();
   642     IMPORT_C void PrepareForGarbage();
   679     
   643 
   680     /**
   644     /**
   681      * Checks, whether the currently dragged item is a draggable item. i.e. parent folder
   645      * Checks, whether the currently dragged item is a draggable item. i.e. parent folder
   682      * is not a draggable item.
   646      * is not a draggable item.
   683      * @returns True, if dragged item is parent folder 
   647      * @returns True, if dragged item is parent folder
   684      * or no item is dragged (iDraggedIndex = -1), false otherwise.
   648      * or no item is dragged (iDraggedIndex = -1), false otherwise.
   685      */
   649      */
   686     TBool IsNoItemDragged();
   650     TBool IsNoItemDragged();
   687     
   651 
   688     /**
   652     /**
   689      * Sets the iHasFocus member variable, which is used to determine
   653      * Sets the iHasFocus member variable, which is used to determine
   690      * if marquee animation can be enabled. 
   654      * if marquee animation can be enabled.
   691      */
   655      */
   692     IMPORT_C void SetHasFocusL( TBool aHasFocus );
   656     IMPORT_C void SetHasFocusL( TBool aHasFocus );
   693     
   657 
   694     /**
   658     /**
   695      * Sets the iIsFaded member variable, which is used to determine
   659      * Sets the iIsFaded member variable, which is used to determine
   696      * if marquee animation can be enabled. 
   660      * if marquee animation can be enabled.
   697      */
   661      */
   698     IMPORT_C void SetIsFaded( TBool aIsFaded );
   662     IMPORT_C void SetIsFaded( TBool aIsFaded );
   699     
   663 
   700 public: // from MMmVisibilityObserver
   664 public: // from MMmVisibilityObserver
   701     
   665 
   702     /**
   666     /**
   703      * 
   667      *
   704      * @since S60 v3.0
   668      * @since S60 v3.0
   705      */
   669      */
   706     IMPORT_C void HandleBackgroundGainedL();
   670     IMPORT_C void HandleBackgroundGainedL();
   707 
   671 
   708     /**
   672     /**
   709      * 
   673      *
   710      * @since S60 v3.0
   674      * @since S60 v3.0
   711      */
   675      */
   712     IMPORT_C void HandleForegroundGainedL();  
   676     IMPORT_C void HandleForegroundGainedL();
   713 public: // from MEikListBoxObserver
   677 public: // from MEikListBoxObserver
   714     
   678 
   715     /**
   679     /**
   716      * Handles list box events.
   680      * Handles list box events.
   717      * 
   681      *
   718      * @since S60 v5.0
   682      * @since S60 v5.0
   719      */
   683      */
   720     virtual void HandleListBoxEventL(CEikListBox* aListBox,
   684     virtual void HandleListBoxEventL(CEikListBox* aListBox,
   721             TListBoxEvent aEventType);
   685             TListBoxEvent aEventType);
   722 
   686 
   723 public:
   687 public:
   724     /**
   688     /**
   725      * From MAknLongTapDetectorCallBack. Handles long tap events.
   689      * From MAknLongTapDetectorCallBack. Handles long tap events.
   726      * 
   690      *
   727      * @since S60 v5.0
   691      * @since S60 v5.0
   728      * @param aPenEventLocation Point coordinates relative to container.
   692      * @param aPenEventLocation Point coordinates relative to container.
   729      * @param aPenEventScreenLocation Point coordinates relative to screen.
   693      * @param aPenEventScreenLocation Point coordinates relative to screen.
   730      */
   694      */
   731     virtual void HandleLongTapEventL( const TPoint& aPenEventLocation, 
   695     virtual void HandleLongTapEventL( const TPoint& aPenEventLocation,
   732                                       const TPoint& aPenEventScreenLocation );
   696                                       const TPoint& aPenEventScreenLocation );
   733 protected:
   697 protected:
   734 	
   698 
   735     /**
   699     /**
   736      * Handles additional contruction tasks.
   700      * Handles additional contruction tasks.
   737      * 
   701      *
   738      * @since S60 v3.0
   702      * @since S60 v3.0
   739      */
   703      */
   740 	void ConstructL();
   704 	void ConstructL();
   741 	
   705 
   742     /**
   706     /**
   743      * Sets highlight locally.
   707      * Sets highlight locally.
   744      * Does not modify the avkon behaviur.
   708      * Does not modify the avkon behaviur.
   745      * 
   709      *
   746      * @since S60 v3.0
   710      * @since S60 v3.0
   747      * @param aItemIndex Index of the item.
   711      * @param aItemIndex Index of the item.
   748      */
   712      */
   749 	void SetHighlightL(TInt aItemIndex);
   713 	void SetHighlightL(TInt aItemIndex);
   750 	
   714 
   751 	/**
   715 	/**
   752      * Checks whether given point collides with specific item's re-order area.
   716      * Checks whether given point collides with specific item's re-order area.
   753      * 
   717      *
   754      * This function gets called during drag-and-drop operations to
   718      * This function gets called during drag-and-drop operations to
   755      * help determine whether item re-ordering is needed.
   719      * help determine whether item re-ordering is needed.
   756      * 
   720      *
   757      * @param aItemIndex index of the item to check
   721      * @param aItemIndex index of the item to check
   758      * @param aPoint point coordinates
   722      * @param aPoint point coordinates
   759      * @return ETrue if point is located within item re-order area,
   723      * @return ETrue if point is located within item re-order area,
   760      *         EFalse otherwise 
   724      *         EFalse otherwise
   761      */
   725      */
   762     virtual TBool PointInItemReorderAreaL( TInt aItemIndex, TPoint aPoint );
   726     virtual TBool PointInItemReorderAreaL( TInt aItemIndex, TPoint aPoint );
   763     
   727 
   764     /**
   728     /**
   765      * Hides the options menu if it is being displayed.
   729      * Hides the options menu if it is being displayed.
   766      * This has (probably) the same effect as clicking Cancel (RSK) -
   730      * This has (probably) the same effect as clicking Cancel (RSK) -
   767      * the menu just disappears.
   731      * the menu just disappears.
   768      */
   732      */
   769     void HideOptionsMenuIfDisplayed();
   733     void HideOptionsMenuIfDisplayed();
   770 	
   734 
   771 protected:
   735 protected:
   772 	
   736 
   773     /**
   737     /**
   774      * Validates the widget current item index so that it is consistent with 
   738      * Validates the widget current item index so that it is consistent with
   775      * the current model.
   739      * the current model.
   776      */
   740      */
   777     void ValidateWidgetCurrentItemIndex();
   741     void ValidateWidgetCurrentItemIndex();
   778     
   742 
   779     /**
   743     /**
   780      * Updates current view's scrollbar thumbs.
   744      * Updates current view's scrollbar thumbs.
   781      */
   745      */
   782     virtual void UpdateViewScrollBarThumbs();
   746     virtual void UpdateViewScrollBarThumbs();
   783     
   747 
   784     /**
   748     /**
   785      * Starts or stops marquee animation based on the current state
   749      * Starts or stops marquee animation based on the current state
   786      * of the container.
   750      * of the container.
   787      */
   751      */
   788     void StartOrStopMarquee();
   752     void StartOrStopMarquee();
   789         
   753 
   790 private:
   754 private:
   791 
   755 
   792 	 /**
   756 	 /**
   793 	 * Called when the number of items in widget model changed.
   757 	 * Called when the number of items in widget model changed.
   794 	 * @since S60 v5.0
   758 	 * @since S60 v5.0
   795 	 * 
   759 	 *
   796 	 * @param aChange Type of change
   760 	 * @param aChange Type of change
   797 	 */
   761 	 */
   798 	void HandleNumberOfItemsChangedL( TItemsChangeType aChange );
   762 	void HandleNumberOfItemsChangedL( TItemsChangeType aChange );
   799 	
   763 
   800     /**
   764     /**
   801      * Manages zooming of folder.
   765      * Manages zooming of folder.
   802      * 
   766      *
   803      * @since S60 v3.0
   767      * @since S60 v3.0
   804      * @param aDraggedItemOverIcons Is dragged over icons flag.
   768      * @param aDraggedItemOverIcons Is dragged over icons flag.
   805      */
   769      */
   806 	void ManageFolderZoomingL( TBool aDraggedItemOverIcons );
   770 	void ManageFolderZoomingL( TBool aDraggedItemOverIcons );
   807 	
   771 
   808     /**
   772     /**
   809      * Cancels gragging of item if relevant( Edit Mode is activated )
   773      * Cancels gragging of item if relevant( Edit Mode is activated )
   810      * 
   774      *
   811      * @since S60 v3.0
   775      * @since S60 v3.0
   812      */
   776      */
   813     void CancelDragL();
   777     void CancelDragL();
   814     
   778 
   815     /**
   779     /**
   816      * Sets the widget highlight back to place if e.g. item was dragged over an item 
   780      * Sets the widget highlight back to place if e.g. item was dragged over an item
   817      * where it could not be dropped into.
   781      * where it could not be dropped into.
   818      * 
   782      *
   819      * @since S60 v3.0
   783      * @since S60 v3.0
   820      */
   784      */
   821     void SetHighlightAfterDrag();
   785     void SetHighlightAfterDrag();
   822     
   786 
   823     /**
   787     /**
   824      * Handles key event.
   788      * Handles key event.
   825      * 
   789      *
   826      * @since S60 v3.0
   790      * @since S60 v3.0
   827      * @param aKeyEvent Key event.
   791      * @param aKeyEvent Key event.
   828      * @param aType Event code.
   792      * @param aType Event code.
   829      */
   793      */
   830     TKeyResponse HandleKeyEventL(const TKeyEvent &aKeyEvent, TEventCode aType);
   794     TKeyResponse HandleKeyEventL(const TKeyEvent &aKeyEvent, TEventCode aType);
   831     
   795 
   832     /**
   796     /**
   833      * Handles rocker (select) press.
   797      * Handles rocker (select) press.
   834      */
   798      */
   835     void HandleRockerPressL();
   799     void HandleRockerPressL();
   836     
   800 
   837     /**
   801     /**
   838      * Gets distance between current and previous position.
   802      * Gets distance between current and previous position.
   839      * @param aPos Current position.
   803      * @param aPos Current position.
   840      * @param aTapPoint Point of the tap.
   804      * @param aTapPoint Point of the tap.
   841      * @return Distance between two points in pixels.
   805      * @return Distance between two points in pixels.
   842      */
   806      */
   843     TInt DeltaSquare( const TPoint aTapPoint,
   807     TInt DeltaSquare( const TPoint aTapPoint,
   844     		const TPoint aPos );
   808     		const TPoint aPos );
   845     
   809 
   846     /**
   810     /**
   847      * Checks, whether given item is a folder or root folder.
   811      * Checks, whether given item is a folder or root folder.
   848      * @param aItemIndex Item index to check.
   812      * @param aItemIndex Item index to check.
   849      * @returns True, if given item is a folder or root folder, false otherwise.
   813      * @returns True, if given item is a folder or root folder, false otherwise.
   850      */
   814      */
   851     TBool IsFolderL( TInt aItemIndex );
   815     TBool IsFolderL( TInt aItemIndex );
   852     
   816 
   853     /**
   817     /**
   854 	 * Checks, whether given item has IsDeleteLockedL flag set.
   818 	 * Checks, whether given item has IsDeleteLockedL flag set.
   855 	 * @param aItemIndex Item index to check.
   819 	 * @param aItemIndex Item index to check.
   856 	 * @returns IsDeleteLockedL flag
   820 	 * @returns IsDeleteLockedL flag
   857 	 */
   821 	 */
   860 	/**
   824 	/**
   861 	 * Gets column count in current view.
   825 	 * Gets column count in current view.
   862 	 * @returns Column count in current view.
   826 	 * @returns Column count in current view.
   863 	 */
   827 	 */
   864 	virtual TInt ColumnsInCurrentView();
   828 	virtual TInt ColumnsInCurrentView();
   865 	
   829 
   866     /**
   830     /**
   867      * Gets row count in current view.
   831      * Gets row count in current view.
   868      * @returns Row count in current view.
   832      * @returns Row count in current view.
   869      */
   833      */
   870     virtual TInt RowsInCurrentView();
   834     virtual TInt RowsInCurrentView();
   871 
   835 
   872 	/**
   836 	/**
   873 	 * Scrolls the view move mode non-touch so that move indicators are visible.
   837 	 * Scrolls the view move mode non-touch so that move indicators are visible.
   874 	 */
   838 	 */
   875 	void ScrollViewIfNeededL();
   839 	void ScrollViewIfNeededL();
   876     
   840 
   877     /**
   841     /**
   878      * Scrolls the view in pixels.
   842      * Scrolls the view in pixels.
   879      * @param aPixels THe number of pixels to scroll. If negative, the view is scrolled down.
   843      * @param aPixels THe number of pixels to scroll. If negative, the view is scrolled down.
   880      */
   844      */
   881 	void ScrollInPixelsL( TInt aPixels );
   845 	void ScrollInPixelsL( TInt aPixels );
   882     
   846 
   883     /**
   847     /**
   884      * Sets up the scrolling effect movement type.
   848      * Sets up the scrolling effect movement type.
   885      * @param aDown True if scrolling is downwards.
   849      * @param aDown True if scrolling is downwards.
   886      */
   850      */
   887 	void SetupScrollingEffectsL( TBool aDown );
   851 	void SetupScrollingEffectsL( TBool aDown );
   888 	
   852 
   889 protected:
   853 protected:
   890     
   854 
   891 
   855 
   892 	/**
   856 	/**
   893 	 * Own.
   857 	 * Own.
   894 	 */
   858 	 */
   895 	CEikListBox* iWidget;
   859 	CEikListBox* iWidget;
   896     
   860 
   897     /**
   861     /**
   898      * Key event observer.
   862      * Key event observer.
   899      */
   863      */
   900 	MMmKeyEventObserver* iKeyEventObserver;
   864 	MMmKeyEventObserver* iKeyEventObserver;
   901     
   865 
   902     /**
   866     /**
   903      * Drag and drop observer.
   867      * Drag and drop observer.
   904      */
   868      */
   905      MMmDragAndDropObserver* iDragAndDropObserver;
   869      MMmDragAndDropObserver* iDragAndDropObserver;
   906      /**
   870      /**
   907       * List box observer.
   871       * List box observer.
   908       */
   872       */
   909      MEikListBoxObserver* iListBoxObserver;
   873      MEikListBoxObserver* iListBoxObserver;
   910     
   874 
   911      /**
   875      /**
   912      * Notifies about time expiration.
   876      * Notifies about time expiration.
   913      *
   877      *
   914      * Owned by descendant.
   878      * Owned by descendant.
   915      */
   879      */
   916     CMmHighlightTimer* iTimer;
   880     CMmHighlightTimer* iTimer;
   917     
   881 
   918     /**
   882     /**
   919      * Marquee adapter.
   883      * Marquee adapter.
   920      * Own.
   884      * Own.
   921      */
   885      */
   922     CMmMarqueeAdapter* iMarqueeAdapter;
   886     CMmMarqueeAdapter* iMarqueeAdapter;
   923     
   887 
   924     /**
   888     /**
   925      * Item drawer.
   889      * Item drawer.
   926      * Not own.
   890      * Not own.
   927      */
   891      */
   928     CMmListBoxItemDrawer* iDrawer;
   892     CMmListBoxItemDrawer* iDrawer;
   929     
   893 
   930 protected:
   894 protected:
   931 	
   895 
   932 	/**
   896 	/**
   933 	 * Current Highlight.
   897 	 * Current Highlight.
   934 	 */
   898 	 */
   935 	TInt iCurrentHighlight;
   899 	TInt iCurrentHighlight;
   936 	
   900 
   937     /**
   901     /**
   938      * Has drag occurred.
   902      * Has drag occurred.
   939      */
   903      */
   940     TBool iDragOccured;  
   904     TBool iDragOccured;
   941     
   905 
   942 	/**
   906 	/**
   943 	 * Processed display elelments for better performance.
   907 	 * Processed display elelments for better performance.
   944 	 */
   908 	 */
   945     CMmPostEvaluationProcessor* iPostProcessor;
   909     CMmPostEvaluationProcessor* iPostProcessor;
   946     
   910 
   947 	/**
   911 	/**
   948 	 * Set when long tap is in progress (stylus popup displayed over container)
   912 	 * Set when long tap is in progress (stylus popup displayed over container)
   949 	 */
   913 	 */
   950     TBool iLongTapInProgress;
   914     TBool iLongTapInProgress;
   951     
   915 
   952 private:
   916 private:
   953 
   917 
   954 
   918 
   955     /**
   919     /**
   956      * Background context.
   920      * Background context.
   957      * Own.
   921      * Own.
   958      */    
   922      */
   959 	CAknsBasicBackgroundControlContext* iBgContext;
   923 	CAknsBasicBackgroundControlContext* iBgContext;
   960 
   924 
   961     /**
   925     /**
   962      * Last drag point.
   926      * Last drag point.
   963      */	
   927      */
   964 	TPoint iLastDragPoint;
   928 	TPoint iLastDragPoint;
   965 	
   929 
   966     /**
   930     /**
   967      * First tap point.
   931      * First tap point.
   968      */	
   932      */
   969 	TPoint iTapPoint;
   933 	TPoint iTapPoint;
   970 	
   934 
   971     /**
   935     /**
   972      * First tap point.
   936      * First tap point.
   973      */	
   937      */
   974 	TPoint iItemRelativeTapPoint;
   938 	TPoint iItemRelativeTapPoint;
   975     
   939 
   976 	/**
   940 	/**
   977      * Last drag highlight.
   941      * Last drag highlight.
   978      */	
   942      */
   979 	TInt iLastDragHighlight;
   943 	TInt iLastDragHighlight;
   980     
   944 
   981     /**
   945     /**
   982      * Dragged item index.
   946      * Dragged item index.
   983      */	
   947      */
   984 	TBool iDraggedIndex;
   948 	TBool iDraggedIndex;
   985 	
   949 
   986     /**
   950     /**
   987      * Edit mode status.
   951      * Edit mode status.
   988      */	
   952      */
   989 	TBool iIsEditMode;
   953 	TBool iIsEditMode;
   990     
   954 
   991 	/**
   955 	/**
   992      * Destination of item index.
   956      * Destination of item index.
   993      */	
   957      */
   994 	TInt iItemIndexDestination;
   958 	TInt iItemIndexDestination;
   995     
   959 
   996 	/**
   960 	/**
   997      * Previous Highlight.
   961      * Previous Highlight.
   998      */	
   962      */
   999 	TInt iPreviousHighlight;
   963 	TInt iPreviousHighlight;
  1000 	    
   964 
  1001 	/**
       
  1002 	 * Is flip open
       
  1003 	 */
       
  1004     TBool iFlipOpen;
       
  1005     
       
  1006 	/**
   965 	/**
  1007 	 * The current rect of the widget control.
   966 	 * The current rect of the widget control.
  1008 	 */
   967 	 */
  1009     TRect iWidgetRect;
   968     TRect iWidgetRect;
  1010     
   969 
  1011     /**
   970     /**
  1012      * Longpress allowed flag. We only accept long press (EEventKey+iRepeats)
   971      * Longpress allowed flag. We only accept long press (EEventKey+iRepeats)
  1013      * when there was no highlight visible before EEventKeyDown, otherwise
   972      * when there was no highlight visible before EEventKeyDown, otherwise
  1014      * we react only to EEventKeyDown 
   973      * we react only to EEventKeyDown
  1015      */
   974      */
  1016     TBool iAllowLongPress;
   975     TBool iAllowLongPress;
  1017     
   976 
  1018 	/**
   977 	/**
  1019 	 * Cache for widget position.
   978 	 * Cache for widget position.
  1020 	 */
   979 	 */
  1021     TMmWidgetPosition iWidgetPositionCache;
   980     TMmWidgetPosition iWidgetPositionCache;
  1022     
   981 
  1023     /**
   982     /**
  1024      * ETrue if Matrix menu window is faded.
   983      * ETrue if Matrix menu window is faded.
  1025      */
   984      */
  1026     TBool iIsFaded;
   985     TBool iIsFaded;
  1027     
   986 
  1028     /**
   987     /**
  1029      * ETrue if Matrix menu has focus (i.e. it is not obscured by any popup
   988      * ETrue if Matrix menu has focus (i.e. it is not obscured by any popup
  1030      * note).
   989      * note).
  1031      */
   990      */
  1032     TBool iHasFocus;
   991     TBool iHasFocus;
  1033 
   992 
  1034     /**
   993     /**
  1035      * ETrue if in foreground.
   994      * ETrue if in foreground.
  1036      */
   995      */
  1037     TBool iInForeground;
   996     TBool iInForeground;
  1038     
   997 
  1039     /**
   998     /**
  1040      * Own.
   999      * Own.
  1041      * Detects long tap events.
  1000      * Detects long tap events.
  1042      */
  1001      */
  1043     CAknLongTapDetector* iLongTapDetector;
  1002     CAknLongTapDetector* iLongTapDetector;
  1044     
  1003 
  1045     /**
  1004     /**
  1046      * Observer to notify about long tap events.
  1005      * Observer to notify about long tap events.
  1047      */
  1006      */
  1048     MMmLongTapObserver* iLongTapObserver;
  1007     MMmLongTapObserver* iLongTapObserver;
  1049 
  1008