sl@0
|
1 |
/*
|
sl@0
|
2 |
* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
3 |
* All rights reserved.
|
sl@0
|
4 |
* This component and the accompanying materials are made available
|
sl@0
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
sl@0
|
6 |
* which accompanies this distribution, and is available
|
sl@0
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
8 |
*
|
sl@0
|
9 |
* Initial Contributors:
|
sl@0
|
10 |
* Nokia Corporation - initial contribution.
|
sl@0
|
11 |
*
|
sl@0
|
12 |
* Contributors:
|
sl@0
|
13 |
*
|
sl@0
|
14 |
* Description:
|
sl@0
|
15 |
* hindiDemo.cpp
|
sl@0
|
16 |
* hindiDemo application
|
sl@0
|
17 |
*
|
sl@0
|
18 |
*/
|
sl@0
|
19 |
|
sl@0
|
20 |
|
sl@0
|
21 |
#include <e32keys.h>
|
sl@0
|
22 |
#include <coemain.h>
|
sl@0
|
23 |
#include <eikenv.h>
|
sl@0
|
24 |
#include <eikdef.h>
|
sl@0
|
25 |
#include <eikstart.h>
|
sl@0
|
26 |
#include <techview/eikfontd.h>
|
sl@0
|
27 |
|
sl@0
|
28 |
#include <hindidemo.rsg>
|
sl@0
|
29 |
#include "hindiDemo.hrh"
|
sl@0
|
30 |
#include "hindiDemoApp.h"
|
sl@0
|
31 |
#include <techview/eiklabel.h>
|
sl@0
|
32 |
#include <techview/eikcmbut.h>
|
sl@0
|
33 |
#include <techview/eikrted.h>
|
sl@0
|
34 |
#include <barsread.h>
|
sl@0
|
35 |
#include <badesca.h>
|
sl@0
|
36 |
|
sl@0
|
37 |
|
sl@0
|
38 |
// hindi sample text
|
sl@0
|
39 |
// sample 1
|
sl@0
|
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");
|
sl@0
|
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");
|
sl@0
|
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");
|
sl@0
|
43 |
|
sl@0
|
44 |
// sample 2
|
sl@0
|
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");
|
sl@0
|
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");
|
sl@0
|
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");
|
sl@0
|
48 |
|
sl@0
|
49 |
// sample 3
|
sl@0
|
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");
|
sl@0
|
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");
|
sl@0
|
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");
|
sl@0
|
53 |
|
sl@0
|
54 |
// test 4 - two character test data
|
sl@0
|
55 |
_LIT16(KTest1,"\x091c\x092e\x094d\x0918\x0940\x0902\x091a\x094d\x092f\x0940");
|
sl@0
|
56 |
_LIT16(KTest2,"\x092e\x092e\x0020");
|
sl@0
|
57 |
_LIT16(KTest3,"\x0915\x094D\x0937\x0924\x094D\x0930\x093F\x092F\x0020");
|
sl@0
|
58 |
|
sl@0
|
59 |
//Kannada sample text
|
sl@0
|
60 |
// sample 1
|
sl@0
|
61 |
_LIT16(KKannada1,"\x0CA8\x0CAE\x0CCD\x0CAE\x0020\x0CB0\x0CBE\x0CB7\x0CCD\x0C9F\x0CCD\x0CB0\x0020\x0CAD\x0CBE\x0CB0\x0CA4");
|
sl@0
|
62 |
_LIT16(KKannada2,"\x0CB2\x0C95\x0CCD\x0CB7\x0CCD\x0CAE\x0CCD\x0CAF\x0CBE");
|
sl@0
|
63 |
_LIT16(KKannada3,"\x0C95\x0CCD\x0C95\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4\x0AA8\x0020\x0A95\x0AB0\x0AB5\x0ABE\x0AA8\x0ACB\x0020\x0AAA\x0ACD\x0AB0\x0AAF\x0AA4\x0ACD\x0AA8\x0020\x0A95\x0AB0\x0AB5\x0ABE\x0AAE\x0ABE\x0A82");
|
sl@0
|
86 |
_LIT16(KGujarati6,"\x0A86\x0AB5\x0ACD\x0AAF\x0ACB\x0020\x0A9B\x0AC7\x002E\x0020\x0020\x0AB0\x0ABE\x0AB7\x0ACD\x0A9F\x0ACD\x0AB0\x0AC0\x0AAF\x0020\x0AB6\x0ABF\x0A95\x0ACD\x0AB7\x0AA3\x0020\x0AA8\x0AC0\x0AA4\x0ABF\x0AA8\x0ABE\x0020\x0AAE\x0AC1\x0AB8\x0AA6\x0ABE\x0AAE\x0ABE\x0A82\x0020\x0AB8\x0AAE\x0ABE\x0AA8\x0020\x0A85\x0AAD\x0ACD\x0AAF\x0ABE\x0AB8\x0A95\x0ACD\x0AB0\x0AAE\x0ACB\x0AA8\x0AC0\x0020\x0A85\x0AAE\x0AB2");
|
sl@0
|
87 |
// sample 3
|
sl@0
|
88 |
_LIT16(KGujarati7,"\x0A95\x0AB0\x0AB5\x0ABE\x0020\x0AB8\x0ABE\x0AA5\x0AC7\x0020\x0A95\x0AC7\x0A9F\x0AB2\x0ABE\x0A82\x0A95\x0020\x0AB9\x0ABE\x0AB0\x0ACD\x0AA6\x0AB6\x0ACD\x0AAA\x0020\x0AA4\x0AA4\x0ACD\x0AA4\x0ACD\x0AB5\x0ACB\x0020\x0AA6\x0ABE\x0A96\x0AB2\x0020\x0A95\x0AB0\x0AB5\x0ABE\x0AA8\x0AC1\x0A82\x0020\x0AA8\x0A95\x0ACD\x0A95\x0AC0\x0020\x0A95\x0AB0\x0AB5\x0ABE\x0AAE\x0ABE\x0A82\x0020\x0A85\x0AB5\x0ACD\x0AAF\x0AC1\x0A82\x0020\x0A9B\x0AC7\x002E");
|
sl@0
|
89 |
_LIT16(KGujarati8,"\x0A86\x0020\x0AB9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\x0AAA\x0AA3\x0020\x0AB8\x0ACD\x0AB5\x0AC0\x0A95\x0ABE\x0AB0\x0ABE\x0AAF\x0ACB\x0020\x0A9B\x0AC7");
|
sl@0
|
96 |
|
sl@0
|
97 |
|
sl@0
|
98 |
//Bengali sample text
|
sl@0
|
99 |
// sample 1
|
sl@0
|
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");
|
sl@0
|
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");
|
sl@0
|
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");
|
sl@0
|
103 |
// sample 2
|
sl@0
|
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");
|
sl@0
|
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");
|
sl@0
|
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");
|
sl@0
|
107 |
// sample 3
|
sl@0
|
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");
|
sl@0
|
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");
|
sl@0
|
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");
|
sl@0
|
111 |
|
sl@0
|
112 |
// Sample 4
|
sl@0
|
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");
|
sl@0
|
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");
|
sl@0
|
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");
|
sl@0
|
116 |
|
sl@0
|
117 |
|
sl@0
|
118 |
|
sl@0
|
119 |
//Tamil sample text
|
sl@0
|
120 |
// sample 1
|
sl@0
|
121 |
_LIT16(KTamil1,"\x0BAA\x0BBE\x0BAF\x0BBF\x0BB0\x0BAE\x0BCD");
|
sl@0
|
122 |
_LIT16(KTamil2,"\x0B95\x0B9F\x0BB5\x0BC1\x0BB3\x0BCD\x0BB5\x0BBE\x0BB4\x0BCD\x0BA4\x0BCD\x0BA4\x0BC1");
|
sl@0
|
123 |
_LIT16(KTamil3,"\x0BAA\x0BC2\x0BB5\x0BBF\x0BA9\x0BCD\x0BAE\x0BC7\x0BB2\x0BCD\x0BB5\x0BA8\x0BCD\x0BA4\x0BB0\x0BC1\x0BB3\x0BC1\x0BAE\x0BCD\x0BAA\x0BC1\x0B99\x0BCD\x0B95\x0BB5\x0BA9\x0BCD\x0BA4\x0BA9\x0BCD\x0BAA\x0BCA\x0BB1\x0BCD\x0BAA\x0BBE\x0BA4\x0BAE\x0BCD");
|
sl@0
|
124 |
// sample 2
|
sl@0
|
125 |
_LIT16(KTamil4,"\x0BA8\x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0C32\x0C28\x0C4D\x0C27\x0C4D\x0C30\x0C41\x0C35\x0C2E");
|
sl@0
|
142 |
_LIT16(KTelugu3,"\x0C05\x0C25\x0C48\x0C24\x0C26\x0C2A\x0C4D\x0C2F\x0C36\x0C15\x0C4D\x0C24\x0C4B\x093D\x0C38");
|
sl@0
|
143 |
// sample 2
|
sl@0
|
144 |
_LIT16(KTelugu4,"\x0C2F\x0C4B\x0C28\x0C3F\x0C30\x0C4D\x0C2E\x0C39\x0C26\x0C4D\x0C2C\x0C4D\x0C30\x0C39\x0C4D\x0C2E");
|
sl@0
|
145 |
_LIT16(KTelugu5,"\x0C26\x0C47\x0C39\x0C47\x093D\x0C38\x0C4D\x0C2E\x0C3F\x0C28\x0C4D\x0C2A\x0C4D\x0C30\x0C15\x0C3E\x0C36");
|
sl@0
|
146 |
_LIT16(KTelugu6,"\x0C2A\x0C4D\x0C30\x0C35\x0C43\x0C24\x0C4D\x0C24\x0C3F\x0C30\x0C3E\x0C30\x0C2E\x0C4D\x0C2D\x0C03");
|
sl@0
|
147 |
// sample 3
|
sl@0
|
148 |
_LIT16(KTelugu7,"\x0C1C\x0C41\x0C39\x0C4D\x0C35\x0C26\x0C43\x0C37\x0C3F\x0C30\x0C4D\x0C39\x0C4B\x0C24\x0C3E");
|
sl@0
|
149 |
_LIT16(KTelugu8,"\x0C2A\x0C24\x0C24\x0C4D\x0C30\x0C48\x0C30\x0C4D\x0C26\x0C4D\x0C2F\x0C3E\x0C35\x0C3E\x0C2D\x0C42\x0C2E");
|
sl@0
|
150 |
_LIT16(KTelugu9,"\x0C26\x0C4D\x0C2F\x0C3E\x0C14\x0C30\x0C4D\x0C23\x0C4B\x0C28\x0C4D\x0C2E\x0C39\x0C3F\x0C28\x0C3E");
|
sl@0
|
151 |
// Sample 4
|
sl@0
|
152 |
_LIT16(KTestTelugu1,"\x0C09\x0C26\x0C4D\x0C35\x0C43\x0C24\x0C4D\x0C30\x0C39\x0C28\x0C4D\x0C35\x0C3E\x0C1C\x0C3F\x0C28\x0C3E\x0C02");
|
sl@0
|
153 |
_LIT16(KTestTelugu2,"\x0C05\x0C30\x0C4D\x0C37\x0C28\x0C4D\x0C24\x0C4D\x0C2F\x0C42\x0C30\x0C4D\x0C2E\x0C2F\x0C4B \x0C18\x0C43\x0C24\x0C38\x0C4D");
|
sl@0
|
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");
|
sl@0
|
155 |
|
sl@0
|
156 |
void Panic(TInt aPanic)
|
sl@0
|
157 |
{
|
sl@0
|
158 |
_LIT(KPanic, "hindiDemo Application");
|
sl@0
|
159 |
User::Panic(KPanic,aPanic);
|
sl@0
|
160 |
}
|
sl@0
|
161 |
|
sl@0
|
162 |
// Class CHindiContainer
|
sl@0
|
163 |
|
sl@0
|
164 |
void CHindiContainer::ConstructL(const TRect& aRect)
|
sl@0
|
165 |
{
|
sl@0
|
166 |
|
sl@0
|
167 |
CreateWindowL();
|
sl@0
|
168 |
SetBlank();
|
sl@0
|
169 |
|
sl@0
|
170 |
_LIT(KMyFontName,"Series 60 Hindi TitleSmB");
|
sl@0
|
171 |
TFontSpec hindiFontSpec(KMyFontName,200);
|
sl@0
|
172 |
iFontSpec = hindiFontSpec;
|
sl@0
|
173 |
SetFontSize(200);
|
sl@0
|
174 |
|
sl@0
|
175 |
// first label
|
sl@0
|
176 |
_LIT(KSomeHindi," " );
|
sl@0
|
177 |
iTest = new(ELeave) CEikLabel;
|
sl@0
|
178 |
iTest->SetContainerWindowL(*this);
|
sl@0
|
179 |
iTest->SetBufferReserveLengthL(64);
|
sl@0
|
180 |
iTest->SetTextL(KSomeHindi);
|
sl@0
|
181 |
|
sl@0
|
182 |
// add a CEikRichTextEditor
|
sl@0
|
183 |
/* TResourceReader reader;
|
sl@0
|
184 |
TBuf<500> buf;
|
sl@0
|
185 |
iCoeEnv->CreateResourceReaderLC(reader, R_OUTPUT_WINDOW_RTEXTED);
|
sl@0
|
186 |
iOutputWindow = new (ELeave) CEikRichTextEditor();
|
sl@0
|
187 |
iOutputWindow->SetContainerWindowL(*this);
|
sl@0
|
188 |
iOutputWindow->ConstructFromResourceL(reader);
|
sl@0
|
189 |
CleanupStack::PopAndDestroy(); // Resource reader
|
sl@0
|
190 |
iOutputWindow->SetFocus(ETrue);
|
sl@0
|
191 |
|
sl@0
|
192 |
const TPoint KOutputPosition = TPoint(10, 35);
|
sl@0
|
193 |
const TSize KOutputSize = TSize(150, 100);
|
sl@0
|
194 |
iOutputWindow->SetExtent(KOutputPosition, KOutputSize);
|
sl@0
|
195 |
|
sl@0
|
196 |
buf.Append(_L("abc"));
|
sl@0
|
197 |
buf.Append(KHindi);
|
sl@0
|
198 |
buf.Append(_L(" xyz"));
|
sl@0
|
199 |
iOutputWindow->SetTextL(&buf); */
|
sl@0
|
200 |
|
sl@0
|
201 |
SetRect(aRect);
|
sl@0
|
202 |
ActivateL();
|
sl@0
|
203 |
iSample =1;
|
sl@0
|
204 |
}
|
sl@0
|
205 |
|
sl@0
|
206 |
CHindiContainer::~CHindiContainer()
|
sl@0
|
207 |
{
|
sl@0
|
208 |
delete iTest;
|
sl@0
|
209 |
delete iOutputWindow;
|
sl@0
|
210 |
}
|
sl@0
|
211 |
|
sl@0
|
212 |
void CHindiContainer::SizeChanged()
|
sl@0
|
213 |
{
|
sl@0
|
214 |
TPoint pos = Position();
|
sl@0
|
215 |
iTest->SetExtent(pos + TPoint(10,10), TSize(500, 40));
|
sl@0
|
216 |
}
|
sl@0
|
217 |
|
sl@0
|
218 |
TInt CHindiContainer::CountComponentControls() const
|
sl@0
|
219 |
{
|
sl@0
|
220 |
return 1 /* 2 */;
|
sl@0
|
221 |
}
|
sl@0
|
222 |
|
sl@0
|
223 |
CCoeControl* CHindiContainer::ComponentControl(TInt aIndex) const
|
sl@0
|
224 |
{
|
sl@0
|
225 |
CCoeControl* controls[] = { iTest/*, iOutputWindow */ };
|
sl@0
|
226 |
return controls[aIndex];
|
sl@0
|
227 |
}
|
sl@0
|
228 |
|
sl@0
|
229 |
void CHindiContainer::HandleControlEventL(CCoeControl* /* aControl */,
|
sl@0
|
230 |
TCoeEvent aEventType)
|
sl@0
|
231 |
{
|
sl@0
|
232 |
if (aEventType == EEventStateChanged)
|
sl@0
|
233 |
{
|
sl@0
|
234 |
// AppUi()->Exit();
|
sl@0
|
235 |
}
|
sl@0
|
236 |
}
|
sl@0
|
237 |
|
sl@0
|
238 |
void CHindiContainer::Draw(const TRect& aRect) const
|
sl@0
|
239 |
{
|
sl@0
|
240 |
TRect rect(Rect());
|
sl@0
|
241 |
rect.Intersection(aRect);
|
sl@0
|
242 |
|
sl@0
|
243 |
// draw the text directly on the display
|
sl@0
|
244 |
CWindowGc& gc = SystemGc();
|
sl@0
|
245 |
DrawHindiText(gc);
|
sl@0
|
246 |
}
|
sl@0
|
247 |
|
sl@0
|
248 |
void CHindiContainer::ChangeSample( TInt aSample)
|
sl@0
|
249 |
{
|
sl@0
|
250 |
iSample = aSample;
|
sl@0
|
251 |
if (iSample > 24 ) iSample = 1;
|
sl@0
|
252 |
if (iSample < 1 ) iSample = 24;
|
sl@0
|
253 |
}
|
sl@0
|
254 |
|
sl@0
|
255 |
TInt CHindiContainer::GetSample()
|
sl@0
|
256 |
{
|
sl@0
|
257 |
return iSample;
|
sl@0
|
258 |
}
|
sl@0
|
259 |
|
sl@0
|
260 |
void CHindiContainer::SetHindiFont( TFontSpec& aFontSpec )
|
sl@0
|
261 |
{
|
sl@0
|
262 |
iFontSpec = aFontSpec;
|
sl@0
|
263 |
}
|
sl@0
|
264 |
|
sl@0
|
265 |
void CHindiContainer::SetFontSize( TInt aFontSize )
|
sl@0
|
266 |
{
|
sl@0
|
267 |
iFontSize = aFontSize;
|
sl@0
|
268 |
iFontSpec.iHeight = iFontSize;
|
sl@0
|
269 |
}
|
sl@0
|
270 |
|
sl@0
|
271 |
TInt CHindiContainer::GetFontSize()
|
sl@0
|
272 |
{
|
sl@0
|
273 |
return iFontSize;
|
sl@0
|
274 |
}
|
sl@0
|
275 |
|
sl@0
|
276 |
|
sl@0
|
277 |
const TInt UnicodeZeroWidthNonJoiner = 0x200C;
|
sl@0
|
278 |
|
sl@0
|
279 |
/* Display Hindi without shaping by inserting a Unicode Zero Width Non Joiner
|
sl@0
|
280 |
character bewteen each character
|
sl@0
|
281 |
aInput the Hindi text to be displayed
|
sl@0
|
282 |
aOutput the same text with the ZWNJ characters added, This buffer must be big enough
|
sl@0
|
283 |
*/
|
sl@0
|
284 |
void CHindiContainer::DisableShaping(const TDesC* aInput, TDes& aOutput ) const
|
sl@0
|
285 |
{
|
sl@0
|
286 |
aOutput.Zero();
|
sl@0
|
287 |
for (TInt i = 0; i < aInput->Length(); i++ )
|
sl@0
|
288 |
{
|
sl@0
|
289 |
aOutput.Append( aInput->Mid(i,1) );
|
sl@0
|
290 |
aOutput.Append( UnicodeZeroWidthNonJoiner );
|
sl@0
|
291 |
}
|
sl@0
|
292 |
}
|
sl@0
|
293 |
|
sl@0
|
294 |
/* create a text file which contains the sample hindi data
|
sl@0
|
295 |
this can be used for testing
|
sl@0
|
296 |
*/
|
sl@0
|
297 |
void CHindiContainer::CreateHindiTxtFile() const
|
sl@0
|
298 |
{
|
sl@0
|
299 |
RFs fs;
|
sl@0
|
300 |
TInt error = KErrNone;
|
sl@0
|
301 |
RFile file;
|
sl@0
|
302 |
|
sl@0
|
303 |
// Open or create hindi.txt
|
sl@0
|
304 |
error = fs.Connect();
|
sl@0
|
305 |
error = file.Open(fs, _L("c:\\hindi.txt"), EFileWrite);
|
sl@0
|
306 |
if ( error == KErrNotFound)
|
sl@0
|
307 |
{
|
sl@0
|
308 |
error = file.Create(fs, _L("c:\\hindi.txt"), EFileWrite);
|
sl@0
|
309 |
}
|
sl@0
|
310 |
|
sl@0
|
311 |
// load buffer with data to write
|
sl@0
|
312 |
RBuf8 buffer;
|
sl@0
|
313 |
buffer.Create(10000);
|
sl@0
|
314 |
TPtrC16 pHindi(KHindi1);
|
sl@0
|
315 |
buffer.Append( _L("\xff\xfe") );
|
sl@0
|
316 |
buffer.Append((const unsigned char *)pHindi.Ptr(), pHindi.Size() );
|
sl@0
|
317 |
|
sl@0
|
318 |
TPtrC16 pHindi2(KHindi2);
|
sl@0
|
319 |
buffer.Append((const unsigned char *)pHindi2.Ptr(), pHindi2.Size() );
|
sl@0
|
320 |
|
sl@0
|
321 |
TPtrC16 pHindi3(KHindi3);
|
sl@0
|
322 |
buffer.Append((const unsigned char *)pHindi3.Ptr(), pHindi3.Size() );
|
sl@0
|
323 |
|
sl@0
|
324 |
TPtrC16 pHindi4(KHindi4);
|
sl@0
|
325 |
buffer.Append((const unsigned char *)pHindi4.Ptr(), pHindi4.Size() );
|
sl@0
|
326 |
|
sl@0
|
327 |
TPtrC16 pHindi5(KHindi5);
|
sl@0
|
328 |
buffer.Append((const unsigned char *)pHindi5.Ptr(), pHindi5.Size() );
|
sl@0
|
329 |
|
sl@0
|
330 |
TPtrC16 pHindi6(KHindi6);
|
sl@0
|
331 |
buffer.Append((const unsigned char *)pHindi6.Ptr(), pHindi6.Size() );
|
sl@0
|
332 |
|
sl@0
|
333 |
TPtrC16 pHindi7(KHindi7);
|
sl@0
|
334 |
buffer.Append((const unsigned char *)pHindi7.Ptr(), pHindi7.Size() );
|
sl@0
|
335 |
|
sl@0
|
336 |
TPtrC16 pHindi8(KHindi8);
|
sl@0
|
337 |
buffer.Append((const unsigned char *)pHindi8.Ptr(), pHindi8.Size() );
|
sl@0
|
338 |
|
sl@0
|
339 |
TPtrC16 pHindi9(KHindi9);
|
sl@0
|
340 |
buffer.Append((const unsigned char *)pHindi9.Ptr(), pHindi9.Size() );
|
sl@0
|
341 |
|
sl@0
|
342 |
// write buffer
|
sl@0
|
343 |
error = file.Write(buffer);
|
sl@0
|
344 |
|
sl@0
|
345 |
buffer.Close();
|
sl@0
|
346 |
|
sl@0
|
347 |
file.Close();
|
sl@0
|
348 |
fs.Close();
|
sl@0
|
349 |
|
sl@0
|
350 |
}
|
sl@0
|
351 |
|
sl@0
|
352 |
|
sl@0
|
353 |
/* create a text file which contains the sample Kannada data
|
sl@0
|
354 |
this can be used for testing
|
sl@0
|
355 |
*/
|
sl@0
|
356 |
void CHindiContainer::CreateKannadaTxtFile() const
|
sl@0
|
357 |
{
|
sl@0
|
358 |
RFs fs;
|
sl@0
|
359 |
TInt error = KErrNone;
|
sl@0
|
360 |
RFile file;
|
sl@0
|
361 |
|
sl@0
|
362 |
// Open or create Kannada.txt
|
sl@0
|
363 |
error = fs.Connect();
|
sl@0
|
364 |
error = file.Open(fs, _L("c:\\Kannada.txt"), EFileWrite);
|
sl@0
|
365 |
if ( error == KErrNotFound)
|
sl@0
|
366 |
{
|
sl@0
|
367 |
error = file.Create(fs, _L("c:\\Kannada.txt"), EFileWrite);
|
sl@0
|
368 |
}
|
sl@0
|
369 |
|
sl@0
|
370 |
// load buffer with data to write
|
sl@0
|
371 |
// TBuf8<10000> buffer;
|
sl@0
|
372 |
RBuf8 buffer;
|
sl@0
|
373 |
buffer.Create(10000);
|
sl@0
|
374 |
TPtrC16 pKannada(KKannada1);
|
sl@0
|
375 |
buffer.Append( _L("\xff\xfe") );
|
sl@0
|
376 |
buffer.Append((const unsigned char *)pKannada.Ptr(), pKannada.Size() );
|
sl@0
|
377 |
|
sl@0
|
378 |
TPtrC16 pKannada2(KKannada2);
|
sl@0
|
379 |
buffer.Append((const unsigned char *)pKannada2.Ptr(), pKannada2.Size() );
|
sl@0
|
380 |
|
sl@0
|
381 |
TPtrC16 pKannada3(KKannada3);
|
sl@0
|
382 |
buffer.Append((const unsigned char *)pKannada3.Ptr(), pKannada3.Size() );
|
sl@0
|
383 |
|
sl@0
|
384 |
TPtrC16 pKannada4(KKannada4);
|
sl@0
|
385 |
buffer.Append((const unsigned char *)pKannada4.Ptr(), pKannada4.Size() );
|
sl@0
|
386 |
|
sl@0
|
387 |
TPtrC16 pKannada5(KKannada5);
|
sl@0
|
388 |
buffer.Append((const unsigned char *)pKannada5.Ptr(), pKannada5.Size() );
|
sl@0
|
389 |
|
sl@0
|
390 |
TPtrC16 pKannada6(KKannada6);
|
sl@0
|
391 |
buffer.Append((const unsigned char *)pKannada6.Ptr(), pKannada6.Size() );
|
sl@0
|
392 |
|
sl@0
|
393 |
TPtrC16 pKannada7(KKannada7);
|
sl@0
|
394 |
buffer.Append((const unsigned char *)pKannada7.Ptr(), pKannada7.Size() );
|
sl@0
|
395 |
|
sl@0
|
396 |
TPtrC16 pKannada8(KKannada8);
|
sl@0
|
397 |
buffer.Append((const unsigned char *)pKannada8.Ptr(), pKannada8.Size() );
|
sl@0
|
398 |
|
sl@0
|
399 |
TPtrC16 pKannada9(KKannada9);
|
sl@0
|
400 |
buffer.Append((const unsigned char *)pKannada9.Ptr(), pKannada9.Size() );
|
sl@0
|
401 |
|
sl@0
|
402 |
// write buffer
|
sl@0
|
403 |
error = file.Write(buffer);
|
sl@0
|
404 |
|
sl@0
|
405 |
buffer.Close();
|
sl@0
|
406 |
|
sl@0
|
407 |
file.Close();
|
sl@0
|
408 |
fs.Close();
|
sl@0
|
409 |
|
sl@0
|
410 |
}
|
sl@0
|
411 |
|
sl@0
|
412 |
/* create a text file which contains the sample Gujarati data
|
sl@0
|
413 |
this can be used for testing
|
sl@0
|
414 |
*/
|
sl@0
|
415 |
void CHindiContainer::CreateGujaratiTxtFile() const
|
sl@0
|
416 |
{
|
sl@0
|
417 |
RFs fs;
|
sl@0
|
418 |
TInt error = KErrNone;
|
sl@0
|
419 |
RFile file;
|
sl@0
|
420 |
|
sl@0
|
421 |
// Open or create Gujarati.txt
|
sl@0
|
422 |
error = fs.Connect();
|
sl@0
|
423 |
error = file.Open(fs, _L("c:\\Gujarati.txt"), EFileWrite);
|
sl@0
|
424 |
if ( error == KErrNotFound)
|
sl@0
|
425 |
{
|
sl@0
|
426 |
error = file.Create(fs, _L("c:\\Gujarati.txt"), EFileWrite);
|
sl@0
|
427 |
}
|
sl@0
|
428 |
|
sl@0
|
429 |
// load buffer with data to write
|
sl@0
|
430 |
// TBuf8<10000> buffer;
|
sl@0
|
431 |
RBuf8 buffer;
|
sl@0
|
432 |
buffer.Create(10000);
|
sl@0
|
433 |
TPtrC16 pGujarati(KGujarati1);
|
sl@0
|
434 |
buffer.Append( _L("\xff\xfe") );
|
sl@0
|
435 |
buffer.Append((const unsigned char *)pGujarati.Ptr(), pGujarati.Size() );
|
sl@0
|
436 |
|
sl@0
|
437 |
TPtrC16 pGujarati2(KGujarati2);
|
sl@0
|
438 |
buffer.Append((const unsigned char *)pGujarati2.Ptr(), pGujarati2.Size() );
|
sl@0
|
439 |
|
sl@0
|
440 |
TPtrC16 pGujarati3(KGujarati3);
|
sl@0
|
441 |
buffer.Append((const unsigned char *)pGujarati3.Ptr(), pGujarati3.Size() );
|
sl@0
|
442 |
|
sl@0
|
443 |
TPtrC16 pGujarati4(KGujarati4);
|
sl@0
|
444 |
buffer.Append((const unsigned char *)pGujarati4.Ptr(), pGujarati4.Size() );
|
sl@0
|
445 |
|
sl@0
|
446 |
TPtrC16 pGujarati5(KGujarati5);
|
sl@0
|
447 |
buffer.Append((const unsigned char *)pGujarati5.Ptr(), pGujarati5.Size() );
|
sl@0
|
448 |
|
sl@0
|
449 |
TPtrC16 pGujarati6(KGujarati6);
|
sl@0
|
450 |
buffer.Append((const unsigned char *)pGujarati6.Ptr(), pGujarati6.Size() );
|
sl@0
|
451 |
|
sl@0
|
452 |
TPtrC16 pGujarati7(KGujarati7);
|
sl@0
|
453 |
buffer.Append((const unsigned char *)pGujarati7.Ptr(), pGujarati7.Size() );
|
sl@0
|
454 |
|
sl@0
|
455 |
TPtrC16 pGujarati8(KGujarati8);
|
sl@0
|
456 |
buffer.Append((const unsigned char *)pGujarati8.Ptr(), pGujarati8.Size() );
|
sl@0
|
457 |
|
sl@0
|
458 |
TPtrC16 pGujarati9(KGujarati9);
|
sl@0
|
459 |
buffer.Append((const unsigned char *)pGujarati9.Ptr(), pGujarati9.Size() );
|
sl@0
|
460 |
|
sl@0
|
461 |
// write buffer
|
sl@0
|
462 |
error = file.Write(buffer);
|
sl@0
|
463 |
|
sl@0
|
464 |
buffer.Close();
|
sl@0
|
465 |
|
sl@0
|
466 |
file.Close();
|
sl@0
|
467 |
fs.Close();
|
sl@0
|
468 |
}
|
sl@0
|
469 |
/* create a text file which contains the sample Bengali data
|
sl@0
|
470 |
this can be used for testing
|
sl@0
|
471 |
*/
|
sl@0
|
472 |
|
sl@0
|
473 |
void CHindiContainer::CreateBengaliTxtFile() const
|
sl@0
|
474 |
{
|
sl@0
|
475 |
RFs fs1;
|
sl@0
|
476 |
TInt error = KErrNone;
|
sl@0
|
477 |
RFile file1;
|
sl@0
|
478 |
// Open or create Bengali.txt
|
sl@0
|
479 |
error = fs1.Connect();
|
sl@0
|
480 |
error = file1.Open(fs1, _L("c:\\Bengali.txt"), EFileWrite);
|
sl@0
|
481 |
if ( error == KErrNotFound)
|
sl@0
|
482 |
{
|
sl@0
|
483 |
error = file1.Create(fs1, _L("c:\\Bengali.txt"), EFileWrite);
|
sl@0
|
484 |
}
|
sl@0
|
485 |
// load buffer with data to write
|
sl@0
|
486 |
RBuf8 buffer;
|
sl@0
|
487 |
buffer.Create(10000);
|
sl@0
|
488 |
TPtrC16 pBengali(KBengali1);
|
sl@0
|
489 |
buffer.Append( _L("\xff\xfe"));
|
sl@0
|
490 |
buffer.Append((const unsigned char *)pBengali.Ptr(), pBengali.Size());
|
sl@0
|
491 |
|
sl@0
|
492 |
TPtrC16 pBengali2(KBengali2);
|
sl@0
|
493 |
buffer.Append((const unsigned char *)pBengali2.Ptr(), pBengali2.Size());
|
sl@0
|
494 |
|
sl@0
|
495 |
TPtrC16 pBengali3(KBengali3);
|
sl@0
|
496 |
buffer.Append((const unsigned char *)pBengali3.Ptr(), pBengali3.Size());
|
sl@0
|
497 |
|
sl@0
|
498 |
TPtrC16 pBengali4(KBengali4);
|
sl@0
|
499 |
buffer.Append((const unsigned char *)pBengali4.Ptr(), pBengali4.Size());
|
sl@0
|
500 |
|
sl@0
|
501 |
TPtrC16 pBengali5(KBengali5);
|
sl@0
|
502 |
buffer.Append((const unsigned char *)pBengali5.Ptr(), pBengali5.Size());
|
sl@0
|
503 |
|
sl@0
|
504 |
TPtrC16 pBengali6(KBengali6);
|
sl@0
|
505 |
buffer.Append((const unsigned char *)pBengali6.Ptr(), pBengali6.Size());
|
sl@0
|
506 |
|
sl@0
|
507 |
TPtrC16 pBengali7(KBengali7);
|
sl@0
|
508 |
buffer.Append((const unsigned char *)pBengali7.Ptr(), pBengali7.Size());
|
sl@0
|
509 |
|
sl@0
|
510 |
TPtrC16 pBengali8(KBengali8);
|
sl@0
|
511 |
buffer.Append((const unsigned char *)pBengali8.Ptr(), pBengali8.Size());
|
sl@0
|
512 |
|
sl@0
|
513 |
TPtrC16 pBengali9(KBengali9);
|
sl@0
|
514 |
buffer.Append((const unsigned char *)pBengali9.Ptr(), pBengali9.Size());
|
sl@0
|
515 |
|
sl@0
|
516 |
// write buffer
|
sl@0
|
517 |
error = file1.Write(buffer);
|
sl@0
|
518 |
buffer.Close();
|
sl@0
|
519 |
file1.Close();
|
sl@0
|
520 |
fs1.Close();
|
sl@0
|
521 |
}
|
sl@0
|
522 |
|
sl@0
|
523 |
void CHindiContainer::CreateTamilTxtFile() const
|
sl@0
|
524 |
{
|
sl@0
|
525 |
RFs fs;
|
sl@0
|
526 |
TInt error = KErrNone;
|
sl@0
|
527 |
RFile file;
|
sl@0
|
528 |
|
sl@0
|
529 |
// Open or create Tamil.txt
|
sl@0
|
530 |
error = fs.Connect();
|
sl@0
|
531 |
error = file.Open(fs, _L("c:\\Tamil.txt"), EFileWrite);
|
sl@0
|
532 |
if ( error == KErrNotFound)
|
sl@0
|
533 |
{
|
sl@0
|
534 |
error = file.Create(fs, _L("c:\\Tamil.txt"), EFileWrite);
|
sl@0
|
535 |
}
|
sl@0
|
536 |
|
sl@0
|
537 |
// load buffer with data to write
|
sl@0
|
538 |
// TBuf8<10000> buffer;
|
sl@0
|
539 |
RBuf8 buffer;
|
sl@0
|
540 |
buffer.Create(10000);
|
sl@0
|
541 |
TPtrC16 pTamil(KTamil1);
|
sl@0
|
542 |
buffer.Append( _L("\xff\xfe") );
|
sl@0
|
543 |
buffer.Append((const unsigned char *)pTamil.Ptr(), pTamil.Size() );
|
sl@0
|
544 |
|
sl@0
|
545 |
TPtrC16 pTamil2(KTamil2);
|
sl@0
|
546 |
buffer.Append((const unsigned char *)pTamil2.Ptr(), pTamil2.Size() );
|
sl@0
|
547 |
|
sl@0
|
548 |
TPtrC16 pTamil3(KTamil3);
|
sl@0
|
549 |
buffer.Append((const unsigned char *)pTamil3.Ptr(), pTamil3.Size() );
|
sl@0
|
550 |
|
sl@0
|
551 |
TPtrC16 pTamil4(KTamil4);
|
sl@0
|
552 |
buffer.Append((const unsigned char *)pTamil4.Ptr(), pTamil4.Size() );
|
sl@0
|
553 |
|
sl@0
|
554 |
TPtrC16 pTamil5(KTamil5);
|
sl@0
|
555 |
buffer.Append((const unsigned char *)pTamil5.Ptr(), pTamil5.Size() );
|
sl@0
|
556 |
|
sl@0
|
557 |
TPtrC16 pTamil6(KTamil6);
|
sl@0
|
558 |
buffer.Append((const unsigned char *)pTamil6.Ptr(), pTamil6.Size() );
|
sl@0
|
559 |
|
sl@0
|
560 |
TPtrC16 pTamil7(KTamil7);
|
sl@0
|
561 |
buffer.Append((const unsigned char *)pTamil7.Ptr(), pTamil7.Size() );
|
sl@0
|
562 |
|
sl@0
|
563 |
TPtrC16 pTamil8(KTamil8);
|
sl@0
|
564 |
buffer.Append((const unsigned char *)pTamil8.Ptr(), pTamil8.Size() );
|
sl@0
|
565 |
|
sl@0
|
566 |
TPtrC16 pTamil9(KTamil9);
|
sl@0
|
567 |
buffer.Append((const unsigned char *)pTamil9.Ptr(), pTamil9.Size() );
|
sl@0
|
568 |
|
sl@0
|
569 |
// write buffer
|
sl@0
|
570 |
error = file.Write(buffer);
|
sl@0
|
571 |
|
sl@0
|
572 |
buffer.Close();
|
sl@0
|
573 |
|
sl@0
|
574 |
file.Close();
|
sl@0
|
575 |
fs.Close();
|
sl@0
|
576 |
}
|
sl@0
|
577 |
|
sl@0
|
578 |
void CHindiContainer::CreateTeluguTxtFile() const
|
sl@0
|
579 |
{
|
sl@0
|
580 |
RFs fs;
|
sl@0
|
581 |
TInt error = KErrNone;
|
sl@0
|
582 |
RFile file;
|
sl@0
|
583 |
|
sl@0
|
584 |
// Open or create Telugu.txt
|
sl@0
|
585 |
error = fs.Connect();
|
sl@0
|
586 |
error = file.Open(fs, _L("c:\\Telugu.txt"), EFileWrite);
|
sl@0
|
587 |
if ( error == KErrNotFound)
|
sl@0
|
588 |
{
|
sl@0
|
589 |
error = file.Create(fs, _L("c:\\Telugu.txt"), EFileWrite);
|
sl@0
|
590 |
}
|
sl@0
|
591 |
|
sl@0
|
592 |
// load buffer with data to write
|
sl@0
|
593 |
// TBuf8<10000> buffer;
|
sl@0
|
594 |
RBuf8 buffer;
|
sl@0
|
595 |
buffer.Create(10000);
|
sl@0
|
596 |
TPtrC16 pTelugu(KTelugu1);
|
sl@0
|
597 |
buffer.Append( _L("\xff\xfe") );
|
sl@0
|
598 |
buffer.Append((const unsigned char *)pTelugu.Ptr(), pTelugu.Size() );
|
sl@0
|
599 |
|
sl@0
|
600 |
TPtrC16 pTelugu2(KTelugu2);
|
sl@0
|
601 |
buffer.Append((const unsigned char *)pTelugu2.Ptr(), pTelugu2.Size() );
|
sl@0
|
602 |
|
sl@0
|
603 |
TPtrC16 pTelugu3(KTelugu3);
|
sl@0
|
604 |
buffer.Append((const unsigned char *)pTelugu3.Ptr(), pTelugu3.Size() );
|
sl@0
|
605 |
|
sl@0
|
606 |
TPtrC16 pTelugu4(KTelugu4);
|
sl@0
|
607 |
buffer.Append((const unsigned char *)pTelugu4.Ptr(), pTelugu4.Size() );
|
sl@0
|
608 |
|
sl@0
|
609 |
TPtrC16 pTelugu5(KTelugu5);
|
sl@0
|
610 |
buffer.Append((const unsigned char *)pTelugu5.Ptr(), pTelugu5.Size() );
|
sl@0
|
611 |
|
sl@0
|
612 |
TPtrC16 pTelugu6(KTelugu6);
|
sl@0
|
613 |
buffer.Append((const unsigned char *)pTelugu6.Ptr(), pTelugu6.Size() );
|
sl@0
|
614 |
|
sl@0
|
615 |
TPtrC16 pTelugu7(KTelugu7);
|
sl@0
|
616 |
buffer.Append((const unsigned char *)pTelugu7.Ptr(), pTelugu7.Size() );
|
sl@0
|
617 |
|
sl@0
|
618 |
TPtrC16 pTelugu8(KTelugu8);
|
sl@0
|
619 |
buffer.Append((const unsigned char *)pTelugu8.Ptr(), pTelugu8.Size() );
|
sl@0
|
620 |
|
sl@0
|
621 |
TPtrC16 pTelugu9(KTelugu9);
|
sl@0
|
622 |
buffer.Append((const unsigned char *)pTelugu9.Ptr(), pTelugu9.Size() );
|
sl@0
|
623 |
|
sl@0
|
624 |
// write buffer
|
sl@0
|
625 |
error = file.Write(buffer);
|
sl@0
|
626 |
|
sl@0
|
627 |
buffer.Close();
|
sl@0
|
628 |
|
sl@0
|
629 |
file.Close();
|
sl@0
|
630 |
fs.Close();
|
sl@0
|
631 |
}
|
sl@0
|
632 |
|
sl@0
|
633 |
/**
|
sl@0
|
634 |
@file
|
sl@0
|
635 |
@SYMTestCaseID GRAPHICS-SYSLIB-ICULAYOUTENGINE-CIT-1499
|
sl@0
|
636 |
@SYMTestCaseDesc Test the IcuLayout Engine .
|
sl@0
|
637 |
@SYMTestPriority High
|
sl@0
|
638 |
@SYMTestActions Test Check that Hindi text is shaped:
|
sl@0
|
639 |
@SYMTestExpectedResults The test must not fail.
|
sl@0
|
640 |
@SYMPREQ PREQ18
|
sl@0
|
641 |
*/
|
sl@0
|
642 |
|
sl@0
|
643 |
/**
|
sl@0
|
644 |
@file
|
sl@0
|
645 |
@SYMTestCaseID GRAPHICS-SYSLIB-ICULAYOUTENGINE-CIT-3382
|
sl@0
|
646 |
@SYMTestCaseDesc Test the IcuLayout Engine for Kannada support by extending functionalities of DrawHindiText(CWindowGc& aGc) function.
|
sl@0
|
647 |
@SYMTestPriority High
|
sl@0
|
648 |
@SYMTestActions Test Check that Kannada text is shaped:
|
sl@0
|
649 |
@SYMTestExpectedResults The test must not fail.
|
sl@0
|
650 |
@SYMPREQ PREQ19
|
sl@0
|
651 |
*/
|
sl@0
|
652 |
/**
|
sl@0
|
653 |
@file
|
sl@0
|
654 |
@SYMTestCaseID GRAPHICS-SYSLIB-ICULAYOUTENGINE-CIT-3418
|
sl@0
|
655 |
@SYMTestCaseDesc Test the IcuLayout Engine for Gujarati support by extending functionalities of DrawHindiText(CWindowGc& aGc) function.
|
sl@0
|
656 |
@SYMTestPriority High
|
sl@0
|
657 |
@SYMTestActions Test Check that gujarati text is shaped:
|
sl@0
|
658 |
@SYMTestExpectedResults The test must not fail.
|
sl@0
|
659 |
@SYMPREQ PREQ19
|
sl@0
|
660 |
*/
|
sl@0
|
661 |
|
sl@0
|
662 |
/**
|
sl@0
|
663 |
@file
|
sl@0
|
664 |
@SYMTestCaseID GRAPHICS-SYSLIB-ICULAYOUTENGINE-CIT-4004
|
sl@0
|
665 |
@SYMTestCaseDesc Test the IcuLayout Engine for Bengali support by extending functionalities of DrawHindiText(CWindowGc& aGc) function.
|
sl@0
|
666 |
@SYMTestPriority High
|
sl@0
|
667 |
@SYMTestActions Test Check that Bengali text is shaped:
|
sl@0
|
668 |
@SYMTestExpectedResults The test must not fail.
|
sl@0
|
669 |
@SYMPREQ PREQ1766
|
sl@0
|
670 |
*/
|
sl@0
|
671 |
|
sl@0
|
672 |
/**
|
sl@0
|
673 |
@file
|
sl@0
|
674 |
@SYMTestCaseID GRAPHICS-SYSLIB-ICULAYOUTENGINE-CIT-4005
|
sl@0
|
675 |
@SYMTestCaseDesc Test the IcuLayout Engine for Tamil support by extending functionalities of DrawHindiText(CWindowGc& aGc) function.
|
sl@0
|
676 |
@SYMTestPriority High
|
sl@0
|
677 |
@SYMTestActions Test Check that Tamil text is shaped:
|
sl@0
|
678 |
@SYMTestExpectedResults The test must not fail.
|
sl@0
|
679 |
@SYMPREQ PREQ1766
|
sl@0
|
680 |
*/
|
sl@0
|
681 |
|
sl@0
|
682 |
|
sl@0
|
683 |
/**
|
sl@0
|
684 |
@file
|
sl@0
|
685 |
@SYMTestCaseID GRAPHICS-SYSLIB-ICULAYOUTENGINE-CIT-4006
|
sl@0
|
686 |
@SYMTestCaseDesc Test the IcuLayout Engine for Telugu support by extending functionalities of DrawHindiText(CWindowGc& aGc) function.
|
sl@0
|
687 |
@SYMTestPriority High
|
sl@0
|
688 |
@SYMTestActions Test Check that Telugu text is shaped:
|
sl@0
|
689 |
@SYMTestExpectedResults The test must not fail.
|
sl@0
|
690 |
@SYMPREQ PREQ1766
|
sl@0
|
691 |
*/
|
sl@0
|
692 |
|
sl@0
|
693 |
void CHindiContainer::DrawHindiText(CWindowGc& aGc) const
|
sl@0
|
694 |
{
|
sl@0
|
695 |
|
sl@0
|
696 |
// start with test font
|
sl@0
|
697 |
CFont* myFont;
|
sl@0
|
698 |
_LIT(KTestFontName,"DejaVu Sans Condensed");
|
sl@0
|
699 |
TFontSpec testFontSpec(KTestFontName,200);
|
sl@0
|
700 |
CGraphicsDevice* screenDevice=iCoeEnv->ScreenDevice();
|
sl@0
|
701 |
screenDevice->GetNearestFontInTwips(myFont,testFontSpec);
|
sl@0
|
702 |
|
sl@0
|
703 |
// set the required attributes
|
sl@0
|
704 |
aGc.UseFont(myFont);
|
sl@0
|
705 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
706 |
aGc.SetBrushColor(KRgbBlue);
|
sl@0
|
707 |
aGc.CancelClippingRect();
|
sl@0
|
708 |
|
sl@0
|
709 |
// Set the text drawing position & draw
|
sl@0
|
710 |
TPoint pos(10,20);
|
sl@0
|
711 |
TBuf<100> textLine;
|
sl@0
|
712 |
textLine.Append(_L("The following is "));
|
sl@0
|
713 |
|
sl@0
|
714 |
switch( iSample )
|
sl@0
|
715 |
{
|
sl@0
|
716 |
case 1:
|
sl@0
|
717 |
textLine.Append(_L("Hindi sample 1 "));
|
sl@0
|
718 |
break;
|
sl@0
|
719 |
case 2:
|
sl@0
|
720 |
textLine.Append(_L("Hindi sample 2 "));
|
sl@0
|
721 |
break;
|
sl@0
|
722 |
case 3:
|
sl@0
|
723 |
textLine.Append(_L("Hindi sample 3 "));
|
sl@0
|
724 |
break;
|
sl@0
|
725 |
case 4:
|
sl@0
|
726 |
textLine.Append(_L(" Hindi Sample 4 "));
|
sl@0
|
727 |
break;
|
sl@0
|
728 |
case 5:
|
sl@0
|
729 |
textLine.Append(_L("Kannada sample 1 "));
|
sl@0
|
730 |
break;
|
sl@0
|
731 |
case 6:
|
sl@0
|
732 |
textLine.Append(_L("Kannada sample 2 "));
|
sl@0
|
733 |
break;
|
sl@0
|
734 |
case 7:
|
sl@0
|
735 |
textLine.Append(_L("Kannada sample 3 "));
|
sl@0
|
736 |
break;
|
sl@0
|
737 |
case 8:
|
sl@0
|
738 |
textLine.Append(_L("Kannada Sample 4 "));
|
sl@0
|
739 |
break;
|
sl@0
|
740 |
case 9:
|
sl@0
|
741 |
textLine.Append(_L("Gujarati sample 1 "));
|
sl@0
|
742 |
break;
|
sl@0
|
743 |
case 10:
|
sl@0
|
744 |
textLine.Append(_L("Gujarati sample 2 "));
|
sl@0
|
745 |
break;
|
sl@0
|
746 |
case 11:
|
sl@0
|
747 |
textLine.Append(_L("Gujarati sample 3 "));
|
sl@0
|
748 |
break;
|
sl@0
|
749 |
case 12:
|
sl@0
|
750 |
textLine.Append(_L("Gujarati Sample 4 "));
|
sl@0
|
751 |
break;
|
sl@0
|
752 |
case 13:
|
sl@0
|
753 |
textLine.Append(_L("Bengali sample 1 "));
|
sl@0
|
754 |
break;
|
sl@0
|
755 |
case 14:
|
sl@0
|
756 |
textLine.Append(_L("Bengali sample 2 "));
|
sl@0
|
757 |
break;
|
sl@0
|
758 |
case 15:
|
sl@0
|
759 |
textLine.Append(_L("Bengali sample 3 "));
|
sl@0
|
760 |
break;
|
sl@0
|
761 |
case 16:
|
sl@0
|
762 |
textLine.Append(_L("Bengali Sample 4 "));
|
sl@0
|
763 |
break;
|
sl@0
|
764 |
case 17:
|
sl@0
|
765 |
textLine.Append(_L("Tamil sample 1 "));
|
sl@0
|
766 |
break;
|
sl@0
|
767 |
case 18:
|
sl@0
|
768 |
textLine.Append(_L("Tamil sample 2 "));
|
sl@0
|
769 |
break;
|
sl@0
|
770 |
case 19:
|
sl@0
|
771 |
textLine.Append(_L("Tamil sample 3 "));
|
sl@0
|
772 |
break;
|
sl@0
|
773 |
case 20:
|
sl@0
|
774 |
textLine.Append(_L("Tamil Sample 4 "));
|
sl@0
|
775 |
break;
|
sl@0
|
776 |
case 21:
|
sl@0
|
777 |
textLine.Append(_L("Telugu sample 1 "));
|
sl@0
|
778 |
break;
|
sl@0
|
779 |
case 22:
|
sl@0
|
780 |
textLine.Append(_L("Telugu sample 2 "));
|
sl@0
|
781 |
break;
|
sl@0
|
782 |
case 23:
|
sl@0
|
783 |
textLine.Append(_L("Telugu sample 3 "));
|
sl@0
|
784 |
break;
|
sl@0
|
785 |
case 24:
|
sl@0
|
786 |
textLine.Append(_L("Telugu Sample 4 "));
|
sl@0
|
787 |
break;
|
sl@0
|
788 |
default:
|
sl@0
|
789 |
textLine.Append(_L("what? "));
|
sl@0
|
790 |
break;
|
sl@0
|
791 |
}
|
sl@0
|
792 |
|
sl@0
|
793 |
textLine.Append(_L("using font "));
|
sl@0
|
794 |
textLine.Append(iFontSpec.iTypeface.iName);
|
sl@0
|
795 |
aGc.DrawText(textLine,pos);
|
sl@0
|
796 |
|
sl@0
|
797 |
TPoint pos2(10,35);
|
sl@0
|
798 |
TBuf<100> textLine2;
|
sl@0
|
799 |
textLine2.Format(_L("Size:%dpt Blue is shaped, Black is not"),iFontSize/20);
|
sl@0
|
800 |
aGc.DrawText(textLine2, pos2);
|
sl@0
|
801 |
|
sl@0
|
802 |
// Discard and destroy the test font
|
sl@0
|
803 |
aGc.DiscardFont();
|
sl@0
|
804 |
screenDevice->ReleaseFont(myFont);
|
sl@0
|
805 |
|
sl@0
|
806 |
// set the selected font
|
sl@0
|
807 |
screenDevice->GetNearestFontInTwips(myFont,iFontSpec);
|
sl@0
|
808 |
|
sl@0
|
809 |
// set the required attributes
|
sl@0
|
810 |
aGc.UseFont(myFont);
|
sl@0
|
811 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
812 |
aGc.SetBrushColor(KRgbBlue);
|
sl@0
|
813 |
aGc.CancelClippingRect();
|
sl@0
|
814 |
|
sl@0
|
815 |
// some rectangles to fit the text in
|
sl@0
|
816 |
TRect textRect(10,-30,600, 600);
|
sl@0
|
817 |
TRect textRect2(10,-5,600, 600);
|
sl@0
|
818 |
TRect textRect3(10, 25, 600, 600);
|
sl@0
|
819 |
TRect textRect4(10, 50, 600, 600);
|
sl@0
|
820 |
TRect textRect5(10, 80, 600, 600);
|
sl@0
|
821 |
TRect textRect6(10, 105, 600, 600);
|
sl@0
|
822 |
|
sl@0
|
823 |
TBuf<200> textWithoutShaping;
|
sl@0
|
824 |
|
sl@0
|
825 |
// Draw some Hindi in a rectangle
|
sl@0
|
826 |
switch (iSample)
|
sl@0
|
827 |
{
|
sl@0
|
828 |
|
sl@0
|
829 |
//Hindi Sample 1
|
sl@0
|
830 |
case 1:
|
sl@0
|
831 |
|
sl@0
|
832 |
// First draw in Black with shaping disabled
|
sl@0
|
833 |
DisableShaping(&KHindi1, textWithoutShaping );
|
sl@0
|
834 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
835 |
aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
|
sl@0
|
836 |
|
sl@0
|
837 |
// Now in Blue with shaping
|
sl@0
|
838 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
839 |
aGc.DrawText(KHindi1, textRect2, 100, CGraphicsContext::ELeft);
|
sl@0
|
840 |
|
sl@0
|
841 |
//--------------------------------------------------------------------------
|
sl@0
|
842 |
// Without the Layout Engine
|
sl@0
|
843 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
844 |
DisableShaping(&KHindi2, textWithoutShaping );
|
sl@0
|
845 |
aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
|
sl@0
|
846 |
|
sl@0
|
847 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
848 |
aGc.DrawText(KHindi2, textRect4, 100, CGraphicsContext::ELeft);
|
sl@0
|
849 |
//--------------------------------------------------------------------------
|
sl@0
|
850 |
// Without the Layout Engine
|
sl@0
|
851 |
DisableShaping(&KHindi3, textWithoutShaping );
|
sl@0
|
852 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
853 |
aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
|
sl@0
|
854 |
|
sl@0
|
855 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
856 |
aGc.DrawText(KHindi3, textRect6, 100, CGraphicsContext::ELeft);
|
sl@0
|
857 |
//--------------------------------------------------------------------------
|
sl@0
|
858 |
break;
|
sl@0
|
859 |
//Hindi Sample 2
|
sl@0
|
860 |
case 2:
|
sl@0
|
861 |
DisableShaping(&KHindi4, textWithoutShaping );
|
sl@0
|
862 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
863 |
aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
|
sl@0
|
864 |
|
sl@0
|
865 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
866 |
aGc.DrawText(KHindi4, textRect2, 100, CGraphicsContext::ELeft);
|
sl@0
|
867 |
|
sl@0
|
868 |
//--------------------------------------------------------------------------
|
sl@0
|
869 |
// Without the Layout Engine
|
sl@0
|
870 |
DisableShaping(&KHindi5, textWithoutShaping );
|
sl@0
|
871 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
872 |
aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
|
sl@0
|
873 |
|
sl@0
|
874 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
875 |
aGc.DrawText(KHindi5, textRect4, 100, CGraphicsContext::ELeft);
|
sl@0
|
876 |
//--------------------------------------------------------------------------
|
sl@0
|
877 |
// Without the Layout Engine
|
sl@0
|
878 |
DisableShaping(&KHindi6, textWithoutShaping );
|
sl@0
|
879 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
880 |
aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
|
sl@0
|
881 |
|
sl@0
|
882 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
883 |
aGc.DrawText(KHindi6, textRect6, 100, CGraphicsContext::ELeft);
|
sl@0
|
884 |
//--------------------------------------------------------------------------
|
sl@0
|
885 |
break;
|
sl@0
|
886 |
//Hindi Sample 3
|
sl@0
|
887 |
case 3:
|
sl@0
|
888 |
DisableShaping(&KHindi7, textWithoutShaping );
|
sl@0
|
889 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
890 |
aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
|
sl@0
|
891 |
|
sl@0
|
892 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
893 |
aGc.DrawText(KHindi7, textRect2, 100, CGraphicsContext::ELeft);
|
sl@0
|
894 |
|
sl@0
|
895 |
//--------------------------------------------------------------------------
|
sl@0
|
896 |
// Without the Layout Engine
|
sl@0
|
897 |
DisableShaping(&KHindi8, textWithoutShaping );
|
sl@0
|
898 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
899 |
aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
|
sl@0
|
900 |
|
sl@0
|
901 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
902 |
aGc.DrawText(KHindi8, textRect4, 100, CGraphicsContext::ELeft);
|
sl@0
|
903 |
//--------------------------------------------------------------------------
|
sl@0
|
904 |
// Without the Layout Engine
|
sl@0
|
905 |
DisableShaping(&KHindi9, textWithoutShaping );
|
sl@0
|
906 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
907 |
aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
|
sl@0
|
908 |
|
sl@0
|
909 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
910 |
aGc.DrawText(KHindi9, textRect6, 100, CGraphicsContext::ELeft);
|
sl@0
|
911 |
//--------------------------------------------------------------------------
|
sl@0
|
912 |
break;
|
sl@0
|
913 |
//Hindi Sample 4
|
sl@0
|
914 |
case 4:
|
sl@0
|
915 |
// test
|
sl@0
|
916 |
DisableShaping(&KTest1, textWithoutShaping );
|
sl@0
|
917 |
aGc.DrawText(KTest1, textRect, 100, CGraphicsContext::ELeft);
|
sl@0
|
918 |
|
sl@0
|
919 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
920 |
aGc.DrawText(KTest1, textRect2, 100, CGraphicsContext::ELeft);
|
sl@0
|
921 |
|
sl@0
|
922 |
//--------------------------------------------------------------------------
|
sl@0
|
923 |
// Without the Layout Engine
|
sl@0
|
924 |
|
sl@0
|
925 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
926 |
aGc.DrawText(KTest2, textRect3, 100, CGraphicsContext::ELeft);
|
sl@0
|
927 |
// With the Layout Engine
|
sl@0
|
928 |
|
sl@0
|
929 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
930 |
aGc.DrawText(KTest2, textRect4, 100, CGraphicsContext::ELeft);
|
sl@0
|
931 |
//--------------------------------------------------------------------------
|
sl@0
|
932 |
// Without the Layout Engine
|
sl@0
|
933 |
|
sl@0
|
934 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
935 |
aGc.DrawText(KTest3, textRect5, 100, CGraphicsContext::ELeft);
|
sl@0
|
936 |
// With the Layout Engine
|
sl@0
|
937 |
|
sl@0
|
938 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
939 |
aGc.DrawText(KTest3, textRect6, 100, CGraphicsContext::ELeft);
|
sl@0
|
940 |
//--------------------------------------------------------------------------
|
sl@0
|
941 |
break;
|
sl@0
|
942 |
|
sl@0
|
943 |
//Kannada Sample 1
|
sl@0
|
944 |
case 5:
|
sl@0
|
945 |
// First draw in Black with shaping disabled
|
sl@0
|
946 |
DisableShaping(&KKannada1, textWithoutShaping );
|
sl@0
|
947 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
948 |
aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
|
sl@0
|
949 |
|
sl@0
|
950 |
// Now in Blue with shaping
|
sl@0
|
951 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
952 |
aGc.DrawText(KKannada1, textRect2, 100, CGraphicsContext::ELeft);
|
sl@0
|
953 |
|
sl@0
|
954 |
//--------------------------------------------------------------------------
|
sl@0
|
955 |
// Without the Layout Engine
|
sl@0
|
956 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
957 |
DisableShaping(&KKannada2, textWithoutShaping );
|
sl@0
|
958 |
aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
|
sl@0
|
959 |
|
sl@0
|
960 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
961 |
aGc.DrawText(KKannada2, textRect4, 100, CGraphicsContext::ELeft);
|
sl@0
|
962 |
//--------------------------------------------------------------------------
|
sl@0
|
963 |
// Without the Layout Engine
|
sl@0
|
964 |
DisableShaping(&KKannada3, textWithoutShaping );
|
sl@0
|
965 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
966 |
aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
|
sl@0
|
967 |
|
sl@0
|
968 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
969 |
aGc.DrawText(KKannada3, textRect6, 100, CGraphicsContext::ELeft);
|
sl@0
|
970 |
//--------------------------------------------------------------------------
|
sl@0
|
971 |
break;
|
sl@0
|
972 |
//Kannada Sample 2
|
sl@0
|
973 |
|
sl@0
|
974 |
case 6:
|
sl@0
|
975 |
DisableShaping(&KKannada4, textWithoutShaping );
|
sl@0
|
976 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
977 |
aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
|
sl@0
|
978 |
|
sl@0
|
979 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
980 |
aGc.DrawText(KKannada4, textRect2, 100, CGraphicsContext::ELeft);
|
sl@0
|
981 |
|
sl@0
|
982 |
//--------------------------------------------------------------------------
|
sl@0
|
983 |
// Without the Layout Engine
|
sl@0
|
984 |
DisableShaping(&KKannada5, textWithoutShaping );
|
sl@0
|
985 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
986 |
aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
|
sl@0
|
987 |
|
sl@0
|
988 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
989 |
aGc.DrawText(KKannada5, textRect4, 100, CGraphicsContext::ELeft);
|
sl@0
|
990 |
//--------------------------------------------------------------------------
|
sl@0
|
991 |
// Without the Layout Engine
|
sl@0
|
992 |
DisableShaping(&KKannada6, textWithoutShaping );
|
sl@0
|
993 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
994 |
aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
|
sl@0
|
995 |
|
sl@0
|
996 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
997 |
aGc.DrawText(KKannada6, textRect6, 100, CGraphicsContext::ELeft);
|
sl@0
|
998 |
//--------------------------------------------------------------------------
|
sl@0
|
999 |
break;
|
sl@0
|
1000 |
|
sl@0
|
1001 |
//Kannada Sample 3
|
sl@0
|
1002 |
|
sl@0
|
1003 |
case 7:
|
sl@0
|
1004 |
DisableShaping(&KKannada7, textWithoutShaping );
|
sl@0
|
1005 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
1006 |
aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
|
sl@0
|
1007 |
|
sl@0
|
1008 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
1009 |
aGc.DrawText(KKannada7, textRect2, 100, CGraphicsContext::ELeft);
|
sl@0
|
1010 |
|
sl@0
|
1011 |
//--------------------------------------------------------------------------
|
sl@0
|
1012 |
// Without the Layout Engine
|
sl@0
|
1013 |
DisableShaping(&KKannada8, textWithoutShaping );
|
sl@0
|
1014 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
1015 |
aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
|
sl@0
|
1016 |
|
sl@0
|
1017 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
1018 |
aGc.DrawText(KKannada8, textRect4, 100, CGraphicsContext::ELeft);
|
sl@0
|
1019 |
//--------------------------------------------------------------------------
|
sl@0
|
1020 |
// Without the Layout Engine
|
sl@0
|
1021 |
DisableShaping(&KKannada9, textWithoutShaping );
|
sl@0
|
1022 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
1023 |
aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
|
sl@0
|
1024 |
|
sl@0
|
1025 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
1026 |
aGc.DrawText(KKannada9, textRect6, 100, CGraphicsContext::ELeft);
|
sl@0
|
1027 |
//--------------------------------------------------------------------------
|
sl@0
|
1028 |
break;
|
sl@0
|
1029 |
//Kannada Sample 4
|
sl@0
|
1030 |
case 8:
|
sl@0
|
1031 |
|
sl@0
|
1032 |
DisableShaping(&KTestKannada1, textWithoutShaping );
|
sl@0
|
1033 |
aGc.DrawText(KTestKannada1, textRect, 100, CGraphicsContext::ELeft);
|
sl@0
|
1034 |
|
sl@0
|
1035 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
1036 |
aGc.DrawText(KTestKannada1, textRect2, 100, CGraphicsContext::ELeft);
|
sl@0
|
1037 |
|
sl@0
|
1038 |
//--------------------------------------------------------------------------
|
sl@0
|
1039 |
// Without the Layout Engine
|
sl@0
|
1040 |
|
sl@0
|
1041 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
1042 |
aGc.DrawText(KTestKannada2, textRect3, 100, CGraphicsContext::ELeft);
|
sl@0
|
1043 |
// With the Layout Engine
|
sl@0
|
1044 |
|
sl@0
|
1045 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
1046 |
aGc.DrawText(KTestKannada2, textRect4, 100, CGraphicsContext::ELeft);
|
sl@0
|
1047 |
//--------------------------------------------------------------------------
|
sl@0
|
1048 |
// Without the Layout Engine
|
sl@0
|
1049 |
|
sl@0
|
1050 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
1051 |
aGc.DrawText(KTestKannada3, textRect5, 100, CGraphicsContext::ELeft);
|
sl@0
|
1052 |
// With the Layout Engine
|
sl@0
|
1053 |
|
sl@0
|
1054 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
1055 |
aGc.DrawText(KTestKannada3, textRect6, 100, CGraphicsContext::ELeft);
|
sl@0
|
1056 |
//--------------------------------------------------------------------------
|
sl@0
|
1057 |
|
sl@0
|
1058 |
break;
|
sl@0
|
1059 |
// break;
|
sl@0
|
1060 |
|
sl@0
|
1061 |
//Gujarati Sample 1
|
sl@0
|
1062 |
case 9:
|
sl@0
|
1063 |
// First draw in Black with shaping disabled
|
sl@0
|
1064 |
DisableShaping(&KGujarati1, textWithoutShaping );
|
sl@0
|
1065 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
1066 |
aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
|
sl@0
|
1067 |
|
sl@0
|
1068 |
// Now in Blue with shaping
|
sl@0
|
1069 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
1070 |
aGc.DrawText(KGujarati1, textRect2, 100, CGraphicsContext::ELeft);
|
sl@0
|
1071 |
|
sl@0
|
1072 |
//--------------------------------------------------------------------------
|
sl@0
|
1073 |
// Without the Layout Engine
|
sl@0
|
1074 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
1075 |
DisableShaping(&KGujarati2, textWithoutShaping );
|
sl@0
|
1076 |
aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
|
sl@0
|
1077 |
|
sl@0
|
1078 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
1079 |
aGc.DrawText(KGujarati2, textRect4, 100, CGraphicsContext::ELeft);
|
sl@0
|
1080 |
//--------------------------------------------------------------------------
|
sl@0
|
1081 |
// Without the Layout Engine
|
sl@0
|
1082 |
DisableShaping(&KGujarati3, textWithoutShaping );
|
sl@0
|
1083 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
1084 |
aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
|
sl@0
|
1085 |
|
sl@0
|
1086 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
1087 |
aGc.DrawText(KGujarati3, textRect6, 100, CGraphicsContext::ELeft);
|
sl@0
|
1088 |
//--------------------------------------------------------------------------
|
sl@0
|
1089 |
break;
|
sl@0
|
1090 |
//Gujarati Sample 2
|
sl@0
|
1091 |
|
sl@0
|
1092 |
case 10:
|
sl@0
|
1093 |
DisableShaping(&KGujarati4, textWithoutShaping );
|
sl@0
|
1094 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
1095 |
aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
|
sl@0
|
1096 |
|
sl@0
|
1097 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
1098 |
aGc.DrawText(KGujarati4, textRect2, 100, CGraphicsContext::ELeft);
|
sl@0
|
1099 |
|
sl@0
|
1100 |
//--------------------------------------------------------------------------
|
sl@0
|
1101 |
// Without the Layout Engine
|
sl@0
|
1102 |
DisableShaping(&KGujarati5, textWithoutShaping );
|
sl@0
|
1103 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
1104 |
aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
|
sl@0
|
1105 |
|
sl@0
|
1106 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
1107 |
aGc.DrawText(KGujarati5, textRect4, 100, CGraphicsContext::ELeft);
|
sl@0
|
1108 |
//--------------------------------------------------------------------------
|
sl@0
|
1109 |
// Without the Layout Engine
|
sl@0
|
1110 |
DisableShaping(&KGujarati6, textWithoutShaping );
|
sl@0
|
1111 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
1112 |
aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
|
sl@0
|
1113 |
|
sl@0
|
1114 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
1115 |
aGc.DrawText(KGujarati6, textRect6, 100, CGraphicsContext::ELeft);
|
sl@0
|
1116 |
//--------------------------------------------------------------------------
|
sl@0
|
1117 |
break;
|
sl@0
|
1118 |
|
sl@0
|
1119 |
//Gujarati Sample 3
|
sl@0
|
1120 |
|
sl@0
|
1121 |
case 11:
|
sl@0
|
1122 |
DisableShaping(&KGujarati7, textWithoutShaping );
|
sl@0
|
1123 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
1124 |
aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
|
sl@0
|
1125 |
|
sl@0
|
1126 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
1127 |
aGc.DrawText(KGujarati7, textRect2, 100, CGraphicsContext::ELeft);
|
sl@0
|
1128 |
|
sl@0
|
1129 |
//--------------------------------------------------------------------------
|
sl@0
|
1130 |
// Without the Layout Engine
|
sl@0
|
1131 |
DisableShaping(&KGujarati8, textWithoutShaping );
|
sl@0
|
1132 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
1133 |
aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
|
sl@0
|
1134 |
|
sl@0
|
1135 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
1136 |
aGc.DrawText(KGujarati8, textRect4, 100, CGraphicsContext::ELeft);
|
sl@0
|
1137 |
//--------------------------------------------------------------------------
|
sl@0
|
1138 |
// Without the Layout Engine
|
sl@0
|
1139 |
DisableShaping(&KGujarati9, textWithoutShaping );
|
sl@0
|
1140 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
1141 |
aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
|
sl@0
|
1142 |
|
sl@0
|
1143 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
1144 |
aGc.DrawText(KGujarati9, textRect6, 100, CGraphicsContext::ELeft);
|
sl@0
|
1145 |
//--------------------------------------------------------------------------
|
sl@0
|
1146 |
break;
|
sl@0
|
1147 |
//Gujarati Sample 4
|
sl@0
|
1148 |
case 12:
|
sl@0
|
1149 |
|
sl@0
|
1150 |
DisableShaping(&KTestGujarati1, textWithoutShaping );
|
sl@0
|
1151 |
aGc.DrawText(KTestGujarati1, textRect, 100, CGraphicsContext::ELeft);
|
sl@0
|
1152 |
|
sl@0
|
1153 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
1154 |
aGc.DrawText(KTestGujarati1, textRect2, 100, CGraphicsContext::ELeft);
|
sl@0
|
1155 |
|
sl@0
|
1156 |
//--------------------------------------------------------------------------
|
sl@0
|
1157 |
// Without the Layout Engine
|
sl@0
|
1158 |
|
sl@0
|
1159 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
1160 |
aGc.DrawText(KTestGujarati2, textRect3, 100, CGraphicsContext::ELeft);
|
sl@0
|
1161 |
// With the Layout Engine
|
sl@0
|
1162 |
|
sl@0
|
1163 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
1164 |
aGc.DrawText(KTestGujarati2, textRect4, 100, CGraphicsContext::ELeft);
|
sl@0
|
1165 |
//--------------------------------------------------------------------------
|
sl@0
|
1166 |
// Without the Layout Engine
|
sl@0
|
1167 |
|
sl@0
|
1168 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
1169 |
aGc.DrawText(KTestGujarati3, textRect5, 100, CGraphicsContext::ELeft);
|
sl@0
|
1170 |
// With the Layout Engine
|
sl@0
|
1171 |
|
sl@0
|
1172 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
1173 |
aGc.DrawText(KTestGujarati3, textRect6, 100, CGraphicsContext::ELeft);
|
sl@0
|
1174 |
//--------------------------------------------------------------------------
|
sl@0
|
1175 |
|
sl@0
|
1176 |
break;
|
sl@0
|
1177 |
//Bengali Sample 1
|
sl@0
|
1178 |
case 13:
|
sl@0
|
1179 |
// First draw in Black with shaping disabled
|
sl@0
|
1180 |
DisableShaping(&KBengali1, textWithoutShaping );
|
sl@0
|
1181 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
1182 |
aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
|
sl@0
|
1183 |
|
sl@0
|
1184 |
// Now in Blue with shaping
|
sl@0
|
1185 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
1186 |
aGc.DrawText(KBengali1, textRect2, 100, CGraphicsContext::ELeft);
|
sl@0
|
1187 |
|
sl@0
|
1188 |
//--------------------------------------------------------------------------
|
sl@0
|
1189 |
// Without the Layout Engine
|
sl@0
|
1190 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
1191 |
DisableShaping(&KBengali2, textWithoutShaping );
|
sl@0
|
1192 |
aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
|
sl@0
|
1193 |
|
sl@0
|
1194 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
1195 |
aGc.DrawText(KBengali2, textRect4, 100, CGraphicsContext::ELeft);
|
sl@0
|
1196 |
//--------------------------------------------------------------------------
|
sl@0
|
1197 |
// Without the Layout Engine
|
sl@0
|
1198 |
DisableShaping(&KBengali3, textWithoutShaping );
|
sl@0
|
1199 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
1200 |
aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
|
sl@0
|
1201 |
|
sl@0
|
1202 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
1203 |
aGc.DrawText(KBengali3, textRect6, 100, CGraphicsContext::ELeft);
|
sl@0
|
1204 |
//--------------------------------------------------------------------------
|
sl@0
|
1205 |
break;
|
sl@0
|
1206 |
//Bengali Sample 2
|
sl@0
|
1207 |
|
sl@0
|
1208 |
case 14:
|
sl@0
|
1209 |
DisableShaping(&KBengali4, textWithoutShaping );
|
sl@0
|
1210 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
1211 |
aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
|
sl@0
|
1212 |
|
sl@0
|
1213 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
1214 |
aGc.DrawText(KBengali4, textRect2, 100, CGraphicsContext::ELeft);
|
sl@0
|
1215 |
|
sl@0
|
1216 |
//--------------------------------------------------------------------------
|
sl@0
|
1217 |
// Without the Layout Engine
|
sl@0
|
1218 |
DisableShaping(&KBengali5, textWithoutShaping );
|
sl@0
|
1219 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
1220 |
aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
|
sl@0
|
1221 |
|
sl@0
|
1222 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
1223 |
aGc.DrawText(KBengali5, textRect4, 100, CGraphicsContext::ELeft);
|
sl@0
|
1224 |
//--------------------------------------------------------------------------
|
sl@0
|
1225 |
// Without the Layout Engine
|
sl@0
|
1226 |
DisableShaping(&KBengali6, textWithoutShaping );
|
sl@0
|
1227 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
1228 |
aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
|
sl@0
|
1229 |
|
sl@0
|
1230 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
1231 |
aGc.DrawText(KBengali6, textRect6, 100, CGraphicsContext::ELeft);
|
sl@0
|
1232 |
//--------------------------------------------------------------------------
|
sl@0
|
1233 |
break;
|
sl@0
|
1234 |
|
sl@0
|
1235 |
//Bengali Sample 3
|
sl@0
|
1236 |
|
sl@0
|
1237 |
case 15:
|
sl@0
|
1238 |
DisableShaping(&KBengali7, textWithoutShaping );
|
sl@0
|
1239 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
1240 |
aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
|
sl@0
|
1241 |
|
sl@0
|
1242 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
1243 |
aGc.DrawText(KBengali7, textRect2, 100, CGraphicsContext::ELeft);
|
sl@0
|
1244 |
|
sl@0
|
1245 |
//--------------------------------------------------------------------------
|
sl@0
|
1246 |
// Without the Layout Engine
|
sl@0
|
1247 |
DisableShaping(&KBengali8, textWithoutShaping );
|
sl@0
|
1248 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
1249 |
aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
|
sl@0
|
1250 |
|
sl@0
|
1251 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
1252 |
aGc.DrawText(KBengali8, textRect4, 100, CGraphicsContext::ELeft);
|
sl@0
|
1253 |
//--------------------------------------------------------------------------
|
sl@0
|
1254 |
// Without the Layout Engine
|
sl@0
|
1255 |
DisableShaping(&KBengali9, textWithoutShaping );
|
sl@0
|
1256 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
1257 |
aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
|
sl@0
|
1258 |
|
sl@0
|
1259 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
1260 |
aGc.DrawText(KBengali9, textRect6, 100, CGraphicsContext::ELeft);
|
sl@0
|
1261 |
//--------------------------------------------------------------------------
|
sl@0
|
1262 |
break;
|
sl@0
|
1263 |
//Bengali Sample 4
|
sl@0
|
1264 |
case 16:
|
sl@0
|
1265 |
|
sl@0
|
1266 |
DisableShaping(&KTestBengali1, textWithoutShaping );
|
sl@0
|
1267 |
aGc.DrawText(KTestBengali1, textRect, 100, CGraphicsContext::ELeft);
|
sl@0
|
1268 |
|
sl@0
|
1269 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
1270 |
aGc.DrawText(KTestBengali1, textRect2, 100, CGraphicsContext::ELeft);
|
sl@0
|
1271 |
|
sl@0
|
1272 |
//--------------------------------------------------------------------------
|
sl@0
|
1273 |
// Without the Layout Engine
|
sl@0
|
1274 |
|
sl@0
|
1275 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
1276 |
aGc.DrawText(KTestBengali2, textRect3, 100, CGraphicsContext::ELeft);
|
sl@0
|
1277 |
// With the Layout Engine
|
sl@0
|
1278 |
|
sl@0
|
1279 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
1280 |
aGc.DrawText(KTestBengali2, textRect4, 100, CGraphicsContext::ELeft);
|
sl@0
|
1281 |
//--------------------------------------------------------------------------
|
sl@0
|
1282 |
// Without the Layout Engine
|
sl@0
|
1283 |
|
sl@0
|
1284 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
1285 |
aGc.DrawText(KTestBengali3, textRect5, 100, CGraphicsContext::ELeft);
|
sl@0
|
1286 |
// With the Layout Engine
|
sl@0
|
1287 |
|
sl@0
|
1288 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
1289 |
aGc.DrawText(KTestBengali3, textRect6, 100, CGraphicsContext::ELeft);
|
sl@0
|
1290 |
//--------------------------------------------------------------------------
|
sl@0
|
1291 |
|
sl@0
|
1292 |
break;
|
sl@0
|
1293 |
|
sl@0
|
1294 |
case 17:
|
sl@0
|
1295 |
//Tamil Sample 1
|
sl@0
|
1296 |
// First draw in Black with shaping disabled
|
sl@0
|
1297 |
DisableShaping(&KTamil1, textWithoutShaping );
|
sl@0
|
1298 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
1299 |
aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
|
sl@0
|
1300 |
|
sl@0
|
1301 |
// Now in Blue with shaping
|
sl@0
|
1302 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
1303 |
aGc.DrawText(KTamil1, textRect2, 100, CGraphicsContext::ELeft);
|
sl@0
|
1304 |
|
sl@0
|
1305 |
//--------------------------------------------------------------------------
|
sl@0
|
1306 |
// Without the Layout Engine
|
sl@0
|
1307 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
1308 |
DisableShaping(&KTamil2, textWithoutShaping );
|
sl@0
|
1309 |
aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
|
sl@0
|
1310 |
|
sl@0
|
1311 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
1312 |
aGc.DrawText(KTamil2, textRect4, 100, CGraphicsContext::ELeft);
|
sl@0
|
1313 |
//--------------------------------------------------------------------------
|
sl@0
|
1314 |
// Without the Layout Engine
|
sl@0
|
1315 |
DisableShaping(&KTamil3, textWithoutShaping );
|
sl@0
|
1316 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
1317 |
aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
|
sl@0
|
1318 |
|
sl@0
|
1319 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
1320 |
aGc.DrawText(KTamil3, textRect6, 100, CGraphicsContext::ELeft);
|
sl@0
|
1321 |
//--------------------------------------------------------------------------
|
sl@0
|
1322 |
break;
|
sl@0
|
1323 |
case 18:
|
sl@0
|
1324 |
//Tamil Sample 2
|
sl@0
|
1325 |
// First draw in Black with shaping disabled
|
sl@0
|
1326 |
DisableShaping(&KTamil4, textWithoutShaping );
|
sl@0
|
1327 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
1328 |
aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
|
sl@0
|
1329 |
|
sl@0
|
1330 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
1331 |
aGc.DrawText(KTamil4, textRect2, 100, CGraphicsContext::ELeft);
|
sl@0
|
1332 |
|
sl@0
|
1333 |
//--------------------------------------------------------------------------
|
sl@0
|
1334 |
// Without the Layout Engine
|
sl@0
|
1335 |
DisableShaping(&KTamil5, textWithoutShaping );
|
sl@0
|
1336 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
1337 |
aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
|
sl@0
|
1338 |
|
sl@0
|
1339 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
1340 |
aGc.DrawText(KTamil5, textRect4, 100, CGraphicsContext::ELeft);
|
sl@0
|
1341 |
//--------------------------------------------------------------------------
|
sl@0
|
1342 |
// Without the Layout Engine
|
sl@0
|
1343 |
DisableShaping(&KTamil6, textWithoutShaping );
|
sl@0
|
1344 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
1345 |
aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
|
sl@0
|
1346 |
|
sl@0
|
1347 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
1348 |
aGc.DrawText(KTamil6, textRect6, 100, CGraphicsContext::ELeft);
|
sl@0
|
1349 |
//--------------------------------------------------------------------------
|
sl@0
|
1350 |
break;
|
sl@0
|
1351 |
|
sl@0
|
1352 |
case 19:
|
sl@0
|
1353 |
//Tamil Sample 3
|
sl@0
|
1354 |
// First draw in Black with shaping disabled
|
sl@0
|
1355 |
DisableShaping(&KTamil7, textWithoutShaping );
|
sl@0
|
1356 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
1357 |
aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
|
sl@0
|
1358 |
|
sl@0
|
1359 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
1360 |
aGc.DrawText(KTamil7, textRect2, 100, CGraphicsContext::ELeft);
|
sl@0
|
1361 |
|
sl@0
|
1362 |
//--------------------------------------------------------------------------
|
sl@0
|
1363 |
// Without the Layout Engine
|
sl@0
|
1364 |
DisableShaping(&KTamil8, textWithoutShaping );
|
sl@0
|
1365 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
1366 |
aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
|
sl@0
|
1367 |
|
sl@0
|
1368 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
1369 |
aGc.DrawText(KTamil8, textRect4, 100, CGraphicsContext::ELeft);
|
sl@0
|
1370 |
//--------------------------------------------------------------------------
|
sl@0
|
1371 |
// Without the Layout Engine
|
sl@0
|
1372 |
DisableShaping(&KTamil9, textWithoutShaping );
|
sl@0
|
1373 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
1374 |
aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
|
sl@0
|
1375 |
|
sl@0
|
1376 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
1377 |
aGc.DrawText(KTamil9, textRect6, 100, CGraphicsContext::ELeft);
|
sl@0
|
1378 |
//--------------------------------------------------------------------------
|
sl@0
|
1379 |
break;
|
sl@0
|
1380 |
case 20:
|
sl@0
|
1381 |
//Tamil Sample 4
|
sl@0
|
1382 |
// First draw in Black with shaping disabled
|
sl@0
|
1383 |
DisableShaping(&KTestTamil1, textWithoutShaping );
|
sl@0
|
1384 |
aGc.DrawText(KTestBengali1, textRect, 100, CGraphicsContext::ELeft);
|
sl@0
|
1385 |
|
sl@0
|
1386 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
1387 |
aGc.DrawText(KTestTamil1, textRect2, 100, CGraphicsContext::ELeft);
|
sl@0
|
1388 |
|
sl@0
|
1389 |
//--------------------------------------------------------------------------
|
sl@0
|
1390 |
// Without the Layout Engine
|
sl@0
|
1391 |
|
sl@0
|
1392 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
1393 |
aGc.DrawText(KTestTamil2, textRect3, 100, CGraphicsContext::ELeft);
|
sl@0
|
1394 |
// With the Layout Engine
|
sl@0
|
1395 |
|
sl@0
|
1396 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
1397 |
aGc.DrawText(KTestTamil2, textRect4, 100, CGraphicsContext::ELeft);
|
sl@0
|
1398 |
//--------------------------------------------------------------------------
|
sl@0
|
1399 |
// Without the Layout Engine
|
sl@0
|
1400 |
|
sl@0
|
1401 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
1402 |
aGc.DrawText(KTestTamil3, textRect5, 100, CGraphicsContext::ELeft);
|
sl@0
|
1403 |
// With the Layout Engine
|
sl@0
|
1404 |
|
sl@0
|
1405 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
1406 |
aGc.DrawText(KTestTamil3, textRect6, 100, CGraphicsContext::ELeft);
|
sl@0
|
1407 |
//--------------------------------------------------------------------------
|
sl@0
|
1408 |
|
sl@0
|
1409 |
break;
|
sl@0
|
1410 |
|
sl@0
|
1411 |
case 21:
|
sl@0
|
1412 |
//Telugu Sample 1
|
sl@0
|
1413 |
// First draw in Black with shaping disabled
|
sl@0
|
1414 |
DisableShaping(&KTelugu1, textWithoutShaping );
|
sl@0
|
1415 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
1416 |
aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
|
sl@0
|
1417 |
|
sl@0
|
1418 |
// Now in Blue with shaping
|
sl@0
|
1419 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
1420 |
aGc.DrawText(KTelugu1, textRect2, 100, CGraphicsContext::ELeft);
|
sl@0
|
1421 |
|
sl@0
|
1422 |
//--------------------------------------------------------------------------
|
sl@0
|
1423 |
// Without the Layout Engine
|
sl@0
|
1424 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
1425 |
DisableShaping(&KTelugu2, textWithoutShaping );
|
sl@0
|
1426 |
aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
|
sl@0
|
1427 |
|
sl@0
|
1428 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
1429 |
aGc.DrawText(KTelugu2, textRect4, 100, CGraphicsContext::ELeft);
|
sl@0
|
1430 |
//--------------------------------------------------------------------------
|
sl@0
|
1431 |
// Without the Layout Engine
|
sl@0
|
1432 |
DisableShaping(&KTelugu3, textWithoutShaping );
|
sl@0
|
1433 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
1434 |
aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
|
sl@0
|
1435 |
|
sl@0
|
1436 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
1437 |
aGc.DrawText(KTelugu3, textRect6, 100, CGraphicsContext::ELeft);
|
sl@0
|
1438 |
//--------------------------------------------------------------------------
|
sl@0
|
1439 |
break;
|
sl@0
|
1440 |
|
sl@0
|
1441 |
case 22:
|
sl@0
|
1442 |
//Telugu Sample 2
|
sl@0
|
1443 |
// First draw in Black with shaping disabled
|
sl@0
|
1444 |
DisableShaping(&KTelugu4, textWithoutShaping );
|
sl@0
|
1445 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
1446 |
aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
|
sl@0
|
1447 |
|
sl@0
|
1448 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
1449 |
aGc.DrawText(KTelugu4, textRect2, 100, CGraphicsContext::ELeft);
|
sl@0
|
1450 |
|
sl@0
|
1451 |
//--------------------------------------------------------------------------
|
sl@0
|
1452 |
// Without the Layout Engine
|
sl@0
|
1453 |
DisableShaping(&KTelugu5, textWithoutShaping );
|
sl@0
|
1454 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
1455 |
aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
|
sl@0
|
1456 |
|
sl@0
|
1457 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
1458 |
aGc.DrawText(KTelugu5, textRect4, 100, CGraphicsContext::ELeft);
|
sl@0
|
1459 |
//--------------------------------------------------------------------------
|
sl@0
|
1460 |
// Without the Layout Engine
|
sl@0
|
1461 |
DisableShaping(&KTelugu6, textWithoutShaping );
|
sl@0
|
1462 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
1463 |
aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
|
sl@0
|
1464 |
|
sl@0
|
1465 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
1466 |
aGc.DrawText(KTelugu6, textRect6, 100, CGraphicsContext::ELeft);
|
sl@0
|
1467 |
//--------------------------------------------------------------------------
|
sl@0
|
1468 |
break;
|
sl@0
|
1469 |
|
sl@0
|
1470 |
case 23:
|
sl@0
|
1471 |
//Telugu Sample 3
|
sl@0
|
1472 |
// First draw in Black with shaping disabled
|
sl@0
|
1473 |
DisableShaping(&KTelugu7, textWithoutShaping );
|
sl@0
|
1474 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
1475 |
aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
|
sl@0
|
1476 |
|
sl@0
|
1477 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
1478 |
aGc.DrawText(KTelugu7, textRect2, 100, CGraphicsContext::ELeft);
|
sl@0
|
1479 |
|
sl@0
|
1480 |
//--------------------------------------------------------------------------
|
sl@0
|
1481 |
// Without the Layout Engine
|
sl@0
|
1482 |
DisableShaping(&KTelugu8, textWithoutShaping );
|
sl@0
|
1483 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
1484 |
aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
|
sl@0
|
1485 |
|
sl@0
|
1486 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
1487 |
aGc.DrawText(KTelugu8, textRect4, 100, CGraphicsContext::ELeft);
|
sl@0
|
1488 |
//--------------------------------------------------------------------------
|
sl@0
|
1489 |
// Without the Layout Engine
|
sl@0
|
1490 |
DisableShaping(&KTelugu9, textWithoutShaping );
|
sl@0
|
1491 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
1492 |
aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
|
sl@0
|
1493 |
|
sl@0
|
1494 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
1495 |
aGc.DrawText(KTelugu9, textRect6, 100, CGraphicsContext::ELeft);
|
sl@0
|
1496 |
//--------------------------------------------------------------------------
|
sl@0
|
1497 |
break;
|
sl@0
|
1498 |
|
sl@0
|
1499 |
case 24:
|
sl@0
|
1500 |
//Telugu Sample 4
|
sl@0
|
1501 |
// First draw in Black with shaping disabled
|
sl@0
|
1502 |
DisableShaping(&KTestTelugu1, textWithoutShaping );
|
sl@0
|
1503 |
aGc.DrawText(KTestTelugu1, textRect, 100, CGraphicsContext::ELeft);
|
sl@0
|
1504 |
|
sl@0
|
1505 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
1506 |
aGc.DrawText(KTestTelugu1, textRect2, 100, CGraphicsContext::ELeft);
|
sl@0
|
1507 |
|
sl@0
|
1508 |
//--------------------------------------------------------------------------
|
sl@0
|
1509 |
// Without the Layout Engine
|
sl@0
|
1510 |
|
sl@0
|
1511 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
1512 |
aGc.DrawText(KTestTelugu2, textRect3, 100, CGraphicsContext::ELeft);
|
sl@0
|
1513 |
// With the Layout Engine
|
sl@0
|
1514 |
|
sl@0
|
1515 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
1516 |
aGc.DrawText(KTestTelugu2, textRect4, 100, CGraphicsContext::ELeft);
|
sl@0
|
1517 |
//--------------------------------------------------------------------------
|
sl@0
|
1518 |
// Without the Layout Engine
|
sl@0
|
1519 |
|
sl@0
|
1520 |
aGc.SetPenColor(KRgbBlack);
|
sl@0
|
1521 |
aGc.DrawText(KTestTelugu3, textRect5, 100, CGraphicsContext::ELeft);
|
sl@0
|
1522 |
// With the Layout Engine
|
sl@0
|
1523 |
|
sl@0
|
1524 |
aGc.SetPenColor(KRgbBlue);
|
sl@0
|
1525 |
aGc.DrawText(KTestTelugu3, textRect6, 100, CGraphicsContext::ELeft);
|
sl@0
|
1526 |
//--------------------------------------------------------------------------
|
sl@0
|
1527 |
break;
|
sl@0
|
1528 |
default:
|
sl@0
|
1529 |
break;
|
sl@0
|
1530 |
}
|
sl@0
|
1531 |
// Discard and destroy the font
|
sl@0
|
1532 |
aGc.DiscardFont();
|
sl@0
|
1533 |
screenDevice->ReleaseFont(myFont);
|
sl@0
|
1534 |
}
|
sl@0
|
1535 |
|
sl@0
|
1536 |
// CHindiAppUi
|
sl@0
|
1537 |
|
sl@0
|
1538 |
CHindiAppUi::~CHindiAppUi()
|
sl@0
|
1539 |
{
|
sl@0
|
1540 |
RemoveFromStack(iAppView);
|
sl@0
|
1541 |
delete iAppView;
|
sl@0
|
1542 |
}
|
sl@0
|
1543 |
|
sl@0
|
1544 |
void CHindiAppUi::ConstructL()
|
sl@0
|
1545 |
{
|
sl@0
|
1546 |
BaseConstructL();
|
sl@0
|
1547 |
iAppView=new(ELeave) CHindiContainer;
|
sl@0
|
1548 |
iAppView->ConstructL(ClientRect());
|
sl@0
|
1549 |
AddToStackL(iAppView);
|
sl@0
|
1550 |
}
|
sl@0
|
1551 |
|
sl@0
|
1552 |
void CHindiAppUi::HandleCommandL(TInt aCommand)
|
sl@0
|
1553 |
{
|
sl@0
|
1554 |
TCharFormat charFormat;
|
sl@0
|
1555 |
TCharFormatMask charMask;
|
sl@0
|
1556 |
|
sl@0
|
1557 |
switch (aCommand)
|
sl@0
|
1558 |
{
|
sl@0
|
1559 |
case EEikCmdExit:
|
sl@0
|
1560 |
Exit();
|
sl@0
|
1561 |
break;
|
sl@0
|
1562 |
|
sl@0
|
1563 |
case EEikCmdFont:
|
sl@0
|
1564 |
if ( CEikFontDialog::RunDlgLD(charFormat, charMask, EGulNoSymbolFonts, iCoeEnv->ScreenDevice()) )
|
sl@0
|
1565 |
{
|
sl@0
|
1566 |
// save the selected font in the view
|
sl@0
|
1567 |
iAppView->SetHindiFont( charFormat.iFontSpec );
|
sl@0
|
1568 |
iAppView->DrawNow();
|
sl@0
|
1569 |
}
|
sl@0
|
1570 |
break;
|
sl@0
|
1571 |
|
sl@0
|
1572 |
case EEikCmdSample1:
|
sl@0
|
1573 |
iAppView->ChangeSample(1);
|
sl@0
|
1574 |
iAppView->DrawNow();
|
sl@0
|
1575 |
break;
|
sl@0
|
1576 |
case EEikCmdSample2:
|
sl@0
|
1577 |
iAppView->ChangeSample(2);
|
sl@0
|
1578 |
iAppView->DrawNow();
|
sl@0
|
1579 |
break;
|
sl@0
|
1580 |
case EEikCmdSample3:
|
sl@0
|
1581 |
iAppView->ChangeSample(3);
|
sl@0
|
1582 |
iAppView->DrawNow();
|
sl@0
|
1583 |
break;
|
sl@0
|
1584 |
case EEikCmdSample4:
|
sl@0
|
1585 |
iAppView->ChangeSample(4);
|
sl@0
|
1586 |
iAppView->DrawNow();
|
sl@0
|
1587 |
break;
|
sl@0
|
1588 |
case EEikCmdSample5:
|
sl@0
|
1589 |
iAppView->ChangeSample(5);
|
sl@0
|
1590 |
iAppView->DrawNow();
|
sl@0
|
1591 |
break;
|
sl@0
|
1592 |
case EEikCmdSample6:
|
sl@0
|
1593 |
iAppView->ChangeSample(6);
|
sl@0
|
1594 |
iAppView->DrawNow();
|
sl@0
|
1595 |
break;
|
sl@0
|
1596 |
case EEikCmdSample7:
|
sl@0
|
1597 |
iAppView->ChangeSample(7);
|
sl@0
|
1598 |
iAppView->DrawNow();
|
sl@0
|
1599 |
break;
|
sl@0
|
1600 |
case EEikCmdSample8:
|
sl@0
|
1601 |
iAppView->ChangeSample(8);
|
sl@0
|
1602 |
iAppView->DrawNow();
|
sl@0
|
1603 |
break;
|
sl@0
|
1604 |
case EEikCmdSample9:
|
sl@0
|
1605 |
iAppView->ChangeSample(9);
|
sl@0
|
1606 |
iAppView->DrawNow();
|
sl@0
|
1607 |
break;
|
sl@0
|
1608 |
case EEikCmdSample10:
|
sl@0
|
1609 |
iAppView->ChangeSample(10);
|
sl@0
|
1610 |
iAppView->DrawNow();
|
sl@0
|
1611 |
break;
|
sl@0
|
1612 |
case EEikCmdSample11:
|
sl@0
|
1613 |
iAppView->ChangeSample(11);
|
sl@0
|
1614 |
iAppView->DrawNow();
|
sl@0
|
1615 |
break;
|
sl@0
|
1616 |
case EEikCmdSample12:
|
sl@0
|
1617 |
iAppView->ChangeSample(12);
|
sl@0
|
1618 |
iAppView->DrawNow();
|
sl@0
|
1619 |
case EEikCmdSample13:
|
sl@0
|
1620 |
iAppView->ChangeSample(13);
|
sl@0
|
1621 |
iAppView->DrawNow();
|
sl@0
|
1622 |
break;
|
sl@0
|
1623 |
case EEikCmdSample14:
|
sl@0
|
1624 |
iAppView->ChangeSample(14);
|
sl@0
|
1625 |
iAppView->DrawNow();
|
sl@0
|
1626 |
break;
|
sl@0
|
1627 |
case EEikCmdSample15:
|
sl@0
|
1628 |
iAppView->ChangeSample(15);
|
sl@0
|
1629 |
iAppView->DrawNow();
|
sl@0
|
1630 |
break;
|
sl@0
|
1631 |
case EEikCmdSample16:
|
sl@0
|
1632 |
iAppView->ChangeSample(16);
|
sl@0
|
1633 |
iAppView->DrawNow();
|
sl@0
|
1634 |
break;
|
sl@0
|
1635 |
case EEikCmdSample17:
|
sl@0
|
1636 |
iAppView->ChangeSample(17);
|
sl@0
|
1637 |
iAppView->DrawNow();
|
sl@0
|
1638 |
break;
|
sl@0
|
1639 |
case EEikCmdSample18:
|
sl@0
|
1640 |
iAppView->ChangeSample(18);
|
sl@0
|
1641 |
iAppView->DrawNow();
|
sl@0
|
1642 |
break;
|
sl@0
|
1643 |
case EEikCmdSample19:
|
sl@0
|
1644 |
iAppView->ChangeSample(19);
|
sl@0
|
1645 |
iAppView->DrawNow();
|
sl@0
|
1646 |
break;
|
sl@0
|
1647 |
case EEikCmdSample20:
|
sl@0
|
1648 |
iAppView->ChangeSample(20);
|
sl@0
|
1649 |
iAppView->DrawNow();
|
sl@0
|
1650 |
break;
|
sl@0
|
1651 |
case EEikCmdSample21:
|
sl@0
|
1652 |
iAppView->ChangeSample(21);
|
sl@0
|
1653 |
iAppView->DrawNow();
|
sl@0
|
1654 |
break;
|
sl@0
|
1655 |
case EEikCmdSample22:
|
sl@0
|
1656 |
iAppView->ChangeSample(22);
|
sl@0
|
1657 |
iAppView->DrawNow();
|
sl@0
|
1658 |
break;
|
sl@0
|
1659 |
case EEikCmdSample23:
|
sl@0
|
1660 |
iAppView->ChangeSample(23);
|
sl@0
|
1661 |
iAppView->DrawNow();
|
sl@0
|
1662 |
break;
|
sl@0
|
1663 |
case EEikCmdSample24:
|
sl@0
|
1664 |
iAppView->ChangeSample(24);
|
sl@0
|
1665 |
iAppView->DrawNow();
|
sl@0
|
1666 |
break;
|
sl@0
|
1667 |
case EEikCmdMakeHindiTxt:
|
sl@0
|
1668 |
iAppView->CreateHindiTxtFile();
|
sl@0
|
1669 |
break;
|
sl@0
|
1670 |
case EEikCmdMakeKannadaTxt:
|
sl@0
|
1671 |
iAppView->CreateKannadaTxtFile();
|
sl@0
|
1672 |
break;
|
sl@0
|
1673 |
case EEikCmdMakeGujaratiTxt:
|
sl@0
|
1674 |
iAppView->CreateGujaratiTxtFile();
|
sl@0
|
1675 |
break;
|
sl@0
|
1676 |
case EEikCmdMakeBengaliTxt:
|
sl@0
|
1677 |
iAppView->CreateBengaliTxtFile();
|
sl@0
|
1678 |
break;
|
sl@0
|
1679 |
case EEikCmdMakeTamilTxt:
|
sl@0
|
1680 |
iAppView->CreateTamilTxtFile();
|
sl@0
|
1681 |
break;
|
sl@0
|
1682 |
case EEikCmdMakeTeluguTxt:
|
sl@0
|
1683 |
iAppView->CreateTeluguTxtFile();
|
sl@0
|
1684 |
break;
|
sl@0
|
1685 |
default:
|
sl@0
|
1686 |
Panic(0);
|
sl@0
|
1687 |
break;
|
sl@0
|
1688 |
}
|
sl@0
|
1689 |
}
|
sl@0
|
1690 |
|
sl@0
|
1691 |
TKeyResponse CHindiAppUi::HandleKeyEventL(const TKeyEvent& aKeyEvent, TEventCode /* aType */)
|
sl@0
|
1692 |
{
|
sl@0
|
1693 |
switch (aKeyEvent.iCode)
|
sl@0
|
1694 |
{
|
sl@0
|
1695 |
case EKeyUpArrow:
|
sl@0
|
1696 |
// increase font size
|
sl@0
|
1697 |
iAppView->SetFontSize(iAppView->GetFontSize() +20);
|
sl@0
|
1698 |
break;
|
sl@0
|
1699 |
case EKeyDownArrow:
|
sl@0
|
1700 |
// increase font size
|
sl@0
|
1701 |
iAppView->SetFontSize(iAppView->GetFontSize() -20);
|
sl@0
|
1702 |
break;
|
sl@0
|
1703 |
case EKeyLeftArrow:
|
sl@0
|
1704 |
// next sample
|
sl@0
|
1705 |
iAppView->ChangeSample(iAppView->GetSample()-1);
|
sl@0
|
1706 |
break;
|
sl@0
|
1707 |
case EKeyRightArrow:
|
sl@0
|
1708 |
// increase font size
|
sl@0
|
1709 |
iAppView->ChangeSample(iAppView->GetSample()+1);
|
sl@0
|
1710 |
break;
|
sl@0
|
1711 |
default:
|
sl@0
|
1712 |
return EKeyWasNotConsumed;
|
sl@0
|
1713 |
}
|
sl@0
|
1714 |
iAppView->DrawNow();
|
sl@0
|
1715 |
return EKeyWasConsumed;
|
sl@0
|
1716 |
}
|
sl@0
|
1717 |
|
sl@0
|
1718 |
// CHindiEikDocument
|
sl@0
|
1719 |
|
sl@0
|
1720 |
CEikAppUi* CHindiEikDocument::CreateAppUiL()
|
sl@0
|
1721 |
{
|
sl@0
|
1722 |
return(new(ELeave) CHindiAppUi);
|
sl@0
|
1723 |
}
|
sl@0
|
1724 |
|
sl@0
|
1725 |
void CHindiEikDocument::ConstructL()
|
sl@0
|
1726 |
{
|
sl@0
|
1727 |
}
|
sl@0
|
1728 |
|
sl@0
|
1729 |
|
sl@0
|
1730 |
// CHindiApplication
|
sl@0
|
1731 |
|
sl@0
|
1732 |
TUid CHindiApplication::AppDllUid() const
|
sl@0
|
1733 |
{
|
sl@0
|
1734 |
return KUidHindiDemoApp;
|
sl@0
|
1735 |
}
|
sl@0
|
1736 |
|
sl@0
|
1737 |
CApaDocument* CHindiApplication::CreateDocumentL()
|
sl@0
|
1738 |
{
|
sl@0
|
1739 |
CHindiEikDocument* document=new(ELeave) CHindiEikDocument(*this);
|
sl@0
|
1740 |
CleanupStack::PushL(document);
|
sl@0
|
1741 |
document->ConstructL();
|
sl@0
|
1742 |
CleanupStack::Pop();
|
sl@0
|
1743 |
return(document);
|
sl@0
|
1744 |
}
|
sl@0
|
1745 |
|
sl@0
|
1746 |
//
|
sl@0
|
1747 |
// EXPORTed functions
|
sl@0
|
1748 |
//
|
sl@0
|
1749 |
|
sl@0
|
1750 |
// for MCL build
|
sl@0
|
1751 |
#ifdef __SECURE_DATA__
|
sl@0
|
1752 |
|
sl@0
|
1753 |
static CApaApplication* NewApplication()
|
sl@0
|
1754 |
{
|
sl@0
|
1755 |
return new CHindiApplication;
|
sl@0
|
1756 |
}
|
sl@0
|
1757 |
|
sl@0
|
1758 |
GLDEF_C TInt E32Main()
|
sl@0
|
1759 |
{
|
sl@0
|
1760 |
return EikStart::RunApplication(&NewApplication);
|
sl@0
|
1761 |
}
|
sl@0
|
1762 |
|
sl@0
|
1763 |
#else
|
sl@0
|
1764 |
|
sl@0
|
1765 |
// for 8.1 build
|
sl@0
|
1766 |
EXPORT_C CApaApplication* NewApplication()
|
sl@0
|
1767 |
{
|
sl@0
|
1768 |
return new CHindiApplication;
|
sl@0
|
1769 |
}
|
sl@0
|
1770 |
|
sl@0
|
1771 |
GLDEF_C TInt E32Dll(TDllReason)
|
sl@0
|
1772 |
{
|
sl@0
|
1773 |
return KErrNone;
|
sl@0
|
1774 |
}
|
sl@0
|
1775 |
|
sl@0
|
1776 |
#endif
|