skins/AknSkins/inc/AknsCombinedBackgroundControlContext.h
author Pat Downey <patd@symbian.org>
Wed, 01 Sep 2010 12:19:53 +0100
branchRCL_3
changeset 107 9f95a5546443
parent 0 05e9090e2422
permissions -rw-r--r--
Revert incorrect RCL_3 drop: Revision: 201033 Kit: 201035

/*
* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:  Container context containing several contextes.
*
*/



#ifndef C_AKNSCOMBINEDBACKGROUNDCONTROLCONTEXT_H
#define C_AKNSCOMBINEDBACKGROUNDCONTROLCONTEXT_H

#include <AknsBasicBackgroundControlContext.h>

/**
 *  Container object holding several contextes.
 *
 *  @lib AknsSkins.lib
 *  @since S60 v5.0
 */
NONSHARABLE_CLASS( CAknsCombinedBackgroundControlContext ) :
    public CAknsBasicBackgroundControlContext
    {

public:

    /**
    * Two-phased constructor.
    *
    * @param aParentAbsolute ETrue if parent absolute layout should be
    *   used, EFalse otherwise. If a parent absolute layout is used,
    *   the parent position must be set and updated using SetParentPos.
    *
    * @return Newly constructed object.
    */
    IMPORT_C static CAknsCombinedBackgroundControlContext* NewL(
        TBool aParentAbsolute );

    /**
    * Destructor.
    */
    virtual ~CAknsCombinedBackgroundControlContext();

    /**
     * Add background control context to a combination.
     *
     * @param aControlContext control context to be added.
     * @return index of the control context, or error code.
     */
    IMPORT_C TInt AddControlContext( MAknsControlContext* aControlContext );

    /**
     * Remove background control context from combination.
     *
     * @param aIndex index of the control context to remove
     */
    IMPORT_C void RemoveControlContext( const TInt aIndex );

    /**
     * Get a reference to a background control context using index.
     *
     * @param aIndex index of the control context to get.
     * @return NULL if context was not found, otherwise pointer to the
     *         context.
     */
    IMPORT_C MAknsControlContext* GetControlContext( const TInt aIndex );

private:

    /**
     * From MAknsControlContext.
     *
     */
    TBool IsCompatibleWithType( const TAknsControlContextType aType ) const;

private: // data

    /**
     * Array containing all the contextes.
     * Own.
     */
    RPointerArray<MAknsControlContext> iBgCcArray;

    };


#endif // C_AKNSCOMBINEDBACKGROUNDCONTROLCONTEXT_H