taskswitcher/taskswitcherui/taskswitcherapp/inc/tsfastswapgrid.h
branchRCL_3
changeset 34 d05a55b217df
parent 30 b8fae6b8a148
equal deleted inserted replaced
30:b8fae6b8a148 34:d05a55b217df
   173     
   173     
   174     /**
   174     /**
   175      * Returns visible view. Items outside of visible rectangle are not drawn.
   175      * Returns visible view. Items outside of visible rectangle are not drawn.
   176      */
   176      */
   177     TRect VisibleViewRect();
   177     TRect VisibleViewRect();
       
   178     
       
   179     /**
       
   180      * Updates layout data for item drawer. Should be called when
       
   181      * layout maybe out of date
       
   182      */
       
   183     void UpdateItemDrawerLayoutDataL();
       
   184     
       
   185     /**
       
   186      * Enables/disables avkon event handling.
       
   187      * 
       
   188      * @param  aEnable  if set to ETrue, pointer events will be forwarded
       
   189      *                  to CAknGrid base class if necessary. If set to EFalse,
       
   190      *                  no pointer events will be forwarded.
       
   191      */
       
   192     void EnableAknEventHandling( TBool aEnable );
   178 
   193 
   179 private: // From CAknGrid
   194 private: // From CAknGrid
   180     virtual void CreateItemDrawerL();
   195     virtual void CreateItemDrawerL();
   181 
   196 
   182 private: // From MTsFastSwapTimerObserver
   197 private: // From MTsFastSwapTimerObserver
   209     TFastSwapGridBehaviour iBehaviour;
   224     TFastSwapGridBehaviour iBehaviour;
   210     TBool iHighlightVisible;
   225     TBool iHighlightVisible;
   211     
   226     
   212     // Visible view rectangle (horizontal scrolling support)
   227     // Visible view rectangle (horizontal scrolling support)
   213     TRect iVisibleViewRect;
   228     TRect iVisibleViewRect;
       
   229     
       
   230     // Flag controlling input handling by grid
       
   231     TBool iAknEventHandlingEnabled;
   214     };
   232     };
   215 
   233 
   216 
   234 
   217 
   235 
   218 /**
   236 /**
   221 class CTsGridItemDrawer: public CFormattedCellListBoxItemDrawer
   239 class CTsGridItemDrawer: public CFormattedCellListBoxItemDrawer
   222     {
   240     {
   223 
   241 
   224 public: // Constructor and destructor
   242 public: // Constructor and destructor
   225     CTsGridItemDrawer( CTsFastSwapGrid* aGrid,
   243     CTsGridItemDrawer( CTsFastSwapGrid* aGrid,
   226                        CFormattedCellListBoxData* aData,
   244                        CFormattedCellListBoxData* aData );
   227                        TRect aScreenRect );
       
   228     ~CTsGridItemDrawer();
   245     ~CTsGridItemDrawer();
   229 
   246 
   230 public: // New functions
   247 public: // New functions
   231 
   248 
   232     /**
   249     /**
   290      * @param  aStrokeOffset  offset of the stroke rectangle relative
   307      * @param  aStrokeOffset  offset of the stroke rectangle relative
   291      *                        to item rectangle
   308      *                        to item rectangle
   292      * @param aStrokeSize     size of the stroke rectangle
   309      * @param aStrokeSize     size of the stroke rectangle
   293      */
   310      */
   294     void SetStrokeOffset( TPoint aStrokeOffset, TSize aStrokeSize );
   311     void SetStrokeOffset( TPoint aStrokeOffset, TSize aStrokeSize );
       
   312     
       
   313     /**
       
   314      * Set screen rectangle, used by the item drawer to determine
       
   315      * drawn area.
       
   316      * 
       
   317      * @param  aRect  screen rectangle
       
   318      */
       
   319     void SetScreenRect( TRect aRect );
   295 
   320 
   296 private: // From CFormattedCellListBoxItemDrawer
   321 private: // From CFormattedCellListBoxItemDrawer
   297     void DrawActualItem( TInt aItemIndex, const TRect& aActualItemRect,
   322     void DrawActualItem( TInt aItemIndex, const TRect& aActualItemRect,
   298                          TBool aItemIsCurrent, TBool aViewIsEmphasized,
   323                          TBool aItemIsCurrent, TBool aViewIsEmphasized,
   299                          TBool aViewIsDimmed, TBool aItemIsSelected ) const;
   324                          TBool aViewIsDimmed, TBool aItemIsSelected ) const;