skins/AknSkins/inc/AknsCombinedBackgroundControlContext.h
changeset 0 05e9090e2422
equal deleted inserted replaced
-1:000000000000 0:05e9090e2422
       
     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:  Container context containing several contextes.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef C_AKNSCOMBINEDBACKGROUNDCONTROLCONTEXT_H
       
    21 #define C_AKNSCOMBINEDBACKGROUNDCONTROLCONTEXT_H
       
    22 
       
    23 #include <AknsBasicBackgroundControlContext.h>
       
    24 
       
    25 /**
       
    26  *  Container object holding several contextes.
       
    27  *
       
    28  *  @lib AknsSkins.lib
       
    29  *  @since S60 v5.0
       
    30  */
       
    31 NONSHARABLE_CLASS( CAknsCombinedBackgroundControlContext ) :
       
    32     public CAknsBasicBackgroundControlContext
       
    33     {
       
    34 
       
    35 public:
       
    36 
       
    37     /**
       
    38     * Two-phased constructor.
       
    39     *
       
    40     * @param aParentAbsolute ETrue if parent absolute layout should be
       
    41     *   used, EFalse otherwise. If a parent absolute layout is used,
       
    42     *   the parent position must be set and updated using SetParentPos.
       
    43     *
       
    44     * @return Newly constructed object.
       
    45     */
       
    46     IMPORT_C static CAknsCombinedBackgroundControlContext* NewL(
       
    47         TBool aParentAbsolute );
       
    48 
       
    49     /**
       
    50     * Destructor.
       
    51     */
       
    52     virtual ~CAknsCombinedBackgroundControlContext();
       
    53 
       
    54     /**
       
    55      * Add background control context to a combination.
       
    56      *
       
    57      * @param aControlContext control context to be added.
       
    58      * @return index of the control context, or error code.
       
    59      */
       
    60     IMPORT_C TInt AddControlContext( MAknsControlContext* aControlContext );
       
    61 
       
    62     /**
       
    63      * Remove background control context from combination.
       
    64      *
       
    65      * @param aIndex index of the control context to remove
       
    66      */
       
    67     IMPORT_C void RemoveControlContext( const TInt aIndex );
       
    68 
       
    69     /**
       
    70      * Get a reference to a background control context using index.
       
    71      *
       
    72      * @param aIndex index of the control context to get.
       
    73      * @return NULL if context was not found, otherwise pointer to the
       
    74      *         context.
       
    75      */
       
    76     IMPORT_C MAknsControlContext* GetControlContext( const TInt aIndex );
       
    77 
       
    78 private:
       
    79 
       
    80     /**
       
    81      * From MAknsControlContext.
       
    82      *
       
    83      */
       
    84     TBool IsCompatibleWithType( const TAknsControlContextType aType ) const;
       
    85 
       
    86 private: // data
       
    87 
       
    88     /**
       
    89      * Array containing all the contextes.
       
    90      * Own.
       
    91      */
       
    92     RPointerArray<MAknsControlContext> iBgCcArray;
       
    93 
       
    94     };
       
    95 
       
    96 
       
    97 #endif // C_AKNSCOMBINEDBACKGROUNDCONTROLCONTEXT_H