securitydialogs/simlockui/inc/SimLockUIBackgroundControl.h
changeset 1 d5423fbb4f29
child 47 63339781d179
equal deleted inserted replaced
0:164170e6151a 1:d5423fbb4f29
       
     1 /*
       
     2 * ============================================================================
       
     3 *  Name         : SimLockUIBackgroundControl.h
       
     4 *  Part of      : Sim Lock UI Application
       
     5 *  Description  : SimLock UI Background Control Header
       
     6 *  Version      : 
       
     7 *  
       
     8 * Copyright (c) 2005-2010 Nokia Corporation and/or its subsidiary(-ies).
       
     9 * All rights reserved.
       
    10 * This component and the accompanying materials are made available
       
    11 * under the terms of "Eclipse Public License v1.0"
       
    12 * which accompanies this distribution, and is available
       
    13 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
    14 *
       
    15 * Initial Contributors:
       
    16 * Nokia Corporation - initial contribution.
       
    17 *
       
    18 * Contributors:
       
    19 *
       
    20 * Description:   Build info file for Ado domain appinstall 
       
    21 * ============================================================================
       
    22 */
       
    23 
       
    24 #ifndef __SIMLOCKUI_BACKGROUNDCONTROL_H__
       
    25 #define __SIMLOCKUI_BACKGROUNDCONTROL_H__
       
    26 
       
    27 // System includes
       
    28 #include <e32base.h>
       
    29 #include <coecntrl.h>       // CCoeControl
       
    30 
       
    31 // Forward declarations
       
    32 class CAknsBasicBackgroundControlContext;
       
    33 class CGraphicsContext;
       
    34 
       
    35 /**
       
    36  *  CSimLockUIBackgroundControl
       
    37  *
       
    38  *  A CCoeControl object that represents the application background.
       
    39  *
       
    40  *  @lib cone.lib
       
    41  *  @lib aknskins.lib
       
    42  *  @lib aknskinsrv.lib
       
    43  *  @lib aknswallpaperutils.lib
       
    44  */
       
    45 class CSimLockUIBackgroundControl : public CCoeControl
       
    46     {
       
    47 public: // Public Constructors
       
    48 
       
    49     /**
       
    50      * NewL
       
    51      * Create a CSimLockUIBackgroundControl object, which will draw itself to aRect
       
    52      *
       
    53      * @param aRect the rectangle this view will be drawn to
       
    54      * @return a pointer to the created instance of CSimLockUIBackgroundControl
       
    55      */
       
    56     static CSimLockUIBackgroundControl* NewL( const TRect& aRect );
       
    57 
       
    58     /**
       
    59      * NewLC
       
    60      * Create a CSimLockUIBackgroundControl object, which will draw itself to aRect
       
    61      *
       
    62      * @param aRect the rectangle this view will be drawn to
       
    63      * @return a pointer to the created instance of CSimLockUIBackgroundControl
       
    64      */
       
    65     static CSimLockUIBackgroundControl* NewLC( const TRect& aRect );
       
    66 
       
    67 
       
    68     /**
       
    69      * ~CSimLockUIBackgroundControl
       
    70      * Destroy the object and release all memory objects
       
    71      */
       
    72      virtual ~CSimLockUIBackgroundControl();
       
    73 
       
    74 public: // Public API
       
    75 
       
    76     /**
       
    77      * SetBackgroundText
       
    78      * Set the background text
       
    79      *
       
    80      * @param aText new background text( ownership passed )
       
    81      */
       
    82     void SetBackgroundText( HBufC* aText );
       
    83 
       
    84 private: // Private Consructors
       
    85 
       
    86     /**
       
    87      * ConstructL
       
    88      * Perform the second phase construction of a CSimLockUIBackgroundControl object
       
    89      *
       
    90      * @param aRect the rectangle this view will be drawn to
       
    91      */
       
    92     void ConstructL( const TRect& aRect );
       
    93 
       
    94 private: // From CCoeControl
       
    95 
       
    96     /**
       
    97      * SizeChanged
       
    98      * Indicate that the control has been resized
       
    99      */
       
   100     virtual void SizeChanged();
       
   101 
       
   102     /**
       
   103      * Draw
       
   104      * Draw this CSimLockUIBackgroundControl to the screen
       
   105      *
       
   106      * @param aRect the rectangle of this view that needs updating
       
   107      */
       
   108     virtual void Draw( const TRect& aRect ) const;
       
   109 
       
   110     /**
       
   111      * MopSupplyObject
       
   112      * Retrieves an object of the same type as that encapsulated in aId.
       
   113      *
       
   114      * @param aId type of object to retrieve
       
   115      */
       
   116     virtual TTypeUid::Ptr MopSupplyObject( TTypeUid aId );
       
   117 
       
   118 private: // Private Member API
       
   119 
       
   120     /**
       
   121      * DisplayText
       
   122      * Called by Draw() to display the appropriate background text
       
   123      *
       
   124      * @param aGc graphics context which draws the text
       
   125      */
       
   126     void DisplayText( CGraphicsContext& aGc ) const;
       
   127 
       
   128 private:    // Member data
       
   129 
       
   130     /**
       
   131      * Control which represents the background image
       
   132      * owns
       
   133      */
       
   134     CAknsBasicBackgroundControlContext* iBackgroundSkinContext;
       
   135 
       
   136     /**
       
   137      * Text to display on background pane
       
   138      * owns
       
   139      */
       
   140     HBufC* iDisplayText;
       
   141     };
       
   142 
       
   143 
       
   144 #endif // __SIMLOCKUI_BACKGROUNDCONTROL_H__
       
   145 
       
   146 // End of file.
       
   147