camera_plat/active_palette_2_api/inc/activepalette2factory.h
branchRCL_3
changeset 24 bac7acad7cb3
parent 0 1ddebce53859
equal deleted inserted replaced
23:61bc0f252b2b 24:bac7acad7cb3
       
     1 /*
       
     2 * Copyright (c) 2007-2009 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:  Creates concrete implementation of AP
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 /**
       
    20  * @file ActivePalette2Factory.h
       
    21  * Creates concrete implementation of AP
       
    22  */
       
    23 
       
    24 #ifndef _ACTIVE_PALETTE_2_FACTORY_H
       
    25 #define _ACTIVE_PALETTE_2_FACTORY_H
       
    26 
       
    27 #include <e32std.h>
       
    28 #include <e32base.h>
       
    29 
       
    30 class MActivePalette2UI;
       
    31 class CHuiEnv;
       
    32 class MGui;
       
    33 
       
    34 /**
       
    35  * Describes how the standard CCoeControl-based Active Palette will be rendered
       
    36  */
       
    37 enum TActivePalette2DrawMode
       
    38 	{
       
    39 	EAP2DrawModeSemiTransparent = 0, ///< Semi-transparent, alpha-blended background
       
    40 	EAP2DrawModeCheckerboard,        ///< With a checkerboard background. Alpha values will either be fully opaque or fully transparent.
       
    41 	EAP2DrawModeOpaque,              ///< No tranparency. Not officially supported
       
    42 
       
    43 	EAP2DrawModeSemiTransparentTooltipModeFading ///< Semi-transparent, alpha-blended background, fading tooltip
       
    44   };
       
    45 
       
    46 /**
       
    47  * Factory class for Active Palette 2. Use these static functions to create AP2 objects.
       
    48  * Class should not be instantiated.
       
    49  */
       
    50 class ActivePalette2Factory
       
    51     {
       
    52 public:
       
    53     /**
       
    54     * Creates a legacy-style, CCoeControl-based Active Palette.
       
    55     * The control created is NOT a window-owning control. Set the container window and Mop parent using
       
    56     * the CoeControl() function.
       
    57     * @param aDrawMode The drawing style used to render the AP
       
    58     * @return The constructed Active Palette
       
    59     */
       
    60     IMPORT_C static MActivePalette2UI* CreateActivePaletteUIL(TActivePalette2DrawMode aDrawMode);
       
    61     
       
    62     /**
       
    63     * Creates a new-style, CHuiControl-based Active Palette.
       
    64     * The control should be added to a control group using
       
    65     * the CoeControl() function.
       
    66     * @param aHuiEnv The client app's Hui environment
       
    67     * @return The constructed Active Palette
       
    68     */
       
    69     IMPORT_C static MActivePalette2UI* CreateHUIActivePaletteUIL(CHuiEnv& aHuiEnv);
       
    70 
       
    71     /**
       
    72     * Creates a new-style, GuiLib-based Active Palette.
       
    73     * @param aGui The client app's Gui environment
       
    74     * @return The constructed Active Palette
       
    75     */
       
    76     IMPORT_C static MActivePalette2UI* CreateGuiActivePaletteUIL(MGui* aGui);
       
    77 
       
    78 protected:
       
    79     /**
       
    80      * Constructor - not for external use
       
    81      */
       
    82     ActivePalette2Factory() {}
       
    83     };
       
    84 
       
    85 
       
    86 #endif //  _ACTIVE_PALETTE_2_FACTORY_H