graphicsdeviceinterface/gdi/tgdi/TTYPES.H
changeset 171 414d4b727fd9
parent 0 5d03bc08d59c
equal deleted inserted replaced
160:969102054596 171:414d4b727fd9
     1 // Copyright (c) 1998-2009 Nokia Corporation and/or its subsidiary(-ies).
     1 // Copyright (c) 1998-2010 Nokia Corporation and/or its subsidiary(-ies).
     2 // All rights reserved.
     2 // All rights reserved.
     3 // This component and the accompanying materials are made available
     3 // This component and the accompanying materials are made available
     4 // under the terms of "Eclipse Public License v1.0"
     4 // under the terms of "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
   101 private:
   101 private:
   102 	CPalette* iPalette;
   102 	CPalette* iPalette;
   103 	CTestPalette* iPalette2;
   103 	CTestPalette* iPalette2;
   104 	CTTypes* iTest;
   104 	CTTypes* iTest;
   105 	};
   105 	};
   106 
       
   107 class TTestFontAccess
       
   108 	{
       
   109 public:
       
   110 	CFont* iFont;
       
   111 	TInt iAccessCount;
       
   112 	};
       
   113 
       
   114 class CTestTypefaceStore : public CTypefaceStore
       
   115 	{
       
   116 public:
       
   117 	CTestTypefaceStore(CTTypes* aTest);
       
   118 	void ConstructTestL();
       
   119 	TInt Count();
       
   120 	TInt AccessCount(TInt aIndex);
       
   121 	void AddFont(CFont*);
       
   122 	void OpenFont(CFont*);
       
   123 	// CTypefaceStore implementation
       
   124 	TInt GetNearestFontInTwips(CFont*&, const TFontSpec&) { return KErrNone; }
       
   125 	TInt GetNearestFontToDesignHeightInTwips(CFont*&, const TFontSpec&) { return KErrNone; }
       
   126 	TInt GetNearestFontToMaxHeightInTwips(CFont*&, const TFontSpec&, TInt) { return KErrNone; }
       
   127 	virtual TInt NumTypefaces() const {return(0);}
       
   128 	virtual void TypefaceSupport(TTypefaceSupport&,TInt) const {}
       
   129 	virtual TInt FontHeightInTwips(TInt,TInt) const {return(0);}
       
   130 	virtual TBool IsSameFont(CFont* aFirstFont,CFont* aSecondFont) {return(aFirstFont==aSecondFont);}
       
   131 private:
       
   132 	CTTypes* iTest;	
       
   133 	};
       
   134 
       
   135 class TestTFStore
       
   136 	{
       
   137 public:
       
   138 	TestTFStore(CTTypes* aTest);
       
   139 	void Test();
       
   140 private:
       
   141 	CTestTypefaceStore iTTFStore;
       
   142 	CTTypes* iTest;
       
   143 	};
       
   144 
       
   145 class TestFontCache
       
   146 	{
       
   147 public:
       
   148 	TestFontCache(CTTypes* aTest);
       
   149 	void Test();
       
   150 	void TestL();
       
   151 public:
       
   152 	CFontCache* iCache;
       
   153 	CTTypes* iTest;
       
   154 	};
       
   155 
       
   156 class TestLine
   106 class TestLine
   157 	{
   107 	{
   158 public:
   108 public:
   159 	TestLine(const TPoint& aStart,const TPoint& aFinish, CTTypes* aTest);
   109 	TestLine(const TPoint& aStart,const TPoint& aFinish, CTTypes* aTest);
   160 	void Test();
   110 	void Test();
   168 	TLinearDDA iLine;
   118 	TLinearDDA iLine;
   169 	TPoint iStart;
   119 	TPoint iStart;
   170 	TPoint iFinish;
   120 	TPoint iFinish;
   171 	CTTypes* iTest;
   121 	CTTypes* iTest;
   172 	};
   122 	};
   173 
       
   174 class TestTypeface
       
   175 	{
       
   176 public:
       
   177 	TestTypeface(const TBuf<KMaxTypefaceNameLength>& aName,TUint32 aFlags, CTTypes* aTest);
       
   178 	void Test();
       
   179 	void TestStream();
       
   180 private:
       
   181     TBuf<KMaxTypefaceNameLength> iName;
       
   182 	TUint32 iFlags;
       
   183 	CTTypes* iTest;
       
   184 	};
       
   185 
       
   186 class TestMargins
       
   187 	{
       
   188 public:
       
   189 	TestMargins(TInt aLeft,TInt aRight,TInt aTop,TInt aBottom, CTTypes* aTest);
       
   190 	void Test();
       
   191 	void TestStream();
       
   192 private:
       
   193 	TInt iLeft;
       
   194 	TInt iRight;
       
   195 	TInt iTop;
       
   196 	TInt iBottom;
       
   197 	CTTypes* iTest;
       
   198 	};
       
   199 
       
   200 class TestPageSpec
   123 class TestPageSpec
   201 	{
   124 	{
   202 public:
   125 public:
   203 	TestPageSpec(TPageSpec::TPageOrientation anOrientation,const TSize& aSize, CTTypes* aTest);
   126 	TestPageSpec(TPageSpec::TPageOrientation anOrientation,const TSize& aSize, CTTypes* aTest);
   204 	void Test();
   127 	void Test();
   206 private:
   129 private:
   207 	TSize iPortraitPageSize;
   130 	TSize iPortraitPageSize;
   208 	TPageSpec::TPageOrientation iOrientation;
   131 	TPageSpec::TPageOrientation iOrientation;
   209 	CTTypes* iTest;
   132 	CTTypes* iTest;
   210 	};
   133 	};
   211 
       
   212 class TestFontEffect
       
   213 	{
       
   214 public:
       
   215 	TestFontEffect(CTTypes* aTest) : 
       
   216 		iTest(aTest)
       
   217 		{
       
   218 		
       
   219 		}
       
   220 	void Test();
       
   221 	CTTypes* iTest;
       
   222 	};
       
   223 
       
   224 class TestTFontStyle
       
   225 	{
       
   226 public:
       
   227 	TestTFontStyle(CTTypes* aTest) : 
       
   228 		iTest(aTest)
       
   229 		{
       
   230 		
       
   231 		}
       
   232 	void Test();
       
   233 private:
       
   234 	void Test(TFontStyle& aFontStyle);
       
   235 	void TestStream(const TFontStyle& aFontStyle);
       
   236 	void TestStyle(TFontStyle& aFontStyle);
       
   237 	TBool TestPosture(TFontStyle& aFontStyle);
       
   238 	TBool TestStrokeWeight(TFontStyle& aFontStyle);
       
   239 	TBool TestPrintPosition(TFontStyle& aFontStyle);
       
   240 	TBool VerifyStyle(const TFontStyle& aFontStyle, TFontPosture aFontPosture, TFontStrokeWeight aFontStrokeWeight, TFontPrintPosition aFontPrintPosition);
       
   241 	void TestBitmapType(TFontStyle& aFontStyle);
       
   242 	void TestFontEffect(TFontStyle& aFontStyle);
       
   243 	void VerifyFontEffect(TFontStyle& aFontStyle);
       
   244 protected:
       
   245 	CTTypes* iTest;
       
   246 	};
       
   247 
       
   248 class TestFontSpec
       
   249 	{
       
   250 public:
       
   251 	TestFontSpec(const TTypeface& aTypeface,TInt aHeight,TFontStyle aStyle, CTTypes* aTest);
       
   252 	void Test();
       
   253 	void TestStream();
       
   254 private:
       
   255 	TTypeface iTypeface;
       
   256 	TInt iHeight;
       
   257 	TFontStyle iStyle;
       
   258 	CTTypes* iTest;
       
   259 	};
       
   260 
       
   261 class TestRgb
   134 class TestRgb
   262 	{
   135 	{
   263 public:
   136 public:
   264 	TestRgb(TUint8 r1,TUint8 g1,TUint8 b1, CTTypes* aTest);
   137 	TestRgb(TUint8 r1,TUint8 g1,TUint8 b1, CTTypes* aTest);
   265 	void Test();
   138 	void Test();