extras/calcsoft/inc/CalcAppUi.h
branchRCL_3
changeset 21 10c6e6d6e4d9
parent 0 3ee3dfdd8d69
equal deleted inserted replaced
20:41b775cdc0c8 21:10c6e6d6e4d9
       
     1 /*
       
     2 * Copyright (c) 2002 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:  An App UI class, CCalcAppUi, derived from CAknViewAppUi
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef     CALCAPPUI_H
       
    20 #define     CALCAPPUI_H
       
    21 
       
    22 
       
    23 //  INCLUDES
       
    24 #include <aknViewAppUi.h>
       
    25 
       
    26 
       
    27 //  FORWARD DECLARATIONS
       
    28 class   CCalcAppEnv;
       
    29 class   CEnvironmentChangeNotifier;
       
    30 
       
    31 //  CLASS DEFINITIONS 
       
    32 
       
    33 /**
       
    34 CCalcAppUi : 'AppUi' class
       
    35 */
       
    36 
       
    37 class   CCalcAppUi
       
    38       :public CAknViewAppUi
       
    39 
       
    40     {
       
    41     public:     // Constructors and destructor
       
    42         /**
       
    43         * C++ default constructor.
       
    44         */
       
    45         CCalcAppUi();
       
    46         
       
    47         /**
       
    48         * Destructor.
       
    49         */
       
    50         virtual ~CCalcAppUi();
       
    51 
       
    52     public: // New functions
       
    53         /**
       
    54         * Exit Calculator application.
       
    55         */
       
    56         void ExitCalculator();
       
    57 
       
    58 		/**
       
    59 		* Returns ETrue value when the skin change event has occured.
       
    60 		*/
       
    61 		inline TBool IsSkinChanged()const;
       
    62 
       
    63 		/**
       
    64 		* Sets the value to ETrue when the skin changes
       
    65 		* @param aETrue : Boolean value to set the iIsSkinChanged variable to ETtrue.
       
    66         */
       
    67 		inline void SetSkinChanged(TBool aETrue); 
       
    68 
       
    69     private: // New functions
       
    70         /**
       
    71         * This function is called when locale is changed.
       
    72         * @param aThisPtr : Specified in TCallback constructor.
       
    73         * @return EFalse
       
    74         */
       
    75         static TInt LocaleCallback(TAny* aThisPtr);
       
    76 
       
    77         /**
       
    78         * Handle locale change event.
       
    79         */
       
    80         void HandleLocaleChangeEvent();
       
    81         
       
    82     private: // Functions from base classes
       
    83         /**
       
    84         * From CEikAppUi, default constructor
       
    85         */
       
    86         void ConstructL(); 
       
    87 
       
    88         /**
       
    89         * From CEikAppUi, Handle Exit command.
       
    90         * Other command is handled in CCalcView::HandleCommandL().
       
    91         * @param : aCommand : command ID
       
    92         */
       
    93         void HandleCommandL(TInt aCommand);
       
    94 
       
    95 		/**
       
    96 		*To handle the event when the skin changes.
       
    97 		*@param aType :This is used to check whether the skin changes or not.
       
    98         */
       
    99 		void HandleResourceChangeL(TInt aType);
       
   100 
       
   101 		/**
       
   102 		*Handles events sent to the application by the window server.
       
   103 		*@param aEvent : window server event.
       
   104 		*@param aDestination : The control associated with the event. 
       
   105 		**/
       
   106         void HandleWsEventL( const TWsEvent& aEvent, CCoeControl* aDestination );
       
   107               
       
   108     private:    // Data
       
   109         CCalcAppEnv* iCalcAppEnv; // Calculator environment
       
   110         CEnvironmentChangeNotifier* iLocaleChangeNotifier;
       
   111                                         // For locale change notifier
       
   112 		TBool			iIsSkinChanged; // For Skin change notification
       
   113     };
       
   114 
       
   115 #include"CalcAppUi.inl"
       
   116 #endif      //  CALCAPPUI_H
       
   117             
       
   118 // End of File