commonuisupport/uikon/test/tparent/T_ParentStep.h
changeset 0 2f259fa3e83a
equal deleted inserted replaced
-1:000000000000 0:2f259fa3e83a
       
     1 // Copyright (c) 2005-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 // Tests whether container windows have their parents set by default.
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @file
       
    20  @internalComponent - Internal Symbian test code
       
    21 */
       
    22 
       
    23 #ifndef		__T_ParentSTEP_H
       
    24 #define		__T_ParentSTEP_H
       
    25 
       
    26 
       
    27 #include "appfwk_test_AppUi.h"
       
    28 
       
    29 _LIT(KTestParentStep, "T_Parent");
       
    30 
       
    31 
       
    32 //!  A CTestBrdrColStep test class. 
       
    33 /**
       
    34  Tests that a control has its parent set to the container window
       
    35 */
       
    36 class CTestParentStep : public CTmsTestStep
       
    37 	{
       
    38 public:
       
    39 	CTestParentStep();
       
    40 	~CTestParentStep();
       
    41 	
       
    42 	virtual TVerdict doTestStepL();
       
    43 	void ConstructAppL(CEikonEnv* aCoe);
       
    44 private:
       
    45 	};
       
    46 
       
    47 
       
    48 //!  CSimpleControl. 
       
    49 /**
       
    50  A simple control on which all tests are carried out.
       
    51 */
       
    52 class CSimpleParentControl : public CCoeControl
       
    53     {
       
    54 public:
       
    55 	static CSimpleParentControl* NewL(CCoeControl& aContainer, const TRect& aRect);
       
    56     void ConstructL(CCoeControl& aContainer);
       
    57 	~CSimpleParentControl();
       
    58 
       
    59 private: // framework
       
    60 	TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
       
    61 
       
    62 	};
       
    63 //
       
    64 //
       
    65 // CParentTestAppView
       
    66 //
       
    67 //
       
    68 //! A CCoeControl derived class.\n
       
    69 
       
    70 /**   View Class for CParentTestAppView.\n */
       
    71 
       
    72 class CParentTestAppView : public CCoeControl
       
    73     {
       
    74 public:
       
    75 	static CParentTestAppView* NewL(const TRect& aRect);
       
    76 	
       
    77 	~CParentTestAppView();
       
    78 	
       
    79     inline CSimpleParentControl* GetControl(void) 
       
    80     	{
       
    81     	return iSimpleParentControl;
       
    82     	}
       
    83     
       
    84 protected:
       
    85 	CCoeControl* ComponentControl(TInt aIndex) const;
       
    86 	TInt CountComponentControls() const;
       
    87 private:
       
    88 	CParentTestAppView();
       
    89 	void ConstructL(const TRect& aRect);
       
    90     // Inherited from CCoeControl
       
    91 	void Draw(const TRect& /*aRect*/) const;
       
    92 	
       
    93 private:
       
    94     CSimpleParentControl* iSimpleParentControl;
       
    95     
       
    96     };
       
    97     
       
    98 //!  CSimpleAppUi. 
       
    99 /**
       
   100  UI class to CTestParentStep test step class.
       
   101 */
       
   102 class CSimpleParentAppUi : public CTestCoeAppUi
       
   103     {
       
   104 public:
       
   105 	CSimpleParentAppUi(CTmsTestStep* aStep): 
       
   106 	  CTestCoeAppUi(aStep) {}
       
   107     void ConstructL();
       
   108 	~CSimpleParentAppUi();
       
   109 
       
   110 private:
       
   111  	virtual void RunTestStepL(TInt aNextStep); 
       
   112  	
       
   113  	CParentTestAppView *iParentAppView;
       
   114    };
       
   115 
       
   116 
       
   117 #endif
       
   118 
       
   119