epoc32/include/mw/aknslistboxbackgroundcontrolcontext.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 concrete public class 
williamr@2
    15
*                CAknsListBoxBackgroundControlContext.
williamr@2
    16
*
williamr@2
    17
*/
williamr@2
    18
williamr@2
    19
williamr@2
    20
#ifndef AKNSLISTBOXBACKGROUNDCONTROLCONTEXT_H
williamr@2
    21
#define AKNSLISTBOXBACKGROUNDCONTROLCONTEXT_H
williamr@2
    22
williamr@2
    23
//  INCLUDES
williamr@2
    24
#include <AknsBasicBackgroundControlContext.h>
williamr@2
    25
williamr@2
    26
// CLASS DECLARATION
williamr@2
    27
williamr@2
    28
/**
williamr@2
    29
*  Implementation of a control context that provides a layout background with
williamr@2
    30
*  a background bitmap, its layout rectangle, a secondary bitmap that will
williamr@2
    31
*  be tiled in its own layout rectangle and third bitmap for the bottom part
williamr@2
    32
*  with 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(CAknsListBoxBackgroundControlContext) : 
williamr@2
    42
    public CAknsBasicBackgroundControlContext
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
        * @param aTiledBitmapID Item ID of the second bitmap that will
williamr@2
    60
        *   be tiled in another layout rectangle.
williamr@2
    61
        *
williamr@2
    62
        * @param aTiledRect Rectangle where the second bitmap should be
williamr@2
    63
        *   tiled to.
williamr@2
    64
        *
williamr@2
    65
        * @return Newly constructed object.
williamr@2
    66
        */
williamr@2
    67
        IMPORT_C static CAknsListBoxBackgroundControlContext* NewL(
williamr@2
    68
            const TAknsItemID& aImageID, const TRect& aRect, 
williamr@2
    69
            const TBool aParentAbsolute, const TAknsItemID& aTiledBitmapID,
williamr@2
    70
            const TRect& aTiledRect );
williamr@2
    71
        
williamr@2
    72
        /**
williamr@2
    73
        * Destructor.
williamr@2
    74
        */
williamr@2
    75
        virtual ~CAknsListBoxBackgroundControlContext();
williamr@2
    76
williamr@2
    77
    public: // New functions
williamr@2
    78
        
williamr@2
    79
        /**
williamr@2
    80
        * Sets the item ID of the tiled bitmap.
williamr@2
    81
        *
williamr@2
    82
        * @since 2.0
williamr@2
    83
        *
williamr@2
    84
        * @param aID Item ID of the bitmap.
williamr@2
    85
        */
williamr@2
    86
        IMPORT_C void SetTiledBitmap( const TAknsItemID& aID );
williamr@2
    87
williamr@2
    88
        /**
williamr@2
    89
        * Sets the layout rectangle of the tiled bitmap.
williamr@2
    90
        *
williamr@2
    91
        * @since 2.0
williamr@2
    92
        *
williamr@2
    93
        * @param aRect Rectangle where the bitmap should be laid out.
williamr@2
    94
        */
williamr@2
    95
        IMPORT_C void SetTiledRect( const TRect& aRect );
williamr@2
    96
williamr@2
    97
        /**
williamr@2
    98
        * Sets the item ID of the bottom part bitmap.
williamr@2
    99
        *
williamr@2
   100
        * @since 2.0
williamr@2
   101
        *
williamr@2
   102
        * @param aID Item ID of the bitmap.
williamr@2
   103
        */
williamr@2
   104
        IMPORT_C void SetBottomBitmap( const TAknsItemID& aID );
williamr@2
   105
williamr@2
   106
        /**
williamr@2
   107
        * Sets the layout rectangle of the bottom part bitmap.
williamr@2
   108
        *
williamr@2
   109
        * @since 2.0
williamr@2
   110
        *
williamr@2
   111
        * @param aRect Rectangle where the bitmap should be laid out.
williamr@2
   112
        */
williamr@2
   113
        IMPORT_C void SetBottomRect( const TRect& aRect );
williamr@2
   114
williamr@2
   115
    public: // From MAknsControlContext
williamr@2
   116
williamr@2
   117
        /**
williamr@2
   118
        * @copydoc MAknsControlContext::IsCompatibleWithType
williamr@2
   119
        */
williamr@2
   120
        TBool IsCompatibleWithType( const TAknsControlContextType aType ) const;
williamr@2
   121
williamr@2
   122
        /**
williamr@2
   123
        * Updates the control context, if necessary.
williamr@2
   124
        * This method is called by the framework before drawing with the 
williamr@2
   125
        * context.
williamr@2
   126
        *
williamr@2
   127
        * Implementation in CAknsListBoxBackgroundControlContext 
williamr@2
   128
        * disables any non-existing levels.
williamr@2
   129
        *
williamr@2
   130
        * @since 2.8
williamr@2
   131
        *
williamr@2
   132
        * @return Return value reserved for future use. Currently returns 0.
williamr@2
   133
        */
williamr@2
   134
        TInt UpdateContext();
williamr@2
   135
        
williamr@2
   136
    protected:
williamr@2
   137
williamr@2
   138
        /**
williamr@2
   139
        * C++ constructor.
williamr@2
   140
        */
williamr@2
   141
        CAknsListBoxBackgroundControlContext();
williamr@2
   142
williamr@2
   143
        /**
williamr@2
   144
        * Symbian 2nd phase constructor.
williamr@2
   145
        */
williamr@2
   146
        void ConstructL( const TRect& aRect, const TBool aParentAbsolute,
williamr@2
   147
            const TAknsItemID& aImageID,
williamr@2
   148
            const TAknsItemID& aTiledBitmapID, const TRect& aTiledRect );
williamr@2
   149
    
williamr@2
   150
    protected:  // Data
williamr@2
   151
        
williamr@2
   152
        /**
williamr@2
   153
        * Structure for tiled layout.
williamr@2
   154
        */
williamr@2
   155
        TAknsBackground* iTiledLayout;
williamr@2
   156
williamr@2
   157
        /**
williamr@2
   158
        * Structure for bottom part layout.
williamr@2
   159
        */
williamr@2
   160
        TAknsBackground* iBottomLayout;
williamr@2
   161
williamr@2
   162
    };
williamr@2
   163
williamr@2
   164
#endif      // AKNSLISTBOXBACKGROUNDCONTROLCONTEXT_H
williamr@2
   165
            
williamr@2
   166
// End of File