diff -r 9674c1a575e9 -r b8fae6b8a148 taskswitcher/taskswitcherui/taskswitcherapp/inc/tsfastswapgrid.h --- a/taskswitcher/taskswitcherui/taskswitcherapp/inc/tsfastswapgrid.h Mon Mar 15 12:39:47 2010 +0200 +++ b/taskswitcher/taskswitcherui/taskswitcherapp/inc/tsfastswapgrid.h Wed Mar 31 21:17:19 2010 +0300 @@ -77,9 +77,9 @@ public: // From CCoeControl void HandlePointerEventL( const TPointerEvent &aPointerEvent ); - TTypeUid::Ptr MopSupplyObject( TTypeUid aId ); void HandleResourceChange( TInt aType ); void SizeChanged(); + void Draw( const TRect& aRect ) const; public: //From MTsDeviceStateObserver /** @@ -117,6 +117,23 @@ void ResetCloseHit(); /** + * Sets color for the screenshot stroke. + * + * @param aColor color for the thumbnail + * @param aHighlightedColor color for thumbnail when item is highlighted + */ + void SetStrokeColors( TRgb aColor, + TRgb aHighlightedColor ); + + /** + * Sets items for which stroke will be drawn + * + * @param aItemIndex array of item indexes for which stroke + * is drawn + */ + void SetStrokeItemsL( RArray& aItemIndex ); + + /** * Sets grid behaviour * * @param aBehaviour behaviour to be set @@ -158,45 +175,6 @@ * Returns visible view. Items outside of visible rectangle are not drawn. */ TRect VisibleViewRect(); - - /** - * Launch tactile ETouchFeedbackSensitive feedback. - */ - void LaunchTactileFeedback(); - - /** - * Set tactile feedback support. - * - * @param aSupport new support value - */ - void SetTactileFeedbackSupport(TBool aSupport); - - /** - * Remove item from iFullyVisibleItems and iPartialVisibleItems arrays - * - * @param aItem idem index - * @return ETrue if item was removed - * EFalse if item was not found - */ - TBool RemoveFromVisibleItems(TInt aItem) const; - - /** - * Add item to iFullyVisibleItems array - * - * @param aItem idem index - * @return ETrue if item was added - * EFalse if item was not added because it was there before - */ - TBool AddToFullyVisibleItems(TInt aItem) const; - - /** - * Remove item from iPartialVisibleItems array - * - * @param aItem idem index - * @return ETrue if item was removed - * EFalse if item was not removed because it was not found - */ - TBool MoveToPartialVisibleItems(TInt aItem) const; private: // From CAknGrid virtual void CreateItemDrawerL(); @@ -209,7 +187,7 @@ /** * Loads close icon bitmap and mask */ - void LoadCloseIcon(); + void LoadCloseIconAndStrokeParams(); /** * Redraws grid and parent controls @@ -221,9 +199,6 @@ // Grid's parent const CCoeControl* iParent; - // Background context for grid - CAknsFrameBackgroundControlContext* iBgContext; - // Close icon handling RArray iCloseItems; TInt iCloseIconHitIdx; @@ -236,13 +211,6 @@ // Visible view rectangle (horizontal scrolling support) TRect iVisibleViewRect; - - // Feedback support - TBool iTactileFeedbackSupport; - CTsFastSwapTimer* iFeedbackTimer; - - mutable RArray iFullyVisibleItems; - mutable RArray iPartialVisibleItems; }; @@ -265,7 +233,8 @@ * Sets close icon drawn for items that can be closed. * Ownership transferred. */ - void SetCloseIcon( CFbsBitmap* aBmp, CFbsBitmap* aMask ); + void SetCloseIcon( CFbsBitmap* aBmp, CFbsBitmap* aBmpMask, + CFbsBitmap* aBmpPressed, CFbsBitmap* aBmpPressedMask ); /** * Initializes close icon rectangles. @@ -296,6 +265,33 @@ * if set to EFalse, background will not be redrawn */ void SetRedrawBackground( TBool aEnable ); + + /** + * Sets color for the screenshot stroke. + * + * @param aColor color for the thumbnail + * @param aHighlightedColor color for thumbnail when item is highlighted + */ + void SetStrokeColors( TRgb aNormalColor, + TRgb aHighlightedColor ); + + /** + * Sets items for which stroke will be drawn + * + * @param aItemIndex array of item indexes for which stroke + * is drawn. + */ + void SetStrokeItemsL( RArray& aItemIndex ); + + /** + * Sets stroke offset and size: values must be relative + * to item rectangle. + * + * @param aStrokeOffset offset of the stroke rectangle relative + * to item rectangle + * @param aStrokeSize size of the stroke rectangle + */ + void SetStrokeOffset( TPoint aStrokeOffset, TSize aStrokeSize ); private: // From CFormattedCellListBoxItemDrawer void DrawActualItem( TInt aItemIndex, const TRect& aActualItemRect, @@ -333,16 +329,24 @@ // Owned CFbsBitmap* iCloseIcon; CFbsBitmap* iCloseIconMask; + CFbsBitmap* iCloseIconPressed; + CFbsBitmap* iCloseIconPressedMask; TRect iScreenRect; TInt iLeftOffset; TInt iRightOffset; - // Layout data + // Close button data TRect iCloseIconRect; TRect iCloseButtonRect; TBool iRedrawBackground; + + // Stroke data + TRgb iStrokeColor; + TRgb iHighlightStrokeColor; + RArray iStrokeItems; + TRect iStrokeRect; };