First public contribution.
1 // Copyright (c) 2006-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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
19 @internalComponent - Internal Symbian test code
21 This file specifies the interface to the test of having a full
22 screen of text within a CONE control.
26 #ifndef __TCOMPLEXFONTS_H__
27 #define __TCOMPLEXFONTS_H__
30 #include "te_conestepbase.h"
40 _LIT(KTComplexFonts,"tcomplexfonts");
44 * Cone control that contains formatted text. If the control receives
45 * a pointer event it redraws itself and signals a Semaphore once it
46 * has finished with formatting and redrawing the text.
48 class CComplexFontsControl : public CCoeControl
51 static CComplexFontsControl* NewL(const CCoeControl* aParent=NULL);
52 static CComplexFontsControl* NewLC(const CCoeControl* aParent=NULL);
53 ~CComplexFontsControl();
57 void Draw(const TRect& aRect) const;
58 void HandlePointerEventL(const TPointerEvent& aPointerEvent);
60 CComplexFontsControl();
61 void ConstructL(const CCoeControl* aParent = NULL);
64 RSemaphore iSemaphore; // handle to a Semaphore which is owned by the test step
66 CRichText* iRichText; // text
68 CParaFormatLayer* iParaFormatLayer;
69 CCharFormatLayer* iCharFormatLayer;
71 CTextLayout* iLayout; // text layout
72 CTextView* iTextView; // text view which covers the whole screen
74 CParaFormat iParaFormat;
75 CWsScreenDevice* iScreen;
76 RWsSession& iWsSession;
79 class CComplexFontsAppUi : public CEikAppUi
83 virtual ~CComplexFontsAppUi();
87 CComplexFontsControl* iComplexFontsControl;
90 class CTComplexFonts : public CTe_ConeStepBase
97 virtual TVerdict doTestStepPreambleL();
98 virtual TVerdict doTestStepL();
99 virtual TVerdict doTestStepPostambleL();
101 // from CTe_ConeStepBase
102 virtual void InitUIL(CCoeEnv* aCoeEnv);
104 void DrawComplexFontsL();
105 void GenerateEventL(TRawEvent::TType aEventType);
108 RSemaphore iSemaphore; // used to wait for font control to finish drawing