|
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 #if !defined(__TMSGWIN0STEP_H__) |
|
22 #define __TMSGWIN0STEP_H__ |
|
23 |
|
24 #include <clock.h> |
|
25 #include <coecntrl.h> |
|
26 #include <test/testexecutestepbase.h> |
|
27 #include "TClockTestServer.h" |
|
28 #include "appfwk_test_AppUi.h" |
|
29 |
|
30 class CTMsgWin0Step : public CTmsTestStep |
|
31 { |
|
32 public: |
|
33 CTMsgWin0Step(); |
|
34 ~CTMsgWin0Step(); |
|
35 // virtual TVerdict doTestStepPreambleL(); |
|
36 // virtual TVerdict doTestStepPostambleL(); |
|
37 virtual TVerdict doTestStepL(); |
|
38 void ConstructAppL(CCoeEnv* aCoe); |
|
39 |
|
40 |
|
41 private: |
|
42 }; |
|
43 |
|
44 enum |
|
45 { |
|
46 EGapLeftOfMessageWindowText=3, |
|
47 EGapRightOfMessageWindowText=3, |
|
48 EGapAboveMessageWindowText=4, |
|
49 EGapBelowMessageWindowText=2 |
|
50 }; |
|
51 |
|
52 // classes |
|
53 class CTMsgWinTestAppUi; |
|
54 |
|
55 class CClkMsgWinControl : public CCoeControl |
|
56 { |
|
57 friend class CTMsgWinTestAppUi; |
|
58 public: |
|
59 CClkMsgWinControl(); |
|
60 void ConstructL(); |
|
61 virtual ~CClkMsgWinControl(); |
|
62 private: |
|
63 // functions overriding those in CCoeControl |
|
64 virtual TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType); |
|
65 virtual void HandlePointerEventL(const TPointerEvent& aPointerEvent); |
|
66 virtual void Draw(const TRect& aRect) const; |
|
67 // miscellaneous functions |
|
68 TSize WindowSize(const CFbsFont& aFont, const TDesC& aText) const; |
|
69 private: |
|
70 TRgb iBackgroundColor; |
|
71 RAnimDll iAnimDll; |
|
72 CFbsFont* iFont; |
|
73 CCoeControl* iDummy; |
|
74 RBlankWindow* iBlankWindow; |
|
75 RMessageWindow* iMessageWindow; |
|
76 TInt iCounter; |
|
77 TPoint iPointerOffset; |
|
78 }; |
|
79 |
|
80 class CTMsgWinTestAppUi : public CTestCoeAppUi |
|
81 { |
|
82 public: |
|
83 CTMsgWinTestAppUi(CTmsTestStep* aStep); |
|
84 void ConstructL(); |
|
85 private: |
|
86 CClkMsgWinControl* iControl; |
|
87 void RunTestStepL(TInt aStep); |
|
88 }; |
|
89 |
|
90 _LIT(KTMsgWin0Step,"TMsgWin0"); |
|
91 |
|
92 #endif |