os/textandloc/fontservices/textshaperplugin/test/HindiDemo/source/hindiDemoApp.cpp
Update contrib.
2 * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of "Eclipse Public License v1.0"
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
16 * hindiDemo application
26 #include <techview/eikfontd.h>
28 #include <hindidemo.rsg>
29 #include "hindiDemo.hrh"
30 #include "hindiDemoApp.h"
31 #include <techview/eiklabel.h>
32 #include <techview/eikcmbut.h>
33 #include <techview/eikrted.h>
40 _LIT16(KHindi1,"\x0915\x094D\x0937\x0924\x094D\x0930\x093F\x092F\x0020\x0909\x0926\x094D\x0926\x0947\x0936\x094D\x0020\x0915\x094D\x0937\x093F\x092A\x094D\x0930");
41 _LIT16(KHindi2,"\x092d\x0942\x0930\x094d\x092d\x0941\x0935\x0903\x0020\x0938\x094d\x0935\x0903\x0020\x0924\x0924\x094d\x0938\x0935\x093f\x0924\x0941\x0930\x094d\x0935\x0930\x0947\x0923\x094d\x092f\x0902");
42 _LIT16(KHindi3,"\x092d\x0930\x094d\x0917\x094b\x0020\x0926\x0947\x0935\x0938\x094d\x092f\x0020\x0927\x0940\x092e\x0939\x093f\x0020\x0927\x093f\x092f\x094b\x0020\x092f\x094b\x0928\x0903\x0020\x092a\x094d\x0930\x091a\x094b\x0926\x092f\x093e\x0924\x094d\x0020");
45 _LIT16(KHindi4,"\x092f\x0924\x094d\x0930\x0020\x092f\x094b\x0917\x0947\x0936\x094d\x0935\x0930\x0020\x0915\x0943\x0937\x094d\x0923\x094b\x0020\x092f\x0924\x094d\x0930\x0020\x092a\x093e\x0930\x094d\x0925\x094b\x0020\x0927\x0930\x094d\x0928\x0941\x0927\x0930\x0903");
46 _LIT16(KHindi5,"\x0924\x0924\x094d\x0930\x0020\x0936\x094d\x0930\x0940\x0930\x094d\x0935\x093f\x091c\x092f\x094b\x0020\x092d\x0942\x0924\x093f\x0930\x094d\x0927\x0941\x0935\x093e\x0020\x0928\x0940\x0924\x093f\x0930\x094d\x092e\x0924\x093f\x0930\x094d\x092e\x092e");
47 _LIT16(KHindi6,"\x0915\x0941\x0924\x0938\x094d\x0924\x094d\x0935\x093e\x0020\x0915\x0936\x094d\x092e\x0932\x092e\x093f\x0926\x0902\x0020\x0935\x093f\x0936\x092e\x0947\x0020\x0938\x092e\x0941\x092a\x0938\x094d\x0925\x093f\x0924\x092e\x094d");
50 _LIT16(KHindi7,"\x0905\x0928\x093e\x0930\x094d\x092f\x091c\x0941\x0937\x094d\x091f\x092e\x0938\x094d\x0935\x0930\x094d\x0917\x094d\x092f\x092e\x0915\x0940\x0930\x094d\x0924\x093f\x0915\x0930\x092e\x0930\x094d\x091c\x0941\x0928");
51 _LIT16(KHindi8,"\x0915\x094d\x0932\x0948\x092c\x094d\x092f\x0902\x0020\x092e\x0020\x0938\x094d\x092e\x0020\x0917\x092e\x0903\x0020\x092a\x093e\x0930\x094d\x0925\x0928\x0948\x0924\x0924\x094d\x0924\x094d\x0935\x092f\x094d\x092f\x0941\x092a\x092a\x0926\x094d\x092f\x0924\x0947");
52 _LIT16(KHindi9,"\x0915\x094d\x0937\x0941\x0926\x094d\x0930\x0902\x0020\x0939\x0943\x0926\x092f\x0926\x094c\x0930\x094d\x092c\x0932\x094d\x092f\x0902\x0020\x0924\x094d\x092f\x0915\x094d\x0924\x094d\x0935\x094b\x0924\x094d\x0924\x093f\x0937\x094d\x091f\x0020\x092a\x0930\x0902\x0924\x092a");
54 // test 4 - two character test data
55 _LIT16(KTest1,"\x091c\x092e\x094d\x0918\x0940\x0902\x091a\x094d\x092f\x0940");
56 _LIT16(KTest2,"\x092e\x092e\x0020");
57 _LIT16(KTest3,"\x0915\x094D\x0937\x0924\x094D\x0930\x093F\x092F\x0020");
61 _LIT16(KKannada1,"\x0CA8\x0CAE\x0CCD\x0CAE\x0020\x0CB0\x0CBE\x0C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0\x0AA3\x0020\x0AA4\x0AA5\x0ABE\x0020\x0AB5\x0AC8\x0A9C\x0ACD\x0A9E\x0ABE\x0AA8\x0ABF\x0A95\x0020\x0A95\x0AC7\x0AB3\x0AB5\x0AA3\x0AC0\x0020\x0A9C\x0AC7\x0AB5\x0AC0\x0020\x0AAC\x0ABE\x0AAC\x0AA4\x0ACB\x0AA8\x0AC0\x0020\x0AB8\x0AAE\x0ABE\x0AB5\x0AC7\x0AB6\x0020\x0AA5\x0ABE\x0AAF\x0020\x0A9B\x0AC7\x002E\x0020\x0AB5\x0AB3\x0AC0");
95 _LIT16(KTestGujarati3,"\x0AAE\x0ABE\x0AA7\x0ACD\x0AAF\x0AAE\x0ABF\x0A95\x0020\x0A95\x0AC7\x0020\x0A89\x0AAF\x0ACD\x0AAF\x0AA4\x0AB0\x0020\x0AAE\x0ABE\x0AA7\x0ACD\x0AAF\x0AAE\x0ABF\x0A95\x0020\x0A95\x0A95\x0ACD\x0AB7\x0ABE\x0A8F\x0020\x0A86\x0020\x0AAC\x0AA7\x0AC0\x0020\x0A9C\x0020\x0AAC\x0ABE\x0AAC\x0AA4\x0ACB\x0AA8\x0AC1\x0A82\x0020\x0AB5\x0AA7\x0AC1\x0020\x0AB8\x0AA7\x0AA8\x0AB6\x0ABF\x0A95\x0ACD\x0AB7\x0AA3\x0020\x0A86\x0AAA\x0AB5\x0ABE\x0AA8\x0ACB\x0020\x0A89\x0AA6\x0ACD\x0AA6\x0AC7\x0AB6\x0020\x0AAA\x0AA3\x0020\x0AB8\x0ACD\x0AB5\x0AC0\x0A95\x0ABE\x0AB0\x0ABE\x0AAF\x0ACB\x0020\x0A9B\x0AC7");
100 _LIT16(KBengali1," \x098F\x0995\x0020\x09AC\x09CB\x0995\x09BE\x0020\x099C\x09CB\x09B2\x09BE\x0020\x099B\x09BF\x09B2\x0964\x0020\x09B8\x09C7\x0020\x0020\x098F\x0995\x09A6\x09BF\x09A8\x0020\x0995\x09BE\x09B8\x09CD\x09A4\x09C7\x0020\x09A8\x09BF\x09DF\x09C7\x0020\x09A7\x09BE\x09A8\x0020\x0995\x09BE\x099F\x09A4\x09C7\x0020\x0997");
101 _LIT16(KBengali2,"\x09BF\x09DF\x09C7\x0020\x0996\x09C7\x09A4\x09C7\x09B0\x0020\x09AE\x09BE\x099D\x0996\x09BE\x09A8\x09C7\x0987\x0020\x0998\x09C1\x09AE\x09BF\x09DF\x09C7\x0020\x09AA\x09DC\x09B2\x0964\x0020\x0998\x09C1\x09AE\x0020\x09A5\x09C7\x0995\x09C7\x0020\x0989\x09A0\x09C7\x0020\x0986\x09AC\x09BE\x09B0\x0020\x0995\x09BE\x09B8");
102 _LIT16(KBengali3,"\x09CD\x09A4\x09C7\x0020\x09B9\x09BE\x09A4\x09C7\x0020\x09A8\x09BF\x09DF\x09C7\x0020\x09A6\x09C7\x0996\x09B2\x002C\x0020\x09B8\x09C7\x099F\x09BE\x0020\x09AC\x09A1\x09CD\x09A1\x0020\x0997\x09B0\x09AE\x0020\x09B9\x09DF\x09C7\x099B\x09C7\x0964\x0020\x0995\x09BE\x09B8\x09CD\x09A4\x09C7\x0996\x09BE\x09A8");
104 _LIT16(KBengali4,"\x09BE\x0020\x09B0\x09CB\x09A6\x0020\x09B2\x09C7\x0997\x09C7\x0020\x0997\x09B0\x09AE\x0020\x09B9\x09DF\x09C7\x099B\x09BF\x09B2\x002C\x0020\x0995\x09BF\x09A8\x09CD\x09A4\x09C1\x0020\x099C\x09CB\x09B2\x09BE\x0020\x09AD\x09BE\x09AC\x09B2\x09C7\x0020\x09A4\x09BE\x09B0\x0020\x099C\x09CD\x09AC\x09B0\x0020\x09B9");
105 _LIT16(KBengali5,"\x09DF\x09C7\x099B\x09C7\x0964\x0020\x09A4\x0996\x09A8\x0020\x09B8\x09C7\x0020\x0060\x0986\x09AE\x09BE\x09B0\x0020\x0995\x09BE\x09B8\x09CD\x09A4\x09C7\x0020\x09A4\x09CB\x0020\x09AE\x09B0\x09C7\x0020\x09AF\x09BE\x09AC\x09C7\x0020\x09B0\x09C7\x0021\x0027\x0020\x09AC\x09B2\x09C7\x0020\x09B9\x09BE\x0989\x0020\x09B9");
106 _LIT16(KBengali6,"\x09BE\x0989\x0020\x0995\x09B0\x09C7\x0020\x0995\x09BE\x0981\x09A6\x09A4\x09C7\x0020\x09B2\x09BE\x0997\x09B2\x0964\x0020\x09AA\x09BE\x09B6\x09C7\x09B0\x0020\x0996\x09C7\x09A4\x09C7\x0020\x098F\x0995\x0020\x099A\x09BE\x09B7\x09BE\x0020\x0995\x09BE\x099C\x0020\x0995\x09B0\x099B\x09BF\x09B2\x0964\x0020");
108 _LIT16(KBengali7,"\x099C\x09CB\x09B2\x09BE\x09B0\x0020\x0995\x09BE\x09A8\x09CD\x09A8\x09BE\x0020\x09B6\x09C1\x09A8\x09C7\x0020\x09B8\x09C7\x0020\x09AC\x09B2\x09CD\x09B2\x002C\x0020\x0060\x0995\x09BF\x0020\x09B9\x09DF\x09C7\x099B\x09C7\x003F\x0027\x0020\x099C\x09CB\x09B2\x09BE\x0020\x09AC\x09B2\x09CD\x09B2\x09C7\x002C\x0020");
109 _LIT16(KBengali8,"\x0060\x0986\x09AE\x09BE\x09B0\x0020\x0995\x09BE\x09B8\x09CD\x09A4\x09C7\x09B0\x0020\x099C\x09CD\x09AC\x09B0\x0020\x09B9\x09DF\x09C7\x099B\x09C7\x0964\x0027\x0020\x09A4\x09BE\x0020\x09B6\x09C1\x09A8\x09C7\x0020\x099A\x09BE\x09B7\x09BE\x0020\x09B9\x09BE\x09B8\x09A4\x09C7\x0020\x09B9\x09BE\x09B8\x09A4\x09C7\x0020");
110 _LIT16(KBengali9,"\x09AC\x09B2\x09CD\x09B2\x09C7\x002C\x0020\x0060\x0993\x0995\x09C7\x0020\x099C\x09B2\x09C7\x0020\x09A1\x09C1\x09AC\x09BF\x09DF\x09C7\x0020\x09B0\x09BE\x0996\x002C\x0020\x099C\x09CD\x09AC\x09B0\x0020\x09B8\x09C7\x09B0\x09C7\x0020\x09AF\x09BE\x09AC\x09C7\x0964\x0027\x0020\x099C\x09B2\x09C7\x0020");
113 _LIT16(KTestBengali1,"\x09A1\x09C1\x09AC\x09BF\x09DF\x09C7\x0020\x0995\x09BE\x09B8\x09CD\x09A4\x09C7\x0020\x09A0\x09BE\x09A3\x09CD\x09A1\x09BE\x0020\x09B9\x09B2\x002C\x0020\x099C\x09CB\x09B2\x09BE\x0993\x0020\x0996\x09C1\x09AC\x0020\x09B8\x09C1\x0996\x09C0\x0020\x09B9\x09B2\x0964\x0020\x09A4\x09BE\x09B0\x09AA\x09B0\x0020");
114 _LIT16(KTestBengali2,"\x098F\x0995\x09A6\x09BF\x09A8\x0020\x099C\x09CB\x09B2\x09BE\x09B0\x0020\x09AE\x09BE\x09DF\x09C7\x09B0\x0020\x099C\x09CD\x09AC\x09B0\x0020\x09B9\x09DF\x09C7\x099B\x09C7\x0964\x0020\x09B8\x0995\x09B2\x09C7\x0020\x09AC\x09B2\x09CD\x09B2\x09C7\x002C\x0020\x0060\x09AC\x09A6\x09CD\x09A6\x09BF\x0020\x09A1\x09BE\x0995\x0964\x0027\x0020");
115 _LIT16(KTestBengali3,"\x099C\x09CB\x09B2\x09BE\x0020\x09AC\x09B2\x09CD\x09B2\x09C7\x002C\x0020\x0060\x0986\x09AE\x09BF\x0020\x0993\x09B7\x09C1\x09A7\x0020\x099C\x09BE\x09A8\x09BF\x0964\x0027\x0020\x09AC\x09B2\x09C7\x002C\x0020\x09B8\x09C7\x0020\x09A4\x09BE\x09B0\x0020\x09AE\x09BE\x0995\x09C7\x0020\x09AA\x09C1\x0995\x09C1\x09B0\x09C7\x0020\x09A8\x09BF\x09DF\x09C7\x0020\x0997\x09BF\x09DF\x09C7\x0020\x099C\x09B2\x09C7\x09B0\x0020\x09AD\x09BF\x09A4\x09B0\x09C7\x0020");
121 _LIT16(KTamil1,"\x0BAA\x0BBE\x0BAF\x0BBF\x0BB0\x0BAE\x0BCD");
122 _LIT16(KTamil2,"\x0B95\x0B9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x0C4D\x0C30\x0C17\x0C2E\x0C1A\x0C3F\x0C28\x0C4D\x0C24\x0C4D\x0C2F\x0C1E\x0C4D");
141 _LIT16(KTelugu2,"\x0C15\x0C42\x0C1F\x0C38\x0C4D\x0C25\x0C2E\x0C1A\x0C32\x0C28\x0C4D\x0C27\x0C4D\x0C30\x0C41\x0C35\x0C2E");
142 _LIT16(KTelugu3,"\x0C05\x0C25\x0C48\x0C24\x0C26\x0C2A\x0C4D\x0C2F\x0C36\x0C15\x0C4D\x0C24\x0C4B\x093D\x0C38");
144 _LIT16(KTelugu4,"\x0C2F\x0C4B\x0C28\x0C3F\x0C30\x0C4D\x0C2E\x0C39\x0C26\x0C4D\x0C2C\x0C4D\x0C30\x0C39\x0C4D\x0C2E");
145 _LIT16(KTelugu5,"\x0C26\x0C47\x0C39\x0C47\x093D\x0C38\x0C4D\x0C2E\x0C3F\x0C28\x0C4D\x0C2A\x0C4D\x0C30\x0C15\x0C3E\x0C36");
146 _LIT16(KTelugu6,"\x0C2A\x0C4D\x0C30\x0C35\x0C43\x0C24\x0C4D\x0C24\x0C3F\x0C30\x0C3E\x0C30\x0C2E\x0C4D\x0C2D\x0C03");
148 _LIT16(KTelugu7,"\x0C1C\x0C41\x0C39\x0C4D\x0C35\x0C26\x0C43\x0C37\x0C3F\x0C30\x0C4D\x0C39\x0C4B\x0C24\x0C3E");
149 _LIT16(KTelugu8,"\x0C2A\x0C24\x0C24\x0C4D\x0C30\x0C48\x0C30\x0C4D\x0C26\x0C4D\x0C2F\x0C3E\x0C35\x0C3E\x0C2D\x0C42\x0C2E");
150 _LIT16(KTelugu9,"\x0C26\x0C4D\x0C2F\x0C3E\x0C14\x0C30\x0C4D\x0C23\x0C4B\x0C28\x0C4D\x0C2E\x0C39\x0C3F\x0C28\x0C3E");
152 _LIT16(KTestTelugu1,"\x0C09\x0C26\x0C4D\x0C35\x0C43\x0C24\x0C4D\x0C30\x0C39\x0C28\x0C4D\x0C35\x0C3E\x0C1C\x0C3F\x0C28\x0C3E\x0C02");
153 _LIT16(KTestTelugu2,"\x0C05\x0C30\x0C4D\x0C37\x0C28\x0C4D\x0C24\x0C4D\x0C2F\x0C42\x0C30\x0C4D\x0C2E\x0C2F\x0C4B \x0C18\x0C43\x0C24\x0C38\x0C4D");
154 _LIT16(KTestTelugu3,"\x0C07\x0C24\x0C4D\x0C2A\x0C41\x0C30\x0C4D\x0C35\x0C28\x0C41\x0C24\x0C4D\x0C24\x0C36\x0C4D\x0C1A\x0C30\x0C4D\x0C37\x0C23\x0C40\x0C27\x0C43\x0C24\x0C3F\x0C03");
156 void Panic(TInt aPanic)
158 _LIT(KPanic, "hindiDemo Application");
159 User::Panic(KPanic,aPanic);
162 // Class CHindiContainer
164 void CHindiContainer::ConstructL(const TRect& aRect)
170 _LIT(KMyFontName,"Series 60 Hindi TitleSmB");
171 TFontSpec hindiFontSpec(KMyFontName,200);
172 iFontSpec = hindiFontSpec;
176 _LIT(KSomeHindi," " );
177 iTest = new(ELeave) CEikLabel;
178 iTest->SetContainerWindowL(*this);
179 iTest->SetBufferReserveLengthL(64);
180 iTest->SetTextL(KSomeHindi);
182 // add a CEikRichTextEditor
183 /* TResourceReader reader;
185 iCoeEnv->CreateResourceReaderLC(reader, R_OUTPUT_WINDOW_RTEXTED);
186 iOutputWindow = new (ELeave) CEikRichTextEditor();
187 iOutputWindow->SetContainerWindowL(*this);
188 iOutputWindow->ConstructFromResourceL(reader);
189 CleanupStack::PopAndDestroy(); // Resource reader
190 iOutputWindow->SetFocus(ETrue);
192 const TPoint KOutputPosition = TPoint(10, 35);
193 const TSize KOutputSize = TSize(150, 100);
194 iOutputWindow->SetExtent(KOutputPosition, KOutputSize);
196 buf.Append(_L("abc"));
198 buf.Append(_L(" xyz"));
199 iOutputWindow->SetTextL(&buf); */
206 CHindiContainer::~CHindiContainer()
209 delete iOutputWindow;
212 void CHindiContainer::SizeChanged()
214 TPoint pos = Position();
215 iTest->SetExtent(pos + TPoint(10,10), TSize(500, 40));
218 TInt CHindiContainer::CountComponentControls() const
223 CCoeControl* CHindiContainer::ComponentControl(TInt aIndex) const
225 CCoeControl* controls[] = { iTest/*, iOutputWindow */ };
226 return controls[aIndex];
229 void CHindiContainer::HandleControlEventL(CCoeControl* /* aControl */,
230 TCoeEvent aEventType)
232 if (aEventType == EEventStateChanged)
238 void CHindiContainer::Draw(const TRect& aRect) const
241 rect.Intersection(aRect);
243 // draw the text directly on the display
244 CWindowGc& gc = SystemGc();
248 void CHindiContainer::ChangeSample( TInt aSample)
251 if (iSample > 24 ) iSample = 1;
252 if (iSample < 1 ) iSample = 24;
255 TInt CHindiContainer::GetSample()
260 void CHindiContainer::SetHindiFont( TFontSpec& aFontSpec )
262 iFontSpec = aFontSpec;
265 void CHindiContainer::SetFontSize( TInt aFontSize )
267 iFontSize = aFontSize;
268 iFontSpec.iHeight = iFontSize;
271 TInt CHindiContainer::GetFontSize()
277 const TInt UnicodeZeroWidthNonJoiner = 0x200C;
279 /* Display Hindi without shaping by inserting a Unicode Zero Width Non Joiner
280 character bewteen each character
281 aInput the Hindi text to be displayed
282 aOutput the same text with the ZWNJ characters added, This buffer must be big enough
284 void CHindiContainer::DisableShaping(const TDesC* aInput, TDes& aOutput ) const
287 for (TInt i = 0; i < aInput->Length(); i++ )
289 aOutput.Append( aInput->Mid(i,1) );
290 aOutput.Append( UnicodeZeroWidthNonJoiner );
294 /* create a text file which contains the sample hindi data
295 this can be used for testing
297 void CHindiContainer::CreateHindiTxtFile() const
300 TInt error = KErrNone;
303 // Open or create hindi.txt
304 error = fs.Connect();
305 error = file.Open(fs, _L("c:\\hindi.txt"), EFileWrite);
306 if ( error == KErrNotFound)
308 error = file.Create(fs, _L("c:\\hindi.txt"), EFileWrite);
311 // load buffer with data to write
313 buffer.Create(10000);
314 TPtrC16 pHindi(KHindi1);
315 buffer.Append( _L("\xff\xfe") );
316 buffer.Append((const unsigned char *)pHindi.Ptr(), pHindi.Size() );
318 TPtrC16 pHindi2(KHindi2);
319 buffer.Append((const unsigned char *)pHindi2.Ptr(), pHindi2.Size() );
321 TPtrC16 pHindi3(KHindi3);
322 buffer.Append((const unsigned char *)pHindi3.Ptr(), pHindi3.Size() );
324 TPtrC16 pHindi4(KHindi4);
325 buffer.Append((const unsigned char *)pHindi4.Ptr(), pHindi4.Size() );
327 TPtrC16 pHindi5(KHindi5);
328 buffer.Append((const unsigned char *)pHindi5.Ptr(), pHindi5.Size() );
330 TPtrC16 pHindi6(KHindi6);
331 buffer.Append((const unsigned char *)pHindi6.Ptr(), pHindi6.Size() );
333 TPtrC16 pHindi7(KHindi7);
334 buffer.Append((const unsigned char *)pHindi7.Ptr(), pHindi7.Size() );
336 TPtrC16 pHindi8(KHindi8);
337 buffer.Append((const unsigned char *)pHindi8.Ptr(), pHindi8.Size() );
339 TPtrC16 pHindi9(KHindi9);
340 buffer.Append((const unsigned char *)pHindi9.Ptr(), pHindi9.Size() );
343 error = file.Write(buffer);
353 /* create a text file which contains the sample Kannada data
354 this can be used for testing
356 void CHindiContainer::CreateKannadaTxtFile() const
359 TInt error = KErrNone;
362 // Open or create Kannada.txt
363 error = fs.Connect();
364 error = file.Open(fs, _L("c:\\Kannada.txt"), EFileWrite);
365 if ( error == KErrNotFound)
367 error = file.Create(fs, _L("c:\\Kannada.txt"), EFileWrite);
370 // load buffer with data to write
371 // TBuf8<10000> buffer;
373 buffer.Create(10000);
374 TPtrC16 pKannada(KKannada1);
375 buffer.Append( _L("\xff\xfe") );
376 buffer.Append((const unsigned char *)pKannada.Ptr(), pKannada.Size() );
378 TPtrC16 pKannada2(KKannada2);
379 buffer.Append((const unsigned char *)pKannada2.Ptr(), pKannada2.Size() );
381 TPtrC16 pKannada3(KKannada3);
382 buffer.Append((const unsigned char *)pKannada3.Ptr(), pKannada3.Size() );
384 TPtrC16 pKannada4(KKannada4);
385 buffer.Append((const unsigned char *)pKannada4.Ptr(), pKannada4.Size() );
387 TPtrC16 pKannada5(KKannada5);
388 buffer.Append((const unsigned char *)pKannada5.Ptr(), pKannada5.Size() );
390 TPtrC16 pKannada6(KKannada6);
391 buffer.Append((const unsigned char *)pKannada6.Ptr(), pKannada6.Size() );
393 TPtrC16 pKannada7(KKannada7);
394 buffer.Append((const unsigned char *)pKannada7.Ptr(), pKannada7.Size() );
396 TPtrC16 pKannada8(KKannada8);
397 buffer.Append((const unsigned char *)pKannada8.Ptr(), pKannada8.Size() );
399 TPtrC16 pKannada9(KKannada9);
400 buffer.Append((const unsigned char *)pKannada9.Ptr(), pKannada9.Size() );
403 error = file.Write(buffer);
412 /* create a text file which contains the sample Gujarati data
413 this can be used for testing
415 void CHindiContainer::CreateGujaratiTxtFile() const
418 TInt error = KErrNone;
421 // Open or create Gujarati.txt
422 error = fs.Connect();
423 error = file.Open(fs, _L("c:\\Gujarati.txt"), EFileWrite);
424 if ( error == KErrNotFound)
426 error = file.Create(fs, _L("c:\\Gujarati.txt"), EFileWrite);
429 // load buffer with data to write
430 // TBuf8<10000> buffer;
432 buffer.Create(10000);
433 TPtrC16 pGujarati(KGujarati1);
434 buffer.Append( _L("\xff\xfe") );
435 buffer.Append((const unsigned char *)pGujarati.Ptr(), pGujarati.Size() );
437 TPtrC16 pGujarati2(KGujarati2);
438 buffer.Append((const unsigned char *)pGujarati2.Ptr(), pGujarati2.Size() );
440 TPtrC16 pGujarati3(KGujarati3);
441 buffer.Append((const unsigned char *)pGujarati3.Ptr(), pGujarati3.Size() );
443 TPtrC16 pGujarati4(KGujarati4);
444 buffer.Append((const unsigned char *)pGujarati4.Ptr(), pGujarati4.Size() );
446 TPtrC16 pGujarati5(KGujarati5);
447 buffer.Append((const unsigned char *)pGujarati5.Ptr(), pGujarati5.Size() );
449 TPtrC16 pGujarati6(KGujarati6);
450 buffer.Append((const unsigned char *)pGujarati6.Ptr(), pGujarati6.Size() );
452 TPtrC16 pGujarati7(KGujarati7);
453 buffer.Append((const unsigned char *)pGujarati7.Ptr(), pGujarati7.Size() );
455 TPtrC16 pGujarati8(KGujarati8);
456 buffer.Append((const unsigned char *)pGujarati8.Ptr(), pGujarati8.Size() );
458 TPtrC16 pGujarati9(KGujarati9);
459 buffer.Append((const unsigned char *)pGujarati9.Ptr(), pGujarati9.Size() );
462 error = file.Write(buffer);
469 /* create a text file which contains the sample Bengali data
470 this can be used for testing
473 void CHindiContainer::CreateBengaliTxtFile() const
476 TInt error = KErrNone;
478 // Open or create Bengali.txt
479 error = fs1.Connect();
480 error = file1.Open(fs1, _L("c:\\Bengali.txt"), EFileWrite);
481 if ( error == KErrNotFound)
483 error = file1.Create(fs1, _L("c:\\Bengali.txt"), EFileWrite);
485 // load buffer with data to write
487 buffer.Create(10000);
488 TPtrC16 pBengali(KBengali1);
489 buffer.Append( _L("\xff\xfe"));
490 buffer.Append((const unsigned char *)pBengali.Ptr(), pBengali.Size());
492 TPtrC16 pBengali2(KBengali2);
493 buffer.Append((const unsigned char *)pBengali2.Ptr(), pBengali2.Size());
495 TPtrC16 pBengali3(KBengali3);
496 buffer.Append((const unsigned char *)pBengali3.Ptr(), pBengali3.Size());
498 TPtrC16 pBengali4(KBengali4);
499 buffer.Append((const unsigned char *)pBengali4.Ptr(), pBengali4.Size());
501 TPtrC16 pBengali5(KBengali5);
502 buffer.Append((const unsigned char *)pBengali5.Ptr(), pBengali5.Size());
504 TPtrC16 pBengali6(KBengali6);
505 buffer.Append((const unsigned char *)pBengali6.Ptr(), pBengali6.Size());
507 TPtrC16 pBengali7(KBengali7);
508 buffer.Append((const unsigned char *)pBengali7.Ptr(), pBengali7.Size());
510 TPtrC16 pBengali8(KBengali8);
511 buffer.Append((const unsigned char *)pBengali8.Ptr(), pBengali8.Size());
513 TPtrC16 pBengali9(KBengali9);
514 buffer.Append((const unsigned char *)pBengali9.Ptr(), pBengali9.Size());
517 error = file1.Write(buffer);
523 void CHindiContainer::CreateTamilTxtFile() const
526 TInt error = KErrNone;
529 // Open or create Tamil.txt
530 error = fs.Connect();
531 error = file.Open(fs, _L("c:\\Tamil.txt"), EFileWrite);
532 if ( error == KErrNotFound)
534 error = file.Create(fs, _L("c:\\Tamil.txt"), EFileWrite);
537 // load buffer with data to write
538 // TBuf8<10000> buffer;
540 buffer.Create(10000);
541 TPtrC16 pTamil(KTamil1);
542 buffer.Append( _L("\xff\xfe") );
543 buffer.Append((const unsigned char *)pTamil.Ptr(), pTamil.Size() );
545 TPtrC16 pTamil2(KTamil2);
546 buffer.Append((const unsigned char *)pTamil2.Ptr(), pTamil2.Size() );
548 TPtrC16 pTamil3(KTamil3);
549 buffer.Append((const unsigned char *)pTamil3.Ptr(), pTamil3.Size() );
551 TPtrC16 pTamil4(KTamil4);
552 buffer.Append((const unsigned char *)pTamil4.Ptr(), pTamil4.Size() );
554 TPtrC16 pTamil5(KTamil5);
555 buffer.Append((const unsigned char *)pTamil5.Ptr(), pTamil5.Size() );
557 TPtrC16 pTamil6(KTamil6);
558 buffer.Append((const unsigned char *)pTamil6.Ptr(), pTamil6.Size() );
560 TPtrC16 pTamil7(KTamil7);
561 buffer.Append((const unsigned char *)pTamil7.Ptr(), pTamil7.Size() );
563 TPtrC16 pTamil8(KTamil8);
564 buffer.Append((const unsigned char *)pTamil8.Ptr(), pTamil8.Size() );
566 TPtrC16 pTamil9(KTamil9);
567 buffer.Append((const unsigned char *)pTamil9.Ptr(), pTamil9.Size() );
570 error = file.Write(buffer);
578 void CHindiContainer::CreateTeluguTxtFile() const
581 TInt error = KErrNone;
584 // Open or create Telugu.txt
585 error = fs.Connect();
586 error = file.Open(fs, _L("c:\\Telugu.txt"), EFileWrite);
587 if ( error == KErrNotFound)
589 error = file.Create(fs, _L("c:\\Telugu.txt"), EFileWrite);
592 // load buffer with data to write
593 // TBuf8<10000> buffer;
595 buffer.Create(10000);
596 TPtrC16 pTelugu(KTelugu1);
597 buffer.Append( _L("\xff\xfe") );
598 buffer.Append((const unsigned char *)pTelugu.Ptr(), pTelugu.Size() );
600 TPtrC16 pTelugu2(KTelugu2);
601 buffer.Append((const unsigned char *)pTelugu2.Ptr(), pTelugu2.Size() );
603 TPtrC16 pTelugu3(KTelugu3);
604 buffer.Append((const unsigned char *)pTelugu3.Ptr(), pTelugu3.Size() );
606 TPtrC16 pTelugu4(KTelugu4);
607 buffer.Append((const unsigned char *)pTelugu4.Ptr(), pTelugu4.Size() );
609 TPtrC16 pTelugu5(KTelugu5);
610 buffer.Append((const unsigned char *)pTelugu5.Ptr(), pTelugu5.Size() );
612 TPtrC16 pTelugu6(KTelugu6);
613 buffer.Append((const unsigned char *)pTelugu6.Ptr(), pTelugu6.Size() );
615 TPtrC16 pTelugu7(KTelugu7);
616 buffer.Append((const unsigned char *)pTelugu7.Ptr(), pTelugu7.Size() );
618 TPtrC16 pTelugu8(KTelugu8);
619 buffer.Append((const unsigned char *)pTelugu8.Ptr(), pTelugu8.Size() );
621 TPtrC16 pTelugu9(KTelugu9);
622 buffer.Append((const unsigned char *)pTelugu9.Ptr(), pTelugu9.Size() );
625 error = file.Write(buffer);
635 @SYMTestCaseID GRAPHICS-SYSLIB-ICULAYOUTENGINE-CIT-1499
636 @SYMTestCaseDesc Test the IcuLayout Engine .
637 @SYMTestPriority High
638 @SYMTestActions Test Check that Hindi text is shaped:
639 @SYMTestExpectedResults The test must not fail.
645 @SYMTestCaseID GRAPHICS-SYSLIB-ICULAYOUTENGINE-CIT-3382
646 @SYMTestCaseDesc Test the IcuLayout Engine for Kannada support by extending functionalities of DrawHindiText(CWindowGc& aGc) function.
647 @SYMTestPriority High
648 @SYMTestActions Test Check that Kannada text is shaped:
649 @SYMTestExpectedResults The test must not fail.
654 @SYMTestCaseID GRAPHICS-SYSLIB-ICULAYOUTENGINE-CIT-3418
655 @SYMTestCaseDesc Test the IcuLayout Engine for Gujarati support by extending functionalities of DrawHindiText(CWindowGc& aGc) function.
656 @SYMTestPriority High
657 @SYMTestActions Test Check that gujarati text is shaped:
658 @SYMTestExpectedResults The test must not fail.
664 @SYMTestCaseID GRAPHICS-SYSLIB-ICULAYOUTENGINE-CIT-4004
665 @SYMTestCaseDesc Test the IcuLayout Engine for Bengali support by extending functionalities of DrawHindiText(CWindowGc& aGc) function.
666 @SYMTestPriority High
667 @SYMTestActions Test Check that Bengali text is shaped:
668 @SYMTestExpectedResults The test must not fail.
674 @SYMTestCaseID GRAPHICS-SYSLIB-ICULAYOUTENGINE-CIT-4005
675 @SYMTestCaseDesc Test the IcuLayout Engine for Tamil support by extending functionalities of DrawHindiText(CWindowGc& aGc) function.
676 @SYMTestPriority High
677 @SYMTestActions Test Check that Tamil text is shaped:
678 @SYMTestExpectedResults The test must not fail.
685 @SYMTestCaseID GRAPHICS-SYSLIB-ICULAYOUTENGINE-CIT-4006
686 @SYMTestCaseDesc Test the IcuLayout Engine for Telugu support by extending functionalities of DrawHindiText(CWindowGc& aGc) function.
687 @SYMTestPriority High
688 @SYMTestActions Test Check that Telugu text is shaped:
689 @SYMTestExpectedResults The test must not fail.
693 void CHindiContainer::DrawHindiText(CWindowGc& aGc) const
696 // start with test font
698 _LIT(KTestFontName,"DejaVu Sans Condensed");
699 TFontSpec testFontSpec(KTestFontName,200);
700 CGraphicsDevice* screenDevice=iCoeEnv->ScreenDevice();
701 screenDevice->GetNearestFontInTwips(myFont,testFontSpec);
703 // set the required attributes
705 aGc.SetPenColor(KRgbBlack);
706 aGc.SetBrushColor(KRgbBlue);
707 aGc.CancelClippingRect();
709 // Set the text drawing position & draw
712 textLine.Append(_L("The following is "));
717 textLine.Append(_L("Hindi sample 1 "));
720 textLine.Append(_L("Hindi sample 2 "));
723 textLine.Append(_L("Hindi sample 3 "));
726 textLine.Append(_L(" Hindi Sample 4 "));
729 textLine.Append(_L("Kannada sample 1 "));
732 textLine.Append(_L("Kannada sample 2 "));
735 textLine.Append(_L("Kannada sample 3 "));
738 textLine.Append(_L("Kannada Sample 4 "));
741 textLine.Append(_L("Gujarati sample 1 "));
744 textLine.Append(_L("Gujarati sample 2 "));
747 textLine.Append(_L("Gujarati sample 3 "));
750 textLine.Append(_L("Gujarati Sample 4 "));
753 textLine.Append(_L("Bengali sample 1 "));
756 textLine.Append(_L("Bengali sample 2 "));
759 textLine.Append(_L("Bengali sample 3 "));
762 textLine.Append(_L("Bengali Sample 4 "));
765 textLine.Append(_L("Tamil sample 1 "));
768 textLine.Append(_L("Tamil sample 2 "));
771 textLine.Append(_L("Tamil sample 3 "));
774 textLine.Append(_L("Tamil Sample 4 "));
777 textLine.Append(_L("Telugu sample 1 "));
780 textLine.Append(_L("Telugu sample 2 "));
783 textLine.Append(_L("Telugu sample 3 "));
786 textLine.Append(_L("Telugu Sample 4 "));
789 textLine.Append(_L("what? "));
793 textLine.Append(_L("using font "));
794 textLine.Append(iFontSpec.iTypeface.iName);
795 aGc.DrawText(textLine,pos);
799 textLine2.Format(_L("Size:%dpt Blue is shaped, Black is not"),iFontSize/20);
800 aGc.DrawText(textLine2, pos2);
802 // Discard and destroy the test font
804 screenDevice->ReleaseFont(myFont);
806 // set the selected font
807 screenDevice->GetNearestFontInTwips(myFont,iFontSpec);
809 // set the required attributes
811 aGc.SetPenColor(KRgbBlack);
812 aGc.SetBrushColor(KRgbBlue);
813 aGc.CancelClippingRect();
815 // some rectangles to fit the text in
816 TRect textRect(10,-30,600, 600);
817 TRect textRect2(10,-5,600, 600);
818 TRect textRect3(10, 25, 600, 600);
819 TRect textRect4(10, 50, 600, 600);
820 TRect textRect5(10, 80, 600, 600);
821 TRect textRect6(10, 105, 600, 600);
823 TBuf<200> textWithoutShaping;
825 // Draw some Hindi in a rectangle
832 // First draw in Black with shaping disabled
833 DisableShaping(&KHindi1, textWithoutShaping );
834 aGc.SetPenColor(KRgbBlack);
835 aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
837 // Now in Blue with shaping
838 aGc.SetPenColor(KRgbBlue);
839 aGc.DrawText(KHindi1, textRect2, 100, CGraphicsContext::ELeft);
841 //--------------------------------------------------------------------------
842 // Without the Layout Engine
843 aGc.SetPenColor(KRgbBlack);
844 DisableShaping(&KHindi2, textWithoutShaping );
845 aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
847 aGc.SetPenColor(KRgbBlue);
848 aGc.DrawText(KHindi2, textRect4, 100, CGraphicsContext::ELeft);
849 //--------------------------------------------------------------------------
850 // Without the Layout Engine
851 DisableShaping(&KHindi3, textWithoutShaping );
852 aGc.SetPenColor(KRgbBlack);
853 aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
855 aGc.SetPenColor(KRgbBlue);
856 aGc.DrawText(KHindi3, textRect6, 100, CGraphicsContext::ELeft);
857 //--------------------------------------------------------------------------
861 DisableShaping(&KHindi4, textWithoutShaping );
862 aGc.SetPenColor(KRgbBlack);
863 aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
865 aGc.SetPenColor(KRgbBlue);
866 aGc.DrawText(KHindi4, textRect2, 100, CGraphicsContext::ELeft);
868 //--------------------------------------------------------------------------
869 // Without the Layout Engine
870 DisableShaping(&KHindi5, textWithoutShaping );
871 aGc.SetPenColor(KRgbBlack);
872 aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
874 aGc.SetPenColor(KRgbBlue);
875 aGc.DrawText(KHindi5, textRect4, 100, CGraphicsContext::ELeft);
876 //--------------------------------------------------------------------------
877 // Without the Layout Engine
878 DisableShaping(&KHindi6, textWithoutShaping );
879 aGc.SetPenColor(KRgbBlack);
880 aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
882 aGc.SetPenColor(KRgbBlue);
883 aGc.DrawText(KHindi6, textRect6, 100, CGraphicsContext::ELeft);
884 //--------------------------------------------------------------------------
888 DisableShaping(&KHindi7, textWithoutShaping );
889 aGc.SetPenColor(KRgbBlack);
890 aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
892 aGc.SetPenColor(KRgbBlue);
893 aGc.DrawText(KHindi7, textRect2, 100, CGraphicsContext::ELeft);
895 //--------------------------------------------------------------------------
896 // Without the Layout Engine
897 DisableShaping(&KHindi8, textWithoutShaping );
898 aGc.SetPenColor(KRgbBlack);
899 aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
901 aGc.SetPenColor(KRgbBlue);
902 aGc.DrawText(KHindi8, textRect4, 100, CGraphicsContext::ELeft);
903 //--------------------------------------------------------------------------
904 // Without the Layout Engine
905 DisableShaping(&KHindi9, textWithoutShaping );
906 aGc.SetPenColor(KRgbBlack);
907 aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
909 aGc.SetPenColor(KRgbBlue);
910 aGc.DrawText(KHindi9, textRect6, 100, CGraphicsContext::ELeft);
911 //--------------------------------------------------------------------------
916 DisableShaping(&KTest1, textWithoutShaping );
917 aGc.DrawText(KTest1, textRect, 100, CGraphicsContext::ELeft);
919 aGc.SetPenColor(KRgbBlue);
920 aGc.DrawText(KTest1, textRect2, 100, CGraphicsContext::ELeft);
922 //--------------------------------------------------------------------------
923 // Without the Layout Engine
925 aGc.SetPenColor(KRgbBlack);
926 aGc.DrawText(KTest2, textRect3, 100, CGraphicsContext::ELeft);
927 // With the Layout Engine
929 aGc.SetPenColor(KRgbBlue);
930 aGc.DrawText(KTest2, textRect4, 100, CGraphicsContext::ELeft);
931 //--------------------------------------------------------------------------
932 // Without the Layout Engine
934 aGc.SetPenColor(KRgbBlack);
935 aGc.DrawText(KTest3, textRect5, 100, CGraphicsContext::ELeft);
936 // With the Layout Engine
938 aGc.SetPenColor(KRgbBlue);
939 aGc.DrawText(KTest3, textRect6, 100, CGraphicsContext::ELeft);
940 //--------------------------------------------------------------------------
945 // First draw in Black with shaping disabled
946 DisableShaping(&KKannada1, textWithoutShaping );
947 aGc.SetPenColor(KRgbBlack);
948 aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
950 // Now in Blue with shaping
951 aGc.SetPenColor(KRgbBlue);
952 aGc.DrawText(KKannada1, textRect2, 100, CGraphicsContext::ELeft);
954 //--------------------------------------------------------------------------
955 // Without the Layout Engine
956 aGc.SetPenColor(KRgbBlack);
957 DisableShaping(&KKannada2, textWithoutShaping );
958 aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
960 aGc.SetPenColor(KRgbBlue);
961 aGc.DrawText(KKannada2, textRect4, 100, CGraphicsContext::ELeft);
962 //--------------------------------------------------------------------------
963 // Without the Layout Engine
964 DisableShaping(&KKannada3, textWithoutShaping );
965 aGc.SetPenColor(KRgbBlack);
966 aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
968 aGc.SetPenColor(KRgbBlue);
969 aGc.DrawText(KKannada3, textRect6, 100, CGraphicsContext::ELeft);
970 //--------------------------------------------------------------------------
975 DisableShaping(&KKannada4, textWithoutShaping );
976 aGc.SetPenColor(KRgbBlack);
977 aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
979 aGc.SetPenColor(KRgbBlue);
980 aGc.DrawText(KKannada4, textRect2, 100, CGraphicsContext::ELeft);
982 //--------------------------------------------------------------------------
983 // Without the Layout Engine
984 DisableShaping(&KKannada5, textWithoutShaping );
985 aGc.SetPenColor(KRgbBlack);
986 aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
988 aGc.SetPenColor(KRgbBlue);
989 aGc.DrawText(KKannada5, textRect4, 100, CGraphicsContext::ELeft);
990 //--------------------------------------------------------------------------
991 // Without the Layout Engine
992 DisableShaping(&KKannada6, textWithoutShaping );
993 aGc.SetPenColor(KRgbBlack);
994 aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
996 aGc.SetPenColor(KRgbBlue);
997 aGc.DrawText(KKannada6, textRect6, 100, CGraphicsContext::ELeft);
998 //--------------------------------------------------------------------------
1004 DisableShaping(&KKannada7, textWithoutShaping );
1005 aGc.SetPenColor(KRgbBlack);
1006 aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
1008 aGc.SetPenColor(KRgbBlue);
1009 aGc.DrawText(KKannada7, textRect2, 100, CGraphicsContext::ELeft);
1011 //--------------------------------------------------------------------------
1012 // Without the Layout Engine
1013 DisableShaping(&KKannada8, textWithoutShaping );
1014 aGc.SetPenColor(KRgbBlack);
1015 aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
1017 aGc.SetPenColor(KRgbBlue);
1018 aGc.DrawText(KKannada8, textRect4, 100, CGraphicsContext::ELeft);
1019 //--------------------------------------------------------------------------
1020 // Without the Layout Engine
1021 DisableShaping(&KKannada9, textWithoutShaping );
1022 aGc.SetPenColor(KRgbBlack);
1023 aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
1025 aGc.SetPenColor(KRgbBlue);
1026 aGc.DrawText(KKannada9, textRect6, 100, CGraphicsContext::ELeft);
1027 //--------------------------------------------------------------------------
1032 DisableShaping(&KTestKannada1, textWithoutShaping );
1033 aGc.DrawText(KTestKannada1, textRect, 100, CGraphicsContext::ELeft);
1035 aGc.SetPenColor(KRgbBlue);
1036 aGc.DrawText(KTestKannada1, textRect2, 100, CGraphicsContext::ELeft);
1038 //--------------------------------------------------------------------------
1039 // Without the Layout Engine
1041 aGc.SetPenColor(KRgbBlack);
1042 aGc.DrawText(KTestKannada2, textRect3, 100, CGraphicsContext::ELeft);
1043 // With the Layout Engine
1045 aGc.SetPenColor(KRgbBlue);
1046 aGc.DrawText(KTestKannada2, textRect4, 100, CGraphicsContext::ELeft);
1047 //--------------------------------------------------------------------------
1048 // Without the Layout Engine
1050 aGc.SetPenColor(KRgbBlack);
1051 aGc.DrawText(KTestKannada3, textRect5, 100, CGraphicsContext::ELeft);
1052 // With the Layout Engine
1054 aGc.SetPenColor(KRgbBlue);
1055 aGc.DrawText(KTestKannada3, textRect6, 100, CGraphicsContext::ELeft);
1056 //--------------------------------------------------------------------------
1063 // First draw in Black with shaping disabled
1064 DisableShaping(&KGujarati1, textWithoutShaping );
1065 aGc.SetPenColor(KRgbBlack);
1066 aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
1068 // Now in Blue with shaping
1069 aGc.SetPenColor(KRgbBlue);
1070 aGc.DrawText(KGujarati1, textRect2, 100, CGraphicsContext::ELeft);
1072 //--------------------------------------------------------------------------
1073 // Without the Layout Engine
1074 aGc.SetPenColor(KRgbBlack);
1075 DisableShaping(&KGujarati2, textWithoutShaping );
1076 aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
1078 aGc.SetPenColor(KRgbBlue);
1079 aGc.DrawText(KGujarati2, textRect4, 100, CGraphicsContext::ELeft);
1080 //--------------------------------------------------------------------------
1081 // Without the Layout Engine
1082 DisableShaping(&KGujarati3, textWithoutShaping );
1083 aGc.SetPenColor(KRgbBlack);
1084 aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
1086 aGc.SetPenColor(KRgbBlue);
1087 aGc.DrawText(KGujarati3, textRect6, 100, CGraphicsContext::ELeft);
1088 //--------------------------------------------------------------------------
1093 DisableShaping(&KGujarati4, textWithoutShaping );
1094 aGc.SetPenColor(KRgbBlack);
1095 aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
1097 aGc.SetPenColor(KRgbBlue);
1098 aGc.DrawText(KGujarati4, textRect2, 100, CGraphicsContext::ELeft);
1100 //--------------------------------------------------------------------------
1101 // Without the Layout Engine
1102 DisableShaping(&KGujarati5, textWithoutShaping );
1103 aGc.SetPenColor(KRgbBlack);
1104 aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
1106 aGc.SetPenColor(KRgbBlue);
1107 aGc.DrawText(KGujarati5, textRect4, 100, CGraphicsContext::ELeft);
1108 //--------------------------------------------------------------------------
1109 // Without the Layout Engine
1110 DisableShaping(&KGujarati6, textWithoutShaping );
1111 aGc.SetPenColor(KRgbBlack);
1112 aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
1114 aGc.SetPenColor(KRgbBlue);
1115 aGc.DrawText(KGujarati6, textRect6, 100, CGraphicsContext::ELeft);
1116 //--------------------------------------------------------------------------
1122 DisableShaping(&KGujarati7, textWithoutShaping );
1123 aGc.SetPenColor(KRgbBlack);
1124 aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
1126 aGc.SetPenColor(KRgbBlue);
1127 aGc.DrawText(KGujarati7, textRect2, 100, CGraphicsContext::ELeft);
1129 //--------------------------------------------------------------------------
1130 // Without the Layout Engine
1131 DisableShaping(&KGujarati8, textWithoutShaping );
1132 aGc.SetPenColor(KRgbBlack);
1133 aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
1135 aGc.SetPenColor(KRgbBlue);
1136 aGc.DrawText(KGujarati8, textRect4, 100, CGraphicsContext::ELeft);
1137 //--------------------------------------------------------------------------
1138 // Without the Layout Engine
1139 DisableShaping(&KGujarati9, textWithoutShaping );
1140 aGc.SetPenColor(KRgbBlack);
1141 aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
1143 aGc.SetPenColor(KRgbBlue);
1144 aGc.DrawText(KGujarati9, textRect6, 100, CGraphicsContext::ELeft);
1145 //--------------------------------------------------------------------------
1150 DisableShaping(&KTestGujarati1, textWithoutShaping );
1151 aGc.DrawText(KTestGujarati1, textRect, 100, CGraphicsContext::ELeft);
1153 aGc.SetPenColor(KRgbBlue);
1154 aGc.DrawText(KTestGujarati1, textRect2, 100, CGraphicsContext::ELeft);
1156 //--------------------------------------------------------------------------
1157 // Without the Layout Engine
1159 aGc.SetPenColor(KRgbBlack);
1160 aGc.DrawText(KTestGujarati2, textRect3, 100, CGraphicsContext::ELeft);
1161 // With the Layout Engine
1163 aGc.SetPenColor(KRgbBlue);
1164 aGc.DrawText(KTestGujarati2, textRect4, 100, CGraphicsContext::ELeft);
1165 //--------------------------------------------------------------------------
1166 // Without the Layout Engine
1168 aGc.SetPenColor(KRgbBlack);
1169 aGc.DrawText(KTestGujarati3, textRect5, 100, CGraphicsContext::ELeft);
1170 // With the Layout Engine
1172 aGc.SetPenColor(KRgbBlue);
1173 aGc.DrawText(KTestGujarati3, textRect6, 100, CGraphicsContext::ELeft);
1174 //--------------------------------------------------------------------------
1179 // First draw in Black with shaping disabled
1180 DisableShaping(&KBengali1, textWithoutShaping );
1181 aGc.SetPenColor(KRgbBlack);
1182 aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
1184 // Now in Blue with shaping
1185 aGc.SetPenColor(KRgbBlue);
1186 aGc.DrawText(KBengali1, textRect2, 100, CGraphicsContext::ELeft);
1188 //--------------------------------------------------------------------------
1189 // Without the Layout Engine
1190 aGc.SetPenColor(KRgbBlack);
1191 DisableShaping(&KBengali2, textWithoutShaping );
1192 aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
1194 aGc.SetPenColor(KRgbBlue);
1195 aGc.DrawText(KBengali2, textRect4, 100, CGraphicsContext::ELeft);
1196 //--------------------------------------------------------------------------
1197 // Without the Layout Engine
1198 DisableShaping(&KBengali3, textWithoutShaping );
1199 aGc.SetPenColor(KRgbBlack);
1200 aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
1202 aGc.SetPenColor(KRgbBlue);
1203 aGc.DrawText(KBengali3, textRect6, 100, CGraphicsContext::ELeft);
1204 //--------------------------------------------------------------------------
1209 DisableShaping(&KBengali4, textWithoutShaping );
1210 aGc.SetPenColor(KRgbBlack);
1211 aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
1213 aGc.SetPenColor(KRgbBlue);
1214 aGc.DrawText(KBengali4, textRect2, 100, CGraphicsContext::ELeft);
1216 //--------------------------------------------------------------------------
1217 // Without the Layout Engine
1218 DisableShaping(&KBengali5, textWithoutShaping );
1219 aGc.SetPenColor(KRgbBlack);
1220 aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
1222 aGc.SetPenColor(KRgbBlue);
1223 aGc.DrawText(KBengali5, textRect4, 100, CGraphicsContext::ELeft);
1224 //--------------------------------------------------------------------------
1225 // Without the Layout Engine
1226 DisableShaping(&KBengali6, textWithoutShaping );
1227 aGc.SetPenColor(KRgbBlack);
1228 aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
1230 aGc.SetPenColor(KRgbBlue);
1231 aGc.DrawText(KBengali6, textRect6, 100, CGraphicsContext::ELeft);
1232 //--------------------------------------------------------------------------
1238 DisableShaping(&KBengali7, textWithoutShaping );
1239 aGc.SetPenColor(KRgbBlack);
1240 aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
1242 aGc.SetPenColor(KRgbBlue);
1243 aGc.DrawText(KBengali7, textRect2, 100, CGraphicsContext::ELeft);
1245 //--------------------------------------------------------------------------
1246 // Without the Layout Engine
1247 DisableShaping(&KBengali8, textWithoutShaping );
1248 aGc.SetPenColor(KRgbBlack);
1249 aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
1251 aGc.SetPenColor(KRgbBlue);
1252 aGc.DrawText(KBengali8, textRect4, 100, CGraphicsContext::ELeft);
1253 //--------------------------------------------------------------------------
1254 // Without the Layout Engine
1255 DisableShaping(&KBengali9, textWithoutShaping );
1256 aGc.SetPenColor(KRgbBlack);
1257 aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
1259 aGc.SetPenColor(KRgbBlue);
1260 aGc.DrawText(KBengali9, textRect6, 100, CGraphicsContext::ELeft);
1261 //--------------------------------------------------------------------------
1266 DisableShaping(&KTestBengali1, textWithoutShaping );
1267 aGc.DrawText(KTestBengali1, textRect, 100, CGraphicsContext::ELeft);
1269 aGc.SetPenColor(KRgbBlue);
1270 aGc.DrawText(KTestBengali1, textRect2, 100, CGraphicsContext::ELeft);
1272 //--------------------------------------------------------------------------
1273 // Without the Layout Engine
1275 aGc.SetPenColor(KRgbBlack);
1276 aGc.DrawText(KTestBengali2, textRect3, 100, CGraphicsContext::ELeft);
1277 // With the Layout Engine
1279 aGc.SetPenColor(KRgbBlue);
1280 aGc.DrawText(KTestBengali2, textRect4, 100, CGraphicsContext::ELeft);
1281 //--------------------------------------------------------------------------
1282 // Without the Layout Engine
1284 aGc.SetPenColor(KRgbBlack);
1285 aGc.DrawText(KTestBengali3, textRect5, 100, CGraphicsContext::ELeft);
1286 // With the Layout Engine
1288 aGc.SetPenColor(KRgbBlue);
1289 aGc.DrawText(KTestBengali3, textRect6, 100, CGraphicsContext::ELeft);
1290 //--------------------------------------------------------------------------
1296 // First draw in Black with shaping disabled
1297 DisableShaping(&KTamil1, textWithoutShaping );
1298 aGc.SetPenColor(KRgbBlack);
1299 aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
1301 // Now in Blue with shaping
1302 aGc.SetPenColor(KRgbBlue);
1303 aGc.DrawText(KTamil1, textRect2, 100, CGraphicsContext::ELeft);
1305 //--------------------------------------------------------------------------
1306 // Without the Layout Engine
1307 aGc.SetPenColor(KRgbBlack);
1308 DisableShaping(&KTamil2, textWithoutShaping );
1309 aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
1311 aGc.SetPenColor(KRgbBlue);
1312 aGc.DrawText(KTamil2, textRect4, 100, CGraphicsContext::ELeft);
1313 //--------------------------------------------------------------------------
1314 // Without the Layout Engine
1315 DisableShaping(&KTamil3, textWithoutShaping );
1316 aGc.SetPenColor(KRgbBlack);
1317 aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
1319 aGc.SetPenColor(KRgbBlue);
1320 aGc.DrawText(KTamil3, textRect6, 100, CGraphicsContext::ELeft);
1321 //--------------------------------------------------------------------------
1325 // First draw in Black with shaping disabled
1326 DisableShaping(&KTamil4, textWithoutShaping );
1327 aGc.SetPenColor(KRgbBlack);
1328 aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
1330 aGc.SetPenColor(KRgbBlue);
1331 aGc.DrawText(KTamil4, textRect2, 100, CGraphicsContext::ELeft);
1333 //--------------------------------------------------------------------------
1334 // Without the Layout Engine
1335 DisableShaping(&KTamil5, textWithoutShaping );
1336 aGc.SetPenColor(KRgbBlack);
1337 aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
1339 aGc.SetPenColor(KRgbBlue);
1340 aGc.DrawText(KTamil5, textRect4, 100, CGraphicsContext::ELeft);
1341 //--------------------------------------------------------------------------
1342 // Without the Layout Engine
1343 DisableShaping(&KTamil6, textWithoutShaping );
1344 aGc.SetPenColor(KRgbBlack);
1345 aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
1347 aGc.SetPenColor(KRgbBlue);
1348 aGc.DrawText(KTamil6, textRect6, 100, CGraphicsContext::ELeft);
1349 //--------------------------------------------------------------------------
1354 // First draw in Black with shaping disabled
1355 DisableShaping(&KTamil7, textWithoutShaping );
1356 aGc.SetPenColor(KRgbBlack);
1357 aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
1359 aGc.SetPenColor(KRgbBlue);
1360 aGc.DrawText(KTamil7, textRect2, 100, CGraphicsContext::ELeft);
1362 //--------------------------------------------------------------------------
1363 // Without the Layout Engine
1364 DisableShaping(&KTamil8, textWithoutShaping );
1365 aGc.SetPenColor(KRgbBlack);
1366 aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
1368 aGc.SetPenColor(KRgbBlue);
1369 aGc.DrawText(KTamil8, textRect4, 100, CGraphicsContext::ELeft);
1370 //--------------------------------------------------------------------------
1371 // Without the Layout Engine
1372 DisableShaping(&KTamil9, textWithoutShaping );
1373 aGc.SetPenColor(KRgbBlack);
1374 aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
1376 aGc.SetPenColor(KRgbBlue);
1377 aGc.DrawText(KTamil9, textRect6, 100, CGraphicsContext::ELeft);
1378 //--------------------------------------------------------------------------
1382 // First draw in Black with shaping disabled
1383 DisableShaping(&KTestTamil1, textWithoutShaping );
1384 aGc.DrawText(KTestBengali1, textRect, 100, CGraphicsContext::ELeft);
1386 aGc.SetPenColor(KRgbBlue);
1387 aGc.DrawText(KTestTamil1, textRect2, 100, CGraphicsContext::ELeft);
1389 //--------------------------------------------------------------------------
1390 // Without the Layout Engine
1392 aGc.SetPenColor(KRgbBlack);
1393 aGc.DrawText(KTestTamil2, textRect3, 100, CGraphicsContext::ELeft);
1394 // With the Layout Engine
1396 aGc.SetPenColor(KRgbBlue);
1397 aGc.DrawText(KTestTamil2, textRect4, 100, CGraphicsContext::ELeft);
1398 //--------------------------------------------------------------------------
1399 // Without the Layout Engine
1401 aGc.SetPenColor(KRgbBlack);
1402 aGc.DrawText(KTestTamil3, textRect5, 100, CGraphicsContext::ELeft);
1403 // With the Layout Engine
1405 aGc.SetPenColor(KRgbBlue);
1406 aGc.DrawText(KTestTamil3, textRect6, 100, CGraphicsContext::ELeft);
1407 //--------------------------------------------------------------------------
1413 // First draw in Black with shaping disabled
1414 DisableShaping(&KTelugu1, textWithoutShaping );
1415 aGc.SetPenColor(KRgbBlack);
1416 aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
1418 // Now in Blue with shaping
1419 aGc.SetPenColor(KRgbBlue);
1420 aGc.DrawText(KTelugu1, textRect2, 100, CGraphicsContext::ELeft);
1422 //--------------------------------------------------------------------------
1423 // Without the Layout Engine
1424 aGc.SetPenColor(KRgbBlack);
1425 DisableShaping(&KTelugu2, textWithoutShaping );
1426 aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
1428 aGc.SetPenColor(KRgbBlue);
1429 aGc.DrawText(KTelugu2, textRect4, 100, CGraphicsContext::ELeft);
1430 //--------------------------------------------------------------------------
1431 // Without the Layout Engine
1432 DisableShaping(&KTelugu3, textWithoutShaping );
1433 aGc.SetPenColor(KRgbBlack);
1434 aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
1436 aGc.SetPenColor(KRgbBlue);
1437 aGc.DrawText(KTelugu3, textRect6, 100, CGraphicsContext::ELeft);
1438 //--------------------------------------------------------------------------
1443 // First draw in Black with shaping disabled
1444 DisableShaping(&KTelugu4, textWithoutShaping );
1445 aGc.SetPenColor(KRgbBlack);
1446 aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
1448 aGc.SetPenColor(KRgbBlue);
1449 aGc.DrawText(KTelugu4, textRect2, 100, CGraphicsContext::ELeft);
1451 //--------------------------------------------------------------------------
1452 // Without the Layout Engine
1453 DisableShaping(&KTelugu5, textWithoutShaping );
1454 aGc.SetPenColor(KRgbBlack);
1455 aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
1457 aGc.SetPenColor(KRgbBlue);
1458 aGc.DrawText(KTelugu5, textRect4, 100, CGraphicsContext::ELeft);
1459 //--------------------------------------------------------------------------
1460 // Without the Layout Engine
1461 DisableShaping(&KTelugu6, textWithoutShaping );
1462 aGc.SetPenColor(KRgbBlack);
1463 aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
1465 aGc.SetPenColor(KRgbBlue);
1466 aGc.DrawText(KTelugu6, textRect6, 100, CGraphicsContext::ELeft);
1467 //--------------------------------------------------------------------------
1472 // First draw in Black with shaping disabled
1473 DisableShaping(&KTelugu7, textWithoutShaping );
1474 aGc.SetPenColor(KRgbBlack);
1475 aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
1477 aGc.SetPenColor(KRgbBlue);
1478 aGc.DrawText(KTelugu7, textRect2, 100, CGraphicsContext::ELeft);
1480 //--------------------------------------------------------------------------
1481 // Without the Layout Engine
1482 DisableShaping(&KTelugu8, textWithoutShaping );
1483 aGc.SetPenColor(KRgbBlack);
1484 aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
1486 aGc.SetPenColor(KRgbBlue);
1487 aGc.DrawText(KTelugu8, textRect4, 100, CGraphicsContext::ELeft);
1488 //--------------------------------------------------------------------------
1489 // Without the Layout Engine
1490 DisableShaping(&KTelugu9, textWithoutShaping );
1491 aGc.SetPenColor(KRgbBlack);
1492 aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
1494 aGc.SetPenColor(KRgbBlue);
1495 aGc.DrawText(KTelugu9, textRect6, 100, CGraphicsContext::ELeft);
1496 //--------------------------------------------------------------------------
1501 // First draw in Black with shaping disabled
1502 DisableShaping(&KTestTelugu1, textWithoutShaping );
1503 aGc.DrawText(KTestTelugu1, textRect, 100, CGraphicsContext::ELeft);
1505 aGc.SetPenColor(KRgbBlue);
1506 aGc.DrawText(KTestTelugu1, textRect2, 100, CGraphicsContext::ELeft);
1508 //--------------------------------------------------------------------------
1509 // Without the Layout Engine
1511 aGc.SetPenColor(KRgbBlack);
1512 aGc.DrawText(KTestTelugu2, textRect3, 100, CGraphicsContext::ELeft);
1513 // With the Layout Engine
1515 aGc.SetPenColor(KRgbBlue);
1516 aGc.DrawText(KTestTelugu2, textRect4, 100, CGraphicsContext::ELeft);
1517 //--------------------------------------------------------------------------
1518 // Without the Layout Engine
1520 aGc.SetPenColor(KRgbBlack);
1521 aGc.DrawText(KTestTelugu3, textRect5, 100, CGraphicsContext::ELeft);
1522 // With the Layout Engine
1524 aGc.SetPenColor(KRgbBlue);
1525 aGc.DrawText(KTestTelugu3, textRect6, 100, CGraphicsContext::ELeft);
1526 //--------------------------------------------------------------------------
1531 // Discard and destroy the font
1533 screenDevice->ReleaseFont(myFont);
1538 CHindiAppUi::~CHindiAppUi()
1540 RemoveFromStack(iAppView);
1544 void CHindiAppUi::ConstructL()
1547 iAppView=new(ELeave) CHindiContainer;
1548 iAppView->ConstructL(ClientRect());
1549 AddToStackL(iAppView);
1552 void CHindiAppUi::HandleCommandL(TInt aCommand)
1554 TCharFormat charFormat;
1555 TCharFormatMask charMask;
1564 if ( CEikFontDialog::RunDlgLD(charFormat, charMask, EGulNoSymbolFonts, iCoeEnv->ScreenDevice()) )
1566 // save the selected font in the view
1567 iAppView->SetHindiFont( charFormat.iFontSpec );
1568 iAppView->DrawNow();
1572 case EEikCmdSample1:
1573 iAppView->ChangeSample(1);
1574 iAppView->DrawNow();
1576 case EEikCmdSample2:
1577 iAppView->ChangeSample(2);
1578 iAppView->DrawNow();
1580 case EEikCmdSample3:
1581 iAppView->ChangeSample(3);
1582 iAppView->DrawNow();
1584 case EEikCmdSample4:
1585 iAppView->ChangeSample(4);
1586 iAppView->DrawNow();
1588 case EEikCmdSample5:
1589 iAppView->ChangeSample(5);
1590 iAppView->DrawNow();
1592 case EEikCmdSample6:
1593 iAppView->ChangeSample(6);
1594 iAppView->DrawNow();
1596 case EEikCmdSample7:
1597 iAppView->ChangeSample(7);
1598 iAppView->DrawNow();
1600 case EEikCmdSample8:
1601 iAppView->ChangeSample(8);
1602 iAppView->DrawNow();
1604 case EEikCmdSample9:
1605 iAppView->ChangeSample(9);
1606 iAppView->DrawNow();
1608 case EEikCmdSample10:
1609 iAppView->ChangeSample(10);
1610 iAppView->DrawNow();
1612 case EEikCmdSample11:
1613 iAppView->ChangeSample(11);
1614 iAppView->DrawNow();
1616 case EEikCmdSample12:
1617 iAppView->ChangeSample(12);
1618 iAppView->DrawNow();
1619 case EEikCmdSample13:
1620 iAppView->ChangeSample(13);
1621 iAppView->DrawNow();
1623 case EEikCmdSample14:
1624 iAppView->ChangeSample(14);
1625 iAppView->DrawNow();
1627 case EEikCmdSample15:
1628 iAppView->ChangeSample(15);
1629 iAppView->DrawNow();
1631 case EEikCmdSample16:
1632 iAppView->ChangeSample(16);
1633 iAppView->DrawNow();
1635 case EEikCmdSample17:
1636 iAppView->ChangeSample(17);
1637 iAppView->DrawNow();
1639 case EEikCmdSample18:
1640 iAppView->ChangeSample(18);
1641 iAppView->DrawNow();
1643 case EEikCmdSample19:
1644 iAppView->ChangeSample(19);
1645 iAppView->DrawNow();
1647 case EEikCmdSample20:
1648 iAppView->ChangeSample(20);
1649 iAppView->DrawNow();
1651 case EEikCmdSample21:
1652 iAppView->ChangeSample(21);
1653 iAppView->DrawNow();
1655 case EEikCmdSample22:
1656 iAppView->ChangeSample(22);
1657 iAppView->DrawNow();
1659 case EEikCmdSample23:
1660 iAppView->ChangeSample(23);
1661 iAppView->DrawNow();
1663 case EEikCmdSample24:
1664 iAppView->ChangeSample(24);
1665 iAppView->DrawNow();
1667 case EEikCmdMakeHindiTxt:
1668 iAppView->CreateHindiTxtFile();
1670 case EEikCmdMakeKannadaTxt:
1671 iAppView->CreateKannadaTxtFile();
1673 case EEikCmdMakeGujaratiTxt:
1674 iAppView->CreateGujaratiTxtFile();
1676 case EEikCmdMakeBengaliTxt:
1677 iAppView->CreateBengaliTxtFile();
1679 case EEikCmdMakeTamilTxt:
1680 iAppView->CreateTamilTxtFile();
1682 case EEikCmdMakeTeluguTxt:
1683 iAppView->CreateTeluguTxtFile();
1691 TKeyResponse CHindiAppUi::HandleKeyEventL(const TKeyEvent& aKeyEvent, TEventCode /* aType */)
1693 switch (aKeyEvent.iCode)
1696 // increase font size
1697 iAppView->SetFontSize(iAppView->GetFontSize() +20);
1700 // increase font size
1701 iAppView->SetFontSize(iAppView->GetFontSize() -20);
1705 iAppView->ChangeSample(iAppView->GetSample()-1);
1707 case EKeyRightArrow:
1708 // increase font size
1709 iAppView->ChangeSample(iAppView->GetSample()+1);
1712 return EKeyWasNotConsumed;
1714 iAppView->DrawNow();
1715 return EKeyWasConsumed;
1718 // CHindiEikDocument
1720 CEikAppUi* CHindiEikDocument::CreateAppUiL()
1722 return(new(ELeave) CHindiAppUi);
1725 void CHindiEikDocument::ConstructL()
1730 // CHindiApplication
1732 TUid CHindiApplication::AppDllUid() const
1734 return KUidHindiDemoApp;
1737 CApaDocument* CHindiApplication::CreateDocumentL()
1739 CHindiEikDocument* document=new(ELeave) CHindiEikDocument(*this);
1740 CleanupStack::PushL(document);
1741 document->ConstructL();
1742 CleanupStack::Pop();
1747 // EXPORTed functions
1751 #ifdef __SECURE_DATA__
1753 static CApaApplication* NewApplication()
1755 return new CHindiApplication;
1758 GLDEF_C TInt E32Main()
1760 return EikStart::RunApplication(&NewApplication);
1766 EXPORT_C CApaApplication* NewApplication()
1768 return new CHindiApplication;
1771 GLDEF_C TInt E32Dll(TDllReason)