epoc32/include/mw/aknsbasicbackgroundcontrolcontext.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
williamr@2
     1
/*
williamr@2
     2
* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
williamr@2
     3
* All rights reserved.
williamr@2
     4
* This component and the accompanying materials are made available
williamr@4
     5
* under the terms of "Eclipse Public License v1.0"
williamr@2
     6
* which accompanies this distribution, and is available
williamr@4
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
williamr@2
     8
*
williamr@2
     9
* Initial Contributors:
williamr@2
    10
* Nokia Corporation - initial contribution.
williamr@2
    11
*
williamr@2
    12
* Contributors:
williamr@2
    13
*
williamr@2
    14
* Description:  Defines a public class CAknsBasicBackgroundControlContext.
williamr@2
    15
*
williamr@2
    16
*/
williamr@2
    17
williamr@2
    18
williamr@2
    19
#ifndef AKNSBASICBACKGROUNDCONTROLCONTEXT_H
williamr@2
    20
#define AKNSBASICBACKGROUNDCONTROLCONTEXT_H
williamr@2
    21
williamr@2
    22
//  INCLUDES
williamr@2
    23
#include <AknsControlContext.h>
williamr@2
    24
williamr@2
    25
// FORWARD DECLARATIONS
williamr@2
    26
class TAknsBackground;
williamr@2
    27
williamr@2
    28
// CLASS DECLARATION
williamr@2
    29
williamr@2
    30
/**
williamr@2
    31
*  Implementation of a control context that provides a layout background with
williamr@2
    32
*  a background bitmap and its layout rectangle.
williamr@2
    33
*
williamr@2
    34
*  This is a public class with exported functions.
williamr@2
    35
*  The class is not intended for derivation outside the library.
williamr@2
    36
*
williamr@2
    37
*  @lib AknSkins.lib
williamr@2
    38
*
williamr@2
    39
*  @since 2.0
williamr@2
    40
*/
williamr@2
    41
NONSHARABLE_CLASS(CAknsBasicBackgroundControlContext) : public CBase, 
williamr@2
    42
    public MAknsControlContext
williamr@2
    43
    {
williamr@2
    44
    public:  // Constructors and destructor
williamr@2
    45
        
williamr@2
    46
        /**
williamr@2
    47
        * Two-phased constructor.
williamr@2
    48
        *
williamr@2
    49
        * @since 2.0
williamr@2
    50
        *
williamr@2
    51
        * @param aImageID Item ID of the background bitmap.
williamr@2
    52
        *
williamr@2
    53
        * @param aRect Rectangle where the bitmap should be laid out.
williamr@2
    54
        *
williamr@2
    55
        * @param aParentAbsolute ETrue if parent absolute layout should be
williamr@2
    56
        *   used, EFalse otherwise. If a parent absolute layout is used,
williamr@2
    57
        *   the parent position must be set and updated using SetParentPos.
williamr@2
    58
        *
williamr@2
    59
        * @return Newly constructed object.
williamr@2
    60
        */
williamr@2
    61
        IMPORT_C static CAknsBasicBackgroundControlContext* NewL(
williamr@2
    62
            const TAknsItemID& aImageID, const TRect& aRect, 
williamr@2
    63
            TBool aParentAbsolute );
williamr@2
    64
        
williamr@2
    65
        /**
williamr@2
    66
        * Destructor.
williamr@2
    67
        */
williamr@2
    68
        virtual ~CAknsBasicBackgroundControlContext();
williamr@2
    69
williamr@2
    70
    public: // New functions
williamr@2
    71
        
williamr@2
    72
        /**
williamr@2
    73
        * Sets the item ID of the background bitmap.
williamr@2
    74
        *
williamr@2
    75
        * @since 2.0
williamr@2
    76
        *
williamr@2
    77
        * @param aID Item ID of the bitmap.
williamr@2
    78
        */
williamr@2
    79
        IMPORT_C void SetBitmap( const TAknsItemID& aID );
williamr@2
    80
williamr@2
    81
        /**
williamr@2
    82
        * Sets the layout rectangle of the bitmap.
williamr@2
    83
        *
williamr@2
    84
        * @since 2.0
williamr@2
    85
        *
williamr@2
    86
        * @param aRect Rectangle where the bitmap should be laid out.
williamr@2
    87
        */
williamr@2
    88
        IMPORT_C void SetRect( const TRect& aRect );
williamr@2
    89
williamr@2
    90
        /**
williamr@2
    91
        * Sets the parent position for the layout. This is only
williamr@2
    92
        * used if parent absolute layout was enabled during construction.
williamr@2
    93
        *
williamr@2
    94
        * @since 2.0
williamr@2
    95
        *
williamr@2
    96
        * @param aPos Parent position in screen relative coordinates.
williamr@2
    97
        */
williamr@2
    98
        IMPORT_C void SetParentPos( const TPoint& aPos );
williamr@2
    99
williamr@2
   100
        /**
williamr@2
   101
        * Sets the parent context (drawn beneath the context itself).
williamr@2
   102
        * No ownership is claimed. The parent context object must be
williamr@2
   103
        * valid as long as it is set as parent context.
williamr@2
   104
        *
williamr@2
   105
        * @since 2.6
williamr@2
   106
        *
williamr@2
   107
        * @param aParentContext Pointer to the parent context, or
williamr@2
   108
        *   @c NULL (default value) if none used.
williamr@2
   109
        */
williamr@2
   110
        IMPORT_C void SetParentContext( MAknsControlContext* aParentContext );
williamr@2
   111
williamr@2
   112
    public: // Functions from MAknsControlContext
williamr@2
   113
        
williamr@2
   114
        /**
williamr@2
   115
        * @copydoc MAknsControlContext::SupplySkinParameter
williamr@2
   116
        */
williamr@2
   117
        TInt SupplySkinParameter( TAknsCCParameter aParam );
williamr@2
   118
williamr@2
   119
        /**
williamr@2
   120
        * @copydoc MAknsControlContext::SupplySkinObject
williamr@2
   121
        */
williamr@2
   122
        TAny* SupplySkinObject( TAknsCCObject aObject );
williamr@2
   123
williamr@2
   124
        /**
williamr@2
   125
        * @copydoc MAknsControlContext::IsCompatibleWithType
williamr@2
   126
        */
williamr@2
   127
        TBool IsCompatibleWithType( const TAknsControlContextType aType ) const;
williamr@2
   128
        
williamr@2
   129
    protected:
williamr@2
   130
williamr@2
   131
        /**
williamr@2
   132
        * C++ constructor.
williamr@2
   133
        */
williamr@2
   134
        CAknsBasicBackgroundControlContext();
williamr@2
   135
williamr@2
   136
        /**
williamr@2
   137
        * Symbian 2nd phase constructor.
williamr@2
   138
        */
williamr@2
   139
        void ConstructL( const TRect& aRect, TBool aParentAbsolute,
williamr@2
   140
            const TAknsItemID& aImageID );
williamr@2
   141
    
williamr@2
   142
    protected:  // Data
williamr@2
   143
        
williamr@2
   144
        TAknsBackground* iLayout; //<! Background layout structure.
williamr@2
   145
        MAknsControlContext* iParentContext; //<! Parent context (not owned).
williamr@2
   146
williamr@2
   147
    };
williamr@2
   148
williamr@2
   149
#endif      // AKNSBASICBACKGROUNDCONTROLCONTEXT_H
williamr@2
   150
            
williamr@2
   151
// End of File