camerauis/activepalette/Inc/ActivePalette2CheckerboardStyler.h
changeset 19 d9aefe59d544
parent 3 8b2d6d0384b0
child 21 fa6d9f75d6a6
child 28 3075d9b614e6
equal deleted inserted replaced
3:8b2d6d0384b0 19:d9aefe59d544
     1 /*
       
     2 * Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Active Palette Checkerboard Styler*
       
    15 */
       
    16 
       
    17 
       
    18 /**
       
    19  * @file ActivePalette2CheckerboardStyler.h
       
    20  * Active Palette Checkerboard Styler
       
    21  */
       
    22 
       
    23 #ifndef _ACTIVE_PALETTE_2_CHECKERBOARD_STYLER_H
       
    24 #define _ACTIVE_PALETTE_2_CHECKERBOARD_STYLER_H
       
    25 
       
    26 #include "ActivePalette2Styler.h"
       
    27 
       
    28 /**
       
    29  * Renders the checkerboard drawing style 2D AP
       
    30  */
       
    31 class CActivePalette2CheckerboardStyler : public CActivePalette2Styler
       
    32     {
       
    33 public:    
       
    34     /**
       
    35      * 2-stage construction
       
    36      * @return The newly-created object
       
    37      */
       
    38     static CActivePalette2CheckerboardStyler* NewL();
       
    39     
       
    40     /**
       
    41      * Destructor
       
    42      */
       
    43     ~CActivePalette2CheckerboardStyler();
       
    44 
       
    45 /// @name From CActivePalette2Styler
       
    46 //@{
       
    47     void ConstructL();    
       
    48     virtual void DrawItem(TInt aScreenPos, CFbsBitmap* aIcon, CFbsBitmap* aMask, TInt aOffsetFrame, TInt aOffsetTotal);
       
    49     virtual void DrawGap(TInt aScreenPos, TInt aOffsetFrame, TInt aOffsetTotal);
       
    50     virtual void AnimItem(TInt aScreenPos, CFbsBitmap* aIcon, CFbsBitmap* aMask);
       
    51     virtual void DrawTopScrollArrowSection(TBool aShowArrow);
       
    52     virtual void DrawBottomScrollArrowSection(TBool aShowArrow);
       
    53 //@}
       
    54     void LoadAndScaleCheckerboardL( CFbsBitmap* aTargetBitmap, const TDesC& aFileName, TInt32 aId, TInt32 aMaskId, TSize aSize );
       
    55     
       
    56 private:
       
    57     /// The mask for the top section
       
    58 	CFbsBitmap* iAPTopSectionMask;
       
    59 
       
    60 /**
       
    61  * @name Alternate masks
       
    62  * A note about different masks: as the checkerboard pattern repeats over an even number of pixels,
       
    63  * and the difference in y-positions of two consecutive items is odd, two masks are required for some elements.
       
    64  * For example, to keep the pattern consistent, you should use ItemMaskA, GapMaskA, ItemMaskB, GapMaskB, BottomSectionMaskB
       
    65  */
       
    66 //@{
       
    67     /// Item mask for even items. Owned
       
    68 	CFbsBitmap* iAPItemMaskA;
       
    69     /// Item mask for odd items. Owned
       
    70 	CFbsBitmap* iAPItemMaskB;
       
    71     /// Gap mask for even items. Owned
       
    72 	CFbsBitmap* iAPGapMaskA;
       
    73     /// Gap mask for odd items. Owned
       
    74 	CFbsBitmap* iAPGapMaskB;
       
    75 	/// Bottom section mask for when the total number of items is odd. Owned
       
    76 	CFbsBitmap* iAPBottomSectionMaskA;
       
    77 	/// Bottom section mask for when the total number of items is even. Owned
       
    78 	CFbsBitmap* iAPBottomSectionMaskB;
       
    79 //@}	
       
    80     TBool iLineCheckerCounter;
       
    81     };
       
    82 
       
    83 #endif // _ACTIVE_PALETTE_2_CHECKERBOARD_STYLER_H