securitydialogs/simlockui/inc/SimLockUIBackgroundControl.h
branchRCL_3
changeset 22 03674e5abf46
equal deleted inserted replaced
21:09b1ac925e3f 22:03674e5abf46
       
     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      * @return a pointer to the created instance of CSimLockUIBackgroundControl
       
    54      */
       
    55     static CSimLockUIBackgroundControl* NewL();
       
    56 
       
    57     /**
       
    58      * NewLC
       
    59      * Create a CSimLockUIBackgroundControl object, which will draw itself to aRect
       
    60      *
       
    61      * @return a pointer to the created instance of CSimLockUIBackgroundControl
       
    62      */
       
    63     static CSimLockUIBackgroundControl* NewLC();
       
    64 
       
    65 
       
    66     /**
       
    67      * ~CSimLockUIBackgroundControl
       
    68      * Destroy the object and release all memory objects
       
    69      */
       
    70      virtual ~CSimLockUIBackgroundControl();
       
    71 
       
    72 public: // Public API
       
    73 
       
    74     /**
       
    75      * SetBackgroundText
       
    76      * Set the background text
       
    77      *
       
    78      * @param aText new background text( ownership passed )
       
    79      */
       
    80     void SetBackgroundText( HBufC* aText );
       
    81 
       
    82 private: // Private Consructors
       
    83 
       
    84     /**
       
    85      * ConstructL
       
    86      * Perform the second phase construction of a CSimLockUIBackgroundControl object
       
    87      */
       
    88     void ConstructL();
       
    89 
       
    90 private: // From CCoeControl
       
    91 
       
    92     /**
       
    93      * SizeChanged
       
    94      * Indicate that the control has been resized
       
    95      */
       
    96     virtual void SizeChanged();
       
    97 
       
    98     /**
       
    99      * HandleResourceChange
       
   100      */
       
   101     void HandleResourceChange( TInt aType );
       
   102 
       
   103     /**
       
   104      * Draw
       
   105      * Draw this CSimLockUIBackgroundControl to the screen
       
   106      *
       
   107      * @param aRect the rectangle of this view that needs updating
       
   108      */
       
   109     virtual void Draw( const TRect& aRect ) const;
       
   110 
       
   111     /**
       
   112      * MopSupplyObject
       
   113      * Retrieves an object of the same type as that encapsulated in aId.
       
   114      *
       
   115      * @param aId type of object to retrieve
       
   116      */
       
   117     virtual TTypeUid::Ptr MopSupplyObject( TTypeUid aId );
       
   118 
       
   119 private: // Private Member API
       
   120 
       
   121     /**
       
   122      * DisplayText
       
   123      * Called by Draw() to display the appropriate background text
       
   124      *
       
   125      * @param aGc graphics context which draws the text
       
   126      */
       
   127     void DisplayText( CGraphicsContext& aGc ) const;
       
   128 
       
   129 private:    // Member data
       
   130 
       
   131     /**
       
   132      * Control which represents the background image
       
   133      * owns
       
   134      */
       
   135     CAknsBasicBackgroundControlContext* iBackgroundSkinContext;
       
   136 
       
   137     /**
       
   138      * Text to display on background pane
       
   139      * owns
       
   140      */
       
   141     HBufC* iDisplayText;
       
   142     };
       
   143 
       
   144 
       
   145 #endif // __SIMLOCKUI_BACKGROUNDCONTROL_H__
       
   146 
       
   147 // End of file.
       
   148