usbuis/imageprintui/inc/settingscontainer.h
changeset 93 2dc695882abd
parent 89 3592750162a5
equal deleted inserted replaced
89:3592750162a5 93:2dc695882abd
     1 /*
       
     2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Header file for settingscontainer
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef CSETTINGSCONTAINER_H
       
    19 #define CSETTINGSCONTAINER_H
       
    20 
       
    21 
       
    22 // INCLUDES
       
    23 #include <coecntrl.h>
       
    24 #include <aknview.h>    // AVKON components
       
    25 #include <aknlists.h>
       
    26 
       
    27 #include "settingsview.h"
       
    28 
       
    29 
       
    30 // FORWARD DECLARATIONS
       
    31 class CAknsBasicBackgroundControlContext;
       
    32 class CSettingsItems;
       
    33 class CImagePrintUiAppUi;
       
    34 class CCapabilityManager;
       
    35 
       
    36 
       
    37 /**
       
    38 *   Container class for setting items   
       
    39 */
       
    40 class CSettingsContainer : public CCoeControl
       
    41     {
       
    42 
       
    43 
       
    44 public:
       
    45 
       
    46    /**
       
    47     *   Two phase constructor
       
    48     *   @param aRect  reference to container area
       
    49     *   @param aAppUi the pointer to  the CImagePrintUiAppUi
       
    50     *   @return a CSettingsContainer instance
       
    51     */
       
    52     static CSettingsContainer* NewL( const TRect& aRect, CImagePrintUiAppUi* aAppUi );
       
    53 
       
    54    /**
       
    55     *   Two phase constructor
       
    56     *   
       
    57     *   @param aRect  reference to container area
       
    58     *   @param aAppUi the pointer to  the CImagePrintUiAppUi
       
    59     *   @return a CSettingsContainer instance
       
    60     */
       
    61     static CSettingsContainer* NewLC( const TRect& aRect, CImagePrintUiAppUi* aAppUi );
       
    62 
       
    63    /**
       
    64     *   Destructor
       
    65     */	
       
    66     virtual ~CSettingsContainer();
       
    67 
       
    68     /**
       
    69      * Forward change event to container
       
    70      * @param None
       
    71      * @return None.
       
    72      */
       
    73     void HandleChange(); 
       
    74     
       
    75 
       
    76 private: // Methods derived from CCoeControl
       
    77 
       
    78    /**
       
    79     * From CCoeControl Handles a chage of client area size.
       
    80     */
       
    81     void SizeChanged(); 	
       
    82 
       
    83    /**
       
    84     * From CCoeControl, Handles a change to the control's resources.
       
    85     */
       
    86     void HandleResourceChange( TInt aType ); 
       
    87     	
       
    88    /**
       
    89     * From CCoeControl Returns the number of components.
       
    90     */
       
    91     TInt CountComponentControls() const;
       
    92 	
       
    93    /**
       
    94     * From CCoeControl Returns a pointer of component.
       
    95     */
       
    96 	CCoeControl* ComponentControl(TInt aIndex) const;
       
    97 	
       
    98    /**
       
    99     * From CCoeControl indicate whether or not a key event was processed 
       
   100     */
       
   101     TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent,TEventCode aType );
       
   102 
       
   103     #ifdef __SERIES60_HELP
       
   104     /**
       
   105     * From CCoeControl read help 
       
   106     */
       
   107     void GetHelpContext( TCoeHelpContext& aContext ) const;
       
   108     #endif
       
   109    
       
   110 private:
       
   111 
       
   112    /**
       
   113     *   Default constructor
       
   114     */
       
   115     CSettingsContainer();
       
   116 
       
   117    /**
       
   118     *   Second phase constructor. Operations which might leave should 
       
   119     *   be called here
       
   120     *   @param aRect  reference to container area
       
   121     *   @param aAppUi the pointer to  the CImagePrintUiAppUi
       
   122     */ 
       
   123     void ConstructL( const TRect& aRect, CImagePrintUiAppUi* aAppUi );
       
   124 
       
   125 
       
   126 
       
   127 private: // Data
       
   128 
       
   129     CAknSettingStyleListBox*    iSettingsMainListBox;   // The setting items list (scrollable)
       
   130     CSettingsItems*             iSettingsItems;         // Format strings for list items
       
   131     CCapabilityManager*         iCapabilityManager;     // Contains capability needed by settings
       
   132     CImagePrintUiAppUi*         iAppUi;
       
   133     CAknsBasicBackgroundControlContext* iSkinContext;  // skin data
       
   134     };
       
   135 
       
   136 #endif // CSETTINGSCONTAINER_H