lafagnosticuifoundation/uigraphicsutils/tef/T_DigitWidth.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 #if (!defined __T_DIGITWIDTH_STEP_H__)
       
    22 #define __T_DIGITWIDTH_STEP_H__
       
    23 #include <test/testexecutestepbase.h>
       
    24 #include "TEgulTestServer.h"
       
    25 #include <gulcolor.h>
       
    26 
       
    27 class CT_DigitWidth : public CTestStep
       
    28 	{
       
    29 public:
       
    30 	CT_DigitWidth();
       
    31 	~CT_DigitWidth();
       
    32 	virtual TVerdict doTestStepL();
       
    33 	void test(TInt aResult);
       
    34 
       
    35 private:
       
    36 	void TestFontsL();
       
    37 	void DoTestsL();
       
    38 	TInt TestFindWidthOfWidestDigitType(CFont* aFont, TDigitType aDigitType);
       
    39 	};
       
    40 
       
    41 _LIT(KTestFontName, "TestFont");
       
    42 
       
    43 class CTestFont : public CFont
       
    44 	{
       
    45 public:
       
    46 	CTestFont(CT_DigitWidth* aDigitWidth);
       
    47 	~CTestFont();
       
    48 	virtual TUid DoTypeUid() const;
       
    49 	TInt DoHeightInPixels() const;
       
    50 	TInt DoAscentInPixels() const;
       
    51 	TInt DoCharWidthInPixels(TChar aChar) const;
       
    52 	TInt DoTextWidthInPixels(const TDesC& aText) const;
       
    53 	TInt DoBaselineOffsetInPixels() const;
       
    54 	TInt DoTextCount(const TDesC& aText,TInt aWidthInPixels) const;
       
    55 	TInt DoTextCount(const TDesC& aText,TInt aWidthInPixels,TInt& aExcessWidthInPixels) const;
       
    56 	TInt DoMaxCharWidthInPixels() const;
       
    57 	TInt DoMaxNormalCharWidthInPixels() const;
       
    58 	TFontSpec DoFontSpecInTwips() const;
       
    59 private:
       
    60 	CT_DigitWidth* iDigitWidth;
       
    61 	};
       
    62 
       
    63 
       
    64 _LIT(KT_DigitWidth,"T_DigitWidth");
       
    65 
       
    66 
       
    67 #endif