photosgallery/viewframework/uiutilities/inc/glxskinchangemonitor.h
changeset 0 4e91876724a2
equal deleted inserted replaced
-1:000000000000 0:4e91876724a2
       
     1 /*
       
     2 * Copyright (c) 2008-2009 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:    CoeControl utility for monitoring skin change
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 #ifndef C_GLXSKINCHANGEMONITOR_H
       
    23 #define C_GLXSKINCHANGEMONITOR_H
       
    24 
       
    25 #include <coecntrl.h>
       
    26 #include <AknUtils.h>
       
    27 #include "mglxskinchangeobserver.h"
       
    28 
       
    29 /**
       
    30  *  CGlxSkinChangeMonitor
       
    31  *
       
    32  *  Utility to handle skin changes.
       
    33  *
       
    34  *  @lib 
       
    35  *
       
    36  *  @internal reviewed 
       
    37  */
       
    38 class CGlxSkinChangeMonitor : public CCoeControl
       
    39 	{
       
    40 	
       
    41 	/* for unit testing */
       
    42 	friend class t_glxskinchangemonitor;
       
    43 	friend class t_cglxhuiutility;
       
    44 	
       
    45 	public: // the API
       
    46 
       
    47 	    virtual ~CGlxSkinChangeMonitor();
       
    48 
       
    49 	    /**
       
    50          * Two-phased constructor.
       
    51          *
       
    52          * @return Pointer
       
    53          */
       
    54 		static CGlxSkinChangeMonitor* NewL();
       
    55 	
       
    56      
       
    57 
       
    58 	private:	// Implementation
       
    59 
       
    60 	    /**
       
    61 	     * C++ constructor 
       
    62 	     * @param aEnv the Hui environment
       
    63 	     */
       
    64 	    CGlxSkinChangeMonitor();
       
    65 	    
       
    66 	    
       
    67 	    /**
       
    68         * Symbian 2nd phase constructor
       
    69         */
       
    70 	    void ConstructL();
       
    71 
       
    72         
       
    73     public:
       
    74 		/**
       
    75 		 * Handles resource change. From CCoeControl
       
    76 		 *
       
    77 		 * @ref CCoeControl::HandleResourceChange
       
    78 		 */ 
       
    79 		void HandleResourceChange( TInt aType );
       
    80 		
       
    81 		/**
       
    82 		 *Add MGlxSkinChangeObserver to skin change observers array. 
       
    83 		 *@param aObserver Reference of the MGlxSkinChangeObserver.
       
    84 		 */
       
    85 		 void AddSkinChangeObserverL( MGlxSkinChangeObserver& aObserver );
       
    86 		 
       
    87 		/**
       
    88 		 *Remove MGlxSkinChangeObserver from skin change observers array. 
       
    89 		 *@param aObserver Reference of the MGlxSkinChangeObserver.
       
    90 		 */
       
    91 		 void RemoveSkinChangeObserver( MGlxSkinChangeObserver& aObserver );
       
    92 
       
    93     private:	
       
    94     	
       
    95     	/**
       
    96          * Observers that will be notified if skin is changed
       
    97          * owned
       
    98          */
       
    99         RPointerArray<MGlxSkinChangeObserver> iSkinChangeObservers; 
       
   100 
       
   101 	};
       
   102 
       
   103 #endif // C_GLXUIUTILITYCOECONTROL_H
       
   104