lafagnosticuifoundation/cone/tef/TCone1Step.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 //
       
    15 
       
    16 /**
       
    17  @file
       
    18  @internalComponent - Internal Symbian test code 
       
    19 */
       
    20 
       
    21 
       
    22 #if !defined(__TCONE1STEP_H__)
       
    23 #define __TCONE1STEP_H__
       
    24 
       
    25 #include <coemain.h>
       
    26 #include <coecntrl.h>
       
    27 #include <coeaui.h>
       
    28 #include <e32keys.h>
       
    29 #include <basched.h>
       
    30 #include <test/testexecutestepbase.h>
       
    31 #include "TConeTestServer.h"
       
    32 #include "appfwk_test_AppUi.h"
       
    33 
       
    34 //! A CTestStep Derived Class.\n
       
    35 
       
    36 /**  Incorporates the tests on CCoeControl APIs and handling of 
       
    37 	 Key and Pointer Events.\n
       
    38 */
       
    39 
       
    40 class CTCone1Step : public CTmsTestStep
       
    41 	{
       
    42 public:
       
    43 	CTCone1Step();
       
    44 	~CTCone1Step();
       
    45 //	virtual TVerdict doTestStepPreambleL();
       
    46 //	virtual TVerdict doTestStepPostambleL();
       
    47 	virtual TVerdict doTestStepL();
       
    48 	void ConstructCone1AppL(CCoeEnv* aCoe);
       
    49 
       
    50 private:
       
    51 	};
       
    52 
       
    53 class CCone1TestAppUi;
       
    54 
       
    55 //! A CCoeControl Derived Class.\n
       
    56 
       
    57 /**   Incorporates the tests on CCoeControl APIs and handling of 
       
    58 	  Key and Pointer Events.\n  */
       
    59 
       
    60 class CTestControl : public CCoeControl
       
    61     {
       
    62 friend class CCone1TestAppUi;
       
    63 public:
       
    64     void ConstructL();
       
    65     ~CTestControl();
       
    66 protected: // framework
       
    67     TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent,TEventCode aType);
       
    68     void HandlePointerEventL(const TPointerEvent& aPointerEvent);
       
    69 private: // framework
       
    70     void Draw(const TRect& aRect) const;
       
    71 	void FocusChanged(TDrawNow aDrawNow);
       
    72 private: // new functions
       
    73     void CreateFontL();
       
    74     void DrawBorder() const;
       
    75     void DrawMessage() const;
       
    76     void DrawMessageNow() const;
       
    77 private:
       
    78 	//! Message to be displayed on the control.\n
       
    79     TBuf<40> iMessage;
       
    80     //! Font interface for the control.\n
       
    81     CFont* iFont;
       
    82     };
       
    83 //! A CTestCoeAppUi Derived Class.\n
       
    84 
       
    85 /**   App Ui class for the TCone1Step.\n */
       
    86 
       
    87 class CCone1TestAppUi : public CTestCoeAppUi
       
    88     {
       
    89 public:
       
    90 	CCone1TestAppUi(CTmsTestStep* aStep);
       
    91 	~CCone1TestAppUi();
       
    92 public:	// from CCoeAppUi
       
    93 	void ConstructL();
       
    94 private:
       
    95 	void RunTestStepL(TInt aStepNum);
       
    96 	void TestKeyDownL();
       
    97 	void TestButtonDownL();
       
    98 	void TestDoubleClickL();
       
    99 	void TestCtrlKeyDownKeyRightArrowL();
       
   100 	void TestCtrlKeyDownKeyLeftArrowL();
       
   101 	void TestCtrlKeyDownKeyDownArrowL();
       
   102 	void TestCtrlKeyDownKeyUpArrowL();
       
   103 private:
       
   104 	//! Control used to test CCoeControl APIs.\n
       
   105 	CTestControl* iControl;
       
   106     };
       
   107 
       
   108 //! TCone1 Test Step Name.\n
       
   109 _LIT(KTCone1Step,"TCone1");
       
   110 
       
   111 #endif
       
   112 
       
   113