graphicstest/uibench/s60/src/tests_fonts/tfullscreentext.h
changeset 0 5d03bc08d59c
equal deleted inserted replaced
-1:000000000000 0:5d03bc08d59c
       
     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".
       
     7  //
       
     8  // Initial Contributors:
       
     9  // Nokia Corporation - initial contribution.
       
    10  //
       
    11  // Contributors:
       
    12  //
       
    13  // Description:
       
    14  //
       
    15 
       
    16 /**
       
    17  @file 
       
    18  @test
       
    19  @internalComponent - Internal Symbian test code
       
    20  
       
    21 This file specifies the interface to the test of having a full
       
    22  	   screen of text within a CONE control. 
       
    23 */
       
    24 
       
    25 
       
    26 #ifndef __TFULLSCREENTEXT_H__
       
    27 #define __TFULLSCREENTEXT_H__
       
    28 
       
    29 
       
    30 #include "te_conestepbase.h"
       
    31 
       
    32 #include <coecntrl.h> 
       
    33 #include <coeaui.h>
       
    34 #include <eikappui.h>
       
    35 
       
    36 
       
    37 _LIT(KFullScreenText,"tfullscreentext");
       
    38 
       
    39 
       
    40 class CGlobalTextControl : public CCoeControl
       
    41 	{
       
    42 public:
       
    43     static CGlobalTextControl* NewL(const CCoeControl* aParent, 
       
    44     		TBool aDrawVertically, TBool aRightToLeft);
       
    45     static CGlobalTextControl* NewLC(const CCoeControl* aParent, 
       
    46     		TBool aDrawVertically, TBool aRightToLeft);
       
    47     ~CGlobalTextControl();
       
    48 
       
    49 private: 
       
    50     CGlobalTextControl(TBool aDrawVertically, TBool aRightToLeft);
       
    51     void ConstructL(const CCoeControl* aParent);
       
    52 
       
    53     // From CCoeControl
       
    54     void Draw(const TRect& aRect) const;
       
    55     void HandlePointerEventL(const TPointerEvent& aPointerEvent);
       
    56     
       
    57 private:    
       
    58     TBidiText* iBidiText;
       
    59     CWsScreenDevice* iScreen;
       
    60     RSemaphore iSemaphore;
       
    61         
       
    62     TMargins8 iMargin;	
       
    63 	TBool iDrawVertically;
       
    64 	TBool iRightToLeft;
       
    65 	
       
    66 	RWsSession& iWsSession;
       
    67 	};
       
    68 
       
    69 
       
    70 class CTFullScreenText : public CTe_ConeStepBase
       
    71 	{
       
    72 public:
       
    73 	CTFullScreenText();
       
    74 
       
    75 private:
       
    76 	// From CTestStep
       
    77 	virtual TVerdict doTestStepPreambleL();
       
    78 	virtual TVerdict doTestStepL();
       
    79 	virtual TVerdict doTestStepPostambleL();
       
    80 	virtual void InitUIL(CCoeEnv* aCoeEnv);
       
    81 	
       
    82 	void FullScreenTextL();
       
    83 	void GenerateEventL(TRawEvent::TType aEventType);
       
    84 
       
    85 private:
       
    86     RSemaphore iSemaphore;
       
    87 	TBool iDrawVertically;
       
    88 	TBool iRightToLeft;
       
    89 	};
       
    90 
       
    91 
       
    92 class CFullScreenTextAppUi : public CEikAppUi
       
    93 	{
       
    94 public:
       
    95 	CFullScreenTextAppUi();
       
    96 	virtual ~CFullScreenTextAppUi();
       
    97 	void ConstructL(TBool aDrawVertically, TBool aRightToLeft);
       
    98 	
       
    99 private:
       
   100 	CGlobalTextControl* iGlobalTextControl;
       
   101 	};
       
   102 
       
   103 #endif