idlehomescreen/widgetmanager/inc/wmlistbox.h
branchRCL_3
changeset 11 ff572dfe6d86
parent 9 f966699dea19
child 12 9674c1a575e9
equal deleted inserted replaced
9:f966699dea19 11:ff572dfe6d86
    30 #include <touchfeedback.h>
    30 #include <touchfeedback.h>
    31 #include <touchlogicalfeedback.h>
    31 #include <touchlogicalfeedback.h>
    32 #include <aknlongtapdetector.h> 
    32 #include <aknlongtapdetector.h> 
    33 #include "wmwidgetdataobserver.h"
    33 #include "wmwidgetdataobserver.h"
    34 #include "wmwidgetdata.h"
    34 #include "wmwidgetdata.h"
       
    35 #include "wmwidgetorderdata.h"
    35 
    36 
    36 // FORWARD DECLARATIONS
    37 // FORWARD DECLARATIONS
    37 class CWmListBox;
    38 class CWmListBox;
    38 class CWmPlugin;
    39 class CWmPlugin;
    39 class CListBoxView;
    40 class CListBoxView;
   115 
   116 
   116     /** 
   117     /** 
   117      * pointer to the listbox (not owned) 
   118      * pointer to the listbox (not owned) 
   118      */
   119      */
   119     CWmListBox* iListBox;
   120     CWmListBox* iListBox;
   120 
       
   121 
       
   122     /**
       
   123      * add-button colored bitmap (default color)
       
   124      */
       
   125     CFbsBitmap*         iAddWidgetBtnImage;
       
   126     
       
   127     /** 
       
   128      * add-button mask 
       
   129      */
       
   130     CFbsBitmap*         iAddWidgetBtnMask;
       
   131 
       
   132     /**
       
   133      * add-button colored bitmap (highlighted color)
       
   134      */
       
   135     CFbsBitmap*         iAddWidgetBtnHighlightImage;
       
   136     
       
   137     /** 
       
   138      * add-button mask 
       
   139      */
       
   140     CFbsBitmap*         iAddWidgetBtnHighlightMask;
       
   141     
   121     
   142     /** 
   122     /** 
   143      * default logo (when widget does not have one) bitmap 
   123      * default logo (when widget does not have one) bitmap 
   144      */
   124      */
   145     CFbsBitmap*         iDefaultLogoImage;
   125     CFbsBitmap*         iDefaultLogoImage;
   270         /** show latest installed first */
   250         /** show latest installed first */
   271         ELatestFirst
   251         ELatestFirst
   272         };
   252         };
   273 
   253 
   274     /** 
   254     /** 
   275      * sets the list sort order 
   255      * Sorts the listbox's visible array 
   276      * 
   256      * 
   277      * @param aOrder sort order
   257      * @param aOrder sort order
   278      */
   258      */
   279     void SetSortOrderL( TSortOrder aOrder );
   259     void DoSortToVisibleArray( TSortOrder aOrder );
   280     
   260     
   281     /**
   261     /**
   282      * Responds to layout switched.
   262      * Responds to layout switched.
   283      */
   263      */
   284     void HandleLayoutChanged();
   264     void HandleLayoutChanged();
   293      * 
   273      * 
   294      * @return Size of logo rect
   274      * @return Size of logo rect
   295      */
   275      */
   296     TSize LogoSize();
   276     TSize LogoSize();
   297 
   277 
       
   278     /**
       
   279      * gets the constant widget order data array
       
   280      */
       
   281     inline const ROrderArray& OrderDataArray();
       
   282     
       
   283     /** 
       
   284      * Sorts the order array
       
   285      * 
       
   286      * @param aOrder sort order
       
   287      */
       
   288     void DoSortToOrderData( TSortOrder aOrder );
       
   289     
       
   290     /**
       
   291      * Adds order data to array
       
   292      */
       
   293     void AddOrderDataL( CWmWidgetOrderData* aOrderData );
       
   294     
       
   295     /*
       
   296      * Returns orderdata object by index
       
   297      */
       
   298     CWmWidgetOrderData* OrderData( TInt aItemIndex );
       
   299     
   298 private: // from CEikTextListBox
   300 private: // from CEikTextListBox
   299     /**
   301     /**
   300      * Creates the item drawer.
   302      * Creates the item drawer.
   301      * 
   303      * 
   302      * @see CEikTextListBox::CreateItemDrawerL
   304      * @see CEikTextListBox::CreateItemDrawerL
   336     void ConstructL(
   338     void ConstructL(
   337             const TRect& aRect,
   339             const TRect& aRect,
   338             const CCoeControl* aParent,
   340             const CCoeControl* aParent,
   339             TInt aFlags );
   341             TInt aFlags );
   340     
   342     
   341 
   343 private:
       
   344     /** 
       
   345      * linear order for sorting, depending on the sort type being used 
       
   346      */
       
   347     TLinearOrder<CWmWidgetData> SortOrder( TSortOrder aOrder );
       
   348     
       
   349     /** 
       
   350      * linear order for sorting, depending on the sort type being used 
       
   351      */
       
   352     TLinearOrder<CWmWidgetOrderData> SortOrderToOrderData( TSortOrder aOrder );
       
   353     
   342 protected: // from MWmWidgetDataObserver
   354 protected: // from MWmWidgetDataObserver
   343 
   355 
   344     /** 
   356     /** 
   345      * widget needs redrawing 
   357      * widget needs redrawing 
   346      * 
   358      * 
   347      * @param aWidgetData item to redraw
   359      * @param aWidgetData item to redraw
   348      */
   360      */
   349     void HandleWidgetDataChanged( CWmWidgetData* aWidgetData );
   361     void HandleWidgetDataChanged( CWmWidgetData* aWidgetData );
   350 
   362 
   351 private: // own methods
       
   352 
       
   353     /** 
       
   354      * linear order for sorting, depending on the sort type being used 
       
   355      */
       
   356     TLinearOrder<CWmWidgetData> SortOrder( TSortOrder aOrder );
       
   357 
       
   358 private:
   363 private:
   359 
   364 
   360     /** 
   365     /** 
   361      * the plugin root (not owned) 
   366      * the plugin root (not owned) 
   362      */
   367      */
   363     CWmPlugin&          iWmPlugin;
   368     CWmPlugin&          iWmPlugin;
   364 
   369 
   365     /** 
   370     /** 
   366      * array of widget data objects (the list model) 
   371      * array of widget data objects (the list model) 
   367      */
   372      */
   368     RWidgetDataValues   iWidgetDatas;
   373     RWidgetDataValues   iVisibleWidgetArray;
   369 
   374 
   370     /** 
   375     /** 
   371      * the currently active item ADD button's rectangle, for push recognition 
   376      * the currently active item ADD button's rectangle, for push recognition 
   372      */
   377      */
   373     TRect               iButtonRect;
   378     TRect               iButtonRect;
   376      * state of list box find pane 
   381      * state of list box find pane 
   377      */
   382      */
   378     TBool               iFindPaneIsVisible;
   383     TBool               iFindPaneIsVisible;
   379 	
   384 	
   380     /** size of logo rect in list item */
   385     /** size of logo rect in list item */
   381     TSize               iLogoSize;    
   386     TSize               iLogoSize;
       
   387     
       
   388     /** 
       
   389      * array of widget order objects
       
   390      */
       
   391     ROrderArray         iOrderDataArray;
   382 	};
   392 	};
   383 #include "wmlistbox.inl"
   393 #include "wmlistbox.inl"
   384 
   394 
   385 #endif ___WMLISTBOX_H__
   395 #endif ___WMLISTBOX_H__
   386 
   396