uifw/EikStd/coctlinc/AknDoubleSpanScrollIndicator.h
branchRCL_3
changeset 56 d48ab3b357f1
parent 55 aecbbf00d063
equal deleted inserted replaced
55:aecbbf00d063 56:d48ab3b357f1
    21 #include <coecntrl.h>
    21 #include <coecntrl.h>
    22 #include "eikscrlb.h"
    22 #include "eikscrlb.h"
    23 
    23 
    24 #include "AknDoubleSpanScrollIndicatorItem.h"
    24 #include "AknDoubleSpanScrollIndicatorItem.h"
    25 
    25 
    26 class CAknDoubleSpanScrollIndicatorBGExtension;
       
    27 
       
    28 NONSHARABLE_CLASS( TBitmapFx )
       
    29     {
       
    30 public:    
       
    31     struct TRGB
       
    32         {
       
    33         TInt iR;
       
    34         TInt iG;
       
    35         TInt iB;
       
    36         };
       
    37     struct THSL
       
    38         {
       
    39         TInt iH;
       
    40         TInt iS;
       
    41         TInt iL;
       
    42         };
       
    43     
       
    44     static void PixelEffect( TUint16* aPixelData );
       
    45     static TInt HueToRGB( TInt v1, TInt v2, TInt aH );
       
    46     };
       
    47 
       
    48 NONSHARABLE_CLASS(CAknDoubleSpanScrollIndicator) : public CCoeControl
    26 NONSHARABLE_CLASS(CAknDoubleSpanScrollIndicator) : public CCoeControl
    49     {            
    27     {            
    50 public: // public construction and destruction methods
    28 public: // public construction and destruction methods
    51    
    29    
    52    /**
    30    /**
   217     * @return   ETrue, if the handle highlight is on.
   195     * @return   ETrue, if the handle highlight is on.
   218     */
   196     */
   219     TBool HandleHighlight() const;
   197     TBool HandleHighlight() const;
   220     
   198     
   221     /**
   199     /**
   222     * Sets the touch area control.
       
   223     *
       
   224     * @since    5.0
       
   225     * @param    aTouchAreaControl A pointer to the control which is drawn
       
   226     *           along with this indicator.
       
   227     */
       
   228     void SetTouchAreaControl( CCoeControl* aTouchAreaControl );
       
   229     
       
   230     /**
       
   231     * Sets the background drag highlight.
   200     * Sets the background drag highlight.
   232     *
   201     *
   233     * @since    5.0
   202     * @since    5.0
   234     * @param    aHandleHighlight If ETrue, turn the handle highlight on.
   203     * @param    aHandleHighlight If ETrue, turn the handle highlight on.
   235     */
   204     */
   284     *
   253     *
   285     * @since    2.6
   254     * @since    2.6
   286     */
   255     */
   287     void CreateScrollBarItemsL();    
   256     void CreateScrollBarItemsL();    
   288 
   257 
   289     TInt ScrollHandleMaxVisibleSizeInPixels();
   258     TInt HandleMaxSizeInPixels();
   290     TInt HandleBackgroundMinSizeInPixels();
       
   291     TInt HandleMinSizeInPixels();
   259     TInt HandleMinSizeInPixels();
   292 
   260 
   293     /**
   261     /**
   294     * Handles background drawing
   262     * Handles background drawing
   295     * 
   263     * 
   296     * @since    3.1
   264     * @since    3.1
   297     *
   265     *
   298     */
   266     */
   299     void DrawBackground() const;
   267     void DrawBackground() const;
   300     
       
   301     /**
       
   302     * Handles background bitmap creation for window owning scrollbar
       
   303     * 
       
   304     * @since    3.1
       
   305     *
       
   306     */
       
   307     void CreateBackgroundBitmapL();
       
   308     
       
   309     /**
       
   310     * Layout scrollbar handle
       
   311     * 
       
   312     * @since    3.1
       
   313     *
       
   314     */
       
   315     void LayoutHandleGraphics();
       
   316     
       
   317     /**
       
   318     * Used for highlighting handle skin graphics. Takes a bitmap, creates 
       
   319     * a copy and optionally applies an effect for the pixels in the
       
   320     * bitmap. Returns the new bitmap, so caller must take ownership.
       
   321     * Note that the effect only works for EColor64K bitmaps.
       
   322     *
       
   323     * @since    5.0
       
   324     * @param    aSource The source bitmap.
       
   325     * @param    aCopyOnly If ETrue, doesn't apply effect.
       
   326     * @return   The new bitmap.
       
   327     */
       
   328     CFbsBitmap* CopyAndApplyEffectL( const CFbsBitmap* aSource, TBool aCopyOnly = EFalse );
       
   329     
   268     
   330     CAknDoubleSpanScrollIndicatorItem* LoadScrollIndicatorItemL(
   269     CAknDoubleSpanScrollIndicatorItem* LoadScrollIndicatorItemL(
   331             const TAknsItemID &aTopId,
   270             const TAknsItemID &aTopId,
   332             const TAknsItemID &aMidId,
   271             const TAknsItemID &aMidId,
   333             const TAknsItemID &aBottomId);
   272             const TAknsItemID &aBottomId);
   343     TInt iFocusPosition;        // Position of the current field in the list.
   282     TInt iFocusPosition;        // Position of the current field in the list.
   344     TInt iWindowSize;           // Size of the visible part of the list. 
   283     TInt iWindowSize;           // Size of the visible part of the list. 
   345     TInt iFieldPosition;        // Size of the current field. (Optional double span)
   284     TInt iFieldPosition;        // Size of the current field. (Optional double span)
   346     TInt iFieldSize;            // Position inside the current field. (Optional double span)
   285     TInt iFieldSize;            // Position inside the current field. (Optional double span)
   347     TBool iOwnsWindow;            // Is window owning
   286     TBool iOwnsWindow;            // Is window owning
   348     TInt iSpare;
       
   349 
   287 
   350     TRect iBackgroundRect;       // Rect for scrollbar background.
   288     TRect iBackgroundRect;       // Rect for scrollbar background.
   351     TRect iHandleBackgroundRect; // Rect for scrollbar handle background.
   289     TRect iHandleBackgroundRect; // Rect for scrollbar handle background.
   352     TRect iHandleRect;           // Rect for scrollbar handle. 
   290     TRect iHandleRect;           // Rect for scrollbar handle. 
   353     
   291     
   354     TBool iTransparentBackground;  // A flag which tells if we have transparent bg
   292     TBool iTransparentBackground;  // A flag which tells if we have transparent bg
   355     TBool iDrawBackground; // do  we draw any background
   293     TBool iDrawBackground; // do  we draw any background
       
   294     TBool iForceDrawBackground; // draw background
   356     
   295     
   357     TBool iHandleHighlight; // is handle drag highlight on?
   296     TBool iHandleHighlight; // is handle drag highlight on?
   358     
   297     
   359     TBool iBackgroundHighlight; //is background highlight on?
   298     TBool iBackgroundHighlight; //is background highlight on?
   360    
   299    
   361     
       
   362     mutable TBool iDrawBackgroundBitmap; // do we draw the background to the background bitmap before it is drawn
       
   363     TRect iOldRect; // the old scb retangle, to optimize unneccessary resizing
   300     TRect iOldRect; // the old scb retangle, to optimize unneccessary resizing
   364 
   301 
   365     CEikScrollBar::TOrientation iOrientation;    // Vertical or horizontal scrollbar
   302     CEikScrollBar::TOrientation iOrientation;    // Vertical or horizontal scrollbar
   366     
   303     
   367     CAknDoubleSpanScrollIndicatorItem* iBackgroundBar;
   304     CAknDoubleSpanScrollIndicatorItem* iBackgroundBar;
   368     CAknDoubleSpanScrollIndicatorItem* iHighlightBackgroundBar;
   305     CAknDoubleSpanScrollIndicatorItem* iHighlightBackgroundBar;
   369     CAknDoubleSpanScrollIndicatorItem* iHandleBar;
   306     CAknDoubleSpanScrollIndicatorItem* iHandleBar;
   370     CAknDoubleSpanScrollIndicatorItem* iHighlightHandleBar;
   307     CAknDoubleSpanScrollIndicatorItem* iHighlightHandleBar;
   371  
   308  
   372     
       
   373     TInt iHeadItemSize;
   309     TInt iHeadItemSize;
   374     TInt iMidItemSize;
       
   375     TInt iTailItemSize;
   310     TInt iTailItemSize;
   376     
   311 
   377     CCoeControl* iTouchAreaControl; // Not own.
   312     /**
       
   313      * Minimum handle size.
       
   314      */
       
   315     TInt iHandleMinSize;
       
   316     
       
   317     /**
       
   318      * Maximum handle size.
       
   319      */
       
   320     TInt iHandleMaxSize;
   378     };
   321     };
   379 
   322 
   380 #endif
   323 #endif
   381 
   324