commonuisupport/uikon/test/tcolours/tcolscm/Tcolscm.h
changeset 0 2f259fa3e83a
equal deleted inserted replaced
-1:000000000000 0:2f259fa3e83a
       
     1 // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // Acts as a very simple run-time colour scheme changer application.\n 
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @file
       
    20  @test
       
    21  @internalComponent - Internal Symbian test code
       
    22 */
       
    23 
       
    24 #ifndef		__TCOLSCM_H
       
    25 #define		__TCOLSCM_H
       
    26 
       
    27 #include "appfwk_test_AppUi.h"
       
    28 
       
    29 _LIT(KTestColscmStep, "TColscm");
       
    30 
       
    31 
       
    32 //!*****************************  CColorSchemeDlg. 
       
    33 /**
       
    34  Dialog for the colour scheme control.
       
    35 */
       
    36 class CColorSchemeDlg : public CEikDialog
       
    37     {
       
    38 	public:
       
    39 	    CColorSchemeDlg(TInt& aChoice);
       
    40 		~CColorSchemeDlg() {};
       
    41 	private: // from CEikDialog
       
    42 	    TBool OkToExitL(TInt aKeycode);
       
    43 		void PreLayoutDynInitL();
       
    44 		TInt& iChoice;
       
    45     };
       
    46 
       
    47 
       
    48 class CColorSchemeControl;
       
    49 
       
    50 //!*****************************  A CTColorSchemeAppUi test class. 
       
    51 /**
       
    52  The class performs tests to change colour scheme.
       
    53 */
       
    54 class CTColorSchemeAppUi : public CTestAppUi
       
    55     {
       
    56 	public:
       
    57 		CTColorSchemeAppUi(CTmsTestStep* aStep);
       
    58 	    void ConstructL();
       
    59 	    ~CTColorSchemeAppUi();
       
    60 		void RunTestStepL(TInt aNextStep);
       
    61 
       
    62 	private: // from CEikAppUi
       
    63 	    void HandleCommandL(TInt aCommand);
       
    64 
       
    65 	private: // new functions
       
    66 		void StorePrefsL();
       
    67 		void HandleColorChangesL();
       
    68 		void ToggleStatusPane();
       
    69 		void ReadCustomColorResourceL();
       
    70 
       
    71 	private:
       
    72 		TInt iResId;
       
    73 		TInt iChoice;
       
    74 		CColorSchemeControl* iColorSchemeControl;
       
    75     };
       
    76 
       
    77 
       
    78 
       
    79 //!*****************************  CColorSchemeControl. 
       
    80 /**
       
    81  The class represents colour scheme control on which tests are performed.
       
    82 */
       
    83 class CColorSchemeControl : public CCoeControl
       
    84     {
       
    85 	public:
       
    86 	    void ConstructL(const TRect& aRect);
       
    87 		~CColorSchemeControl();
       
    88 
       
    89 	private: // framework
       
    90 		void Draw(const TRect& aRect) const;
       
    91 		TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
       
    92 	private: //new 
       
    93 		void InitNameArrayL();
       
    94 	private:
       
    95 		CDesCArrayFlat* iLogicalNames;
       
    96     };
       
    97 
       
    98 
       
    99 
       
   100 //!*****************************  CBlankerWin. 
       
   101 /**
       
   102  Empty Control
       
   103 */
       
   104 class CBlankerWin : public CCoeControl
       
   105     {
       
   106 	public:
       
   107 	    void ConstructL();
       
   108 	private:
       
   109 		void Draw(const TRect& aRect) const;
       
   110     };
       
   111 
       
   112 //!*****************************  A CTestColscmStep test class. 
       
   113 /**
       
   114  The class creates & sets the application's user interface object.
       
   115 */
       
   116 class CTestColscmStep : public CTmsTestStep
       
   117 	{
       
   118 	public:
       
   119 		CTestColscmStep();
       
   120 		~CTestColscmStep();
       
   121 
       
   122 		virtual TVerdict doTestStepL();
       
   123 		void ConstructAppL(CEikonEnv* aCoe);
       
   124 	};
       
   125 
       
   126 
       
   127 #endif
       
   128 
       
   129