os/textandloc/fontservices/textshaperplugin/test/HindiDemo/source/hindiDemoApp.cpp
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/textandloc/fontservices/textshaperplugin/test/HindiDemo/source/hindiDemoApp.cpp	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,1776 @@
     1.4 +/*
     1.5 +* Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +* All rights reserved.
     1.7 +* This component and the accompanying materials are made available
     1.8 +* under the terms of "Eclipse Public License v1.0"
     1.9 +* which accompanies this distribution, and is available
    1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.11 +*
    1.12 +* Initial Contributors:
    1.13 +* Nokia Corporation - initial contribution.
    1.14 +*
    1.15 +* Contributors:
    1.16 +*
    1.17 +* Description: 
    1.18 +* hindiDemo.cpp
    1.19 +* hindiDemo application
    1.20 +*
    1.21 +*/
    1.22 +
    1.23 +
    1.24 +#include <e32keys.h>
    1.25 +#include <coemain.h>
    1.26 +#include <eikenv.h>
    1.27 +#include <eikdef.h>
    1.28 +#include <eikstart.h>
    1.29 +#include <techview/eikfontd.h>
    1.30 +
    1.31 +#include <hindidemo.rsg>
    1.32 +#include "hindiDemo.hrh"
    1.33 +#include "hindiDemoApp.h"
    1.34 +#include <techview/eiklabel.h>
    1.35 +#include <techview/eikcmbut.h>
    1.36 +#include <techview/eikrted.h>
    1.37 +#include <barsread.h> 
    1.38 +#include <badesca.h> 
    1.39 +
    1.40 +
    1.41 +// hindi sample text 
    1.42 +// sample 1
    1.43 +_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");
    1.44 +_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");
    1.45 +_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");
    1.46 +
    1.47 +// sample 2
    1.48 +_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");
    1.49 +_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");
    1.50 +_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");
    1.51 +
    1.52 +// sample 3
    1.53 +_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");
    1.54 +_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");
    1.55 +_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");
    1.56 +
    1.57 +// test 4 -  two character test data
    1.58 +_LIT16(KTest1,"\x091c\x092e\x094d\x0918\x0940\x0902\x091a\x094d\x092f\x0940");
    1.59 +_LIT16(KTest2,"\x092e\x092e\x0020");
    1.60 +_LIT16(KTest3,"\x0915\x094D\x0937\x0924\x094D\x0930\x093F\x092F\x0020");
    1.61 +
    1.62 +//Kannada sample text
    1.63 +// sample 1
    1.64 +_LIT16(KKannada1,"\x0CA8\x0CAE\x0CCD\x0CAE\x0020\x0CB0\x0CBE\x0CB7\x0CCD\x0C9F\x0CCD\x0CB0\x0020\x0CAD\x0CBE\x0CB0\x0CA4");
    1.65 +_LIT16(KKannada2,"\x0CB2\x0C95\x0CCD\x0CB7\x0CCD\x0CAE\x0CCD\x0CAF\x0CBE");
    1.66 +_LIT16(KKannada3,"\x0C95\x0CCD\x0C95\x0CCD\x0C95\x0CCD\x0C95\x0CCD\x0C95\x0CCB\x0C82");
    1.67 +// sample 2
    1.68 +_LIT16(KKannada4,"\x0CB6\x0CCD\x0CB0\x0CC0\x0020\x0CAD\x0C97\x0CB5\x0CBE\x0CA8\x0CC1\x0CB5\x0CBE\x0C9A\x0C95\x0CC1\x0CA4\x0CB8\x0CCD\x0CA4\x0CCD\x0CB5\x0CBE\x0020\x0C95\x0CB6\x0CCD\x0CAE\x0CB2\x0CAE\x0CBF\x0CA6\x0C82\x0020\x0CB5\x0CBF\x0CB7\x0CAE\x0020\x0CB8\x0CAE\x0CC1\x0CAA\x0CB8\x0CCD\x0CA5\x0CBF\x0CA4\x0CAE\x0CCD");
    1.69 +_LIT16(KKannada5,"\x0C85\x0CA8\x0CBE\x0CB0\x0CCD\x0CAF\x0C9C\x0CC1\x0CB7\x0CCD\x0CA0\x0CAE\x0CB8\x0CCD\x0CB5\x0CB0\x0CCD\x0C97\x0CCD\x0CAF\x0CAE\x0C95\x0CC0\x0CB0\x0CCD\x0CA4\x0CBF\x0C95\x0CB0\x0CAE\x0CB0\x0CCD\x0C9C\x0CC1\x0CA8");
    1.70 +_LIT16(KKannada6,"\x0C95\x0CCD\x0CB2\x0CC8\x0CAC\x0CCD\x0CAF\x0C82\x0020\x0CAE\x0CBE\x0020\x0CB8\x0CCD\x0CAE\x0020\x0C97\x0CAE\x0C83\x0020\x0CAA\x0CBE\x0CB0\x0CCD\x0CA5\x0020\x0CA8\x0CC8\x0CA4\x0CA4\x0CCD\x0CA4\x0CCD\x0CB5\x0CAF\x0CCD\x0CAF\x0CC1\x0CAA\x0CAA\x0CA7\x0CCD\x0CAF\x0CA4\x0CC7");
    1.71 +// sample 3
    1.72 +_LIT16(KKannada7,"\x0CB8\x0CC1\x0CAA\x0CCD\x0CB0\x0CB8\x0CBE\x0CA6\x0C83\x0020\x0CAA\x0CCD\x0CB0\x0CB8\x0CA8\x0CCD\x0CA8\x0CBE\x0CA4\x0CCD\x0CAE\x0CBE");
    1.73 +_LIT16(KKannada8,"\x0CB5\x0CBF\x0CB6\x0CCD\x0CB5\x0CA7\x0CC3\x0C97\x0CCD\x0CB5\x0CBF\x0CB6\x0CCD\x0CB5\x0CAD\x0CC1\x0C97\x0CCD\x0CB5\x0CBF\x0CAD\x0CC1\x0C83\x0CB8\x0CA4\x0CCD\x0C95\x0CB0\x0CBE\x0CA4\x0CBE\x0020\x0CB8\x0CA4\x0CCD\x0C95\x0CC3\x0C83\x0020\x0CB8\x0CBE\x0CA7\x0CC1");
    1.74 +_LIT16(KKannada9,"\x0CB0\x0CCD\x0C9C\x0CB9\x0CCD\x0CA8\x0CC1\x0CB0\x0CCD\x0CA8\x0CBE\x0CB0\x0CBE\x0CAF\x0CA3\x0CCB\x0020\x0CA8\x0CB0\x0C83\x0C95\x0CCD\x0CB7\x0CC1\x0CA6\x0CCD\x0CB0\x0C82\x0020\x0CB9\x0CC3\x0CA6\x0CAF\x0CA6\x0CCC\x0CB0\x0CCD\x0CAC\x0CB2\x0CCD\x0CAF\x0C82\x0020\x0CA4\x0CCD\x0CAF\x0C95\x0CCD\x0CA4\x0CCD\x0CB5\x0CCB\x0CA4\x0CCD\x0CA4\x0CBF\x0CB7\x0CCD\x0CA0\x0020\x0CAA\x0CB0\x0CA8\x0CCD\x0CA4\x0CAA");
    1.75 +
    1.76 +// Sample 4
    1.77 +_LIT16(KTestKannada1,"\x0C85\x0CB8\x0C82\x0C96\x0CCD\x0CAF\x0CC7\x0CAF\x0CCB\x0C85\x0CAA\x0CCD\x0CB0\x0CAE\x0CC7\x0CAF\x0CBE\x0CA4\x0CCD\x0CAE\x0CBE\x0020\x0CB5\x0CBF\x0CB6\x0CBF\x0CB7\x0CCD\x0C9F\x0C83");
    1.78 +_LIT16(KTestKannada2,"\x0CB6\x0CBF\x0CB7\x0CCD\x0C9F\x0C95\x0CC3\x0C9A\x0CCD\x0C9B\x0CC1\x0C9A\x0CBF\x0C83\x0CB8\x0CBF\x0CA6\x0CCD\x0CA7\x0CBE\x0CB0\x0CCD\x0CA5\x0C83\x0020\x0CB8\x0CBF\x0CA6\x0CCD\x0CA7\x0CB8\x0C82\x0C95\x0CB2\x0CCD\x0CAA\x0C83\x0020\x0CB8\x0CBF\x0CA6\x0CCD\x0CA7\x0CBF\x0CA6\x0C83");
    1.79 +_LIT16(KTestKannada3,"\x0CB8\x0CBF\x0CA6\x0CCD\x0CA7\x0CBF\x0CB8\x0CBE\x0CA7\x0CA8\x0C83");
    1.80 +
    1.81 +//Gujarati sample text
    1.82 +// sample 1
    1.83 +_LIT16(KGujarati1,"\x0AAA\x0ACD\x0AB0\x0AA4\x0ABF\x0AB7\x0ACD\x0AA0\x0ABE\x0020\x0A85\x0AA8\x0AC7\x0020\x0A85\x0AA7\x0ABF\x0A95\x0ABE\x0AB0\x0ACB\x0AA8\x0AC0\x0020\x0AA6\x0AC3\x0AB7\x0ACD\x0A9F\x0ABF\x0A8F\x0020\x0AB8\x0AB0\x0ACD\x0AB5\x0020\x0AAE\x0ABE\x0AA8\x0AB5\x0ACB\x0020\x0A9C\x0AA8\x0ACD\x0AAE\x0AA5\x0AC0\x0020\x0AB8\x0ACD\x0AB5\x0AA4\x0A82\x0AA4\x0ACD\x0AB0\x0020\x0A85\x0AA8\x0AC7\x0020\x0AB8\x0AAE\x0ABE\x0AA8\x0020\x0AB9\x0ACB\x0AAF\x0020\x0A9B\x0AC7");
    1.84 +_LIT16(KGujarati2,"\x0AA4\x0AC7\x0AAE\x0AA8\x0ABE\x0AAE\x0ABE\x0A82\x0020\x0AB5\x0ABF\x0A9A\x0ABE\x0AB0\x0AB6\x0A95\x0ACD\x0AA4\x0ABF\x0020\x0A85\x0AA8\x0AC7\x0020\x0A85\x0A82\x0AA4\x0A83\x0A95\x0AB0\x0AA3\x0020\x0AB9\x0ACB\x0AAF\x0020\x0A9B\x0AC7\x0020\x0A85\x0AA8\x0AC7\x0020\x0AA4\x0AC7\x0AAE\x0AA3\x0AC7\x0020\x0AAA\x0AB0\x0AB8\x0ACD\x0AAA\x0AB0\x0020\x0AAC\x0A82\x0AA7\x0AC1\x0AA4\x0ACD\x0AB5\x0AA8\x0AC0\x0020\x0AAD\x0ABE\x0AB5\x0AA8\x0ABE\x0AAF\x0AC0\x0020\x0AB5\x0AB0\x0ACD\x0AA4\x0AB5\x0AC1\x0A82");
    1.85 +_LIT16(KGujarati3,"\x0A9C\x0ACB\x0A88\x0A8F");
    1.86 +// sample 2
    1.87 +_LIT16(KGujarati4,"\x0AB0\x0ABE\x0AB7\x0ACD\x0A9F\x0ACD\x0AB0\x0AC0\x0AAF\x0020\x0AB6\x0ABF\x0A95\x0ACD\x0AB7\x0AA3\x0020\x0AA8\x0AC0\x0AA4\x0AC0\x0AA8\x0ABE\x0020\x0A85\x0AA8\x0AC1\x0AB8\x0A82\x0AA7\x0ABE\x0AA8\x0AAE\x0ABE\x0A82\x0020\x0AA4\x0AC8\x0AAF\x0ABE\x0AB0\x0020\x0AA5\x0AAF\x0AC7\x0AB2\x0ABE\x0020\x0AA8\x0AB5\x0ABE\x0020\x0A85\x0AAD\x0ACD\x0AAF\x0ABE\x0AB8\x0A95\x0ACD\x0AB0\x0AAE\x0AAE\x0ABE\x0A82");
    1.88 +_LIT16(KGujarati5,"\x0AA6\x0AB0\x0AC7\x0A95\x0020\x0AB5\x0ABF\x0AB7\x0AAF\x0AA8\x0ABE\x0020\x0AAA\x0ABE\x0AA0\x0ACD\x0AAF\x0A95\x0ACD\x0AB0\x0AAE\x0AA8\x0AC7\x0020\x0AB5\x0AA7\x0AC1\x0020\x0AB8\x0AA7\x0AA8\x0020\x0A85\x0AA8\x0AC7\x0020\x0A85\x0AA7\x0ACD\x0AAF\x0AA4\x0AA8\x0020\x0A95\x0AB0\x0AB5\x0ABE\x0AA8\x0ACB\x0020\x0AAA\x0ACD\x0AB0\x0AAF\x0AA4\x0ACD\x0AA8\x0020\x0A95\x0AB0\x0AB5\x0ABE\x0AAE\x0ABE\x0A82");
    1.89 +_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");
    1.90 +// sample 3
    1.91 +_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");
    1.92 +_LIT16(KGujarati8,"\x0A86\x0020\x0AB9\x0ABE\x0AB0\x0ACD\x0AA6\x0AB6\x0ACD\x0AAA\x0020\x0AA4\x0AA4\x0ACD\x0AA4\x0ACD\x0AB5\x0ACB\x0A82\x0AAE\x0ABE\x0A82\x0020\x0AAD\x0ABE\x0AB0\x0AA4\x0AA8\x0AC0\x0020\x0AB8\x0ACD\x0AB5\x0AA4\x0A82\x0AA4\x0ACD\x0AB0\x0ACD\x0AAF\x0020\x0A9A\x0AB3\x0AB5\x0AB3\x002C\x0020\x0A86\x0AB5\x0AA3\x0AC0\x0020\x0AAC\x0A82\x0AA7\x0ABE\x0AB0\x0AA3\x0AC0\x0AAF\x0020\x0A9C\x0AB5\x0ABE\x0AAC\x0AA6\x0ABE\x0AB0\x0AC0\x0A93\x002C");
    1.93 +_LIT16(KGujarati9,"\x0AB0\x0ABE\x0AB7\x0ACD\x0A9F\x0ACD\x0AB0\x0AC0\x0AAF\x0020\x0A90\x0A95\x0ACD\x0AAF\x002C\x0020\x0A86\x0AB5\x0AA3\x0ACB\x0020\x0AB8\x0ABE\x0A82\x0AB8\x0ACD\x0A95\x0AC3\x0AA4\x0ABF\x0A95\x0020\x0AB5\x0ABE\x0AB0\x0AB8\x0ACB\x002C\x0020\x0AB8\x0AB0\x0ACD\x0AB5\x0A9C\x0AA8\x0AB8\x0AAE\x0ABE\x0AA8\x0AA4\x0ABE\x002C\x0020\x0AB2\x0ACB\x0A95\x0AB6\x0ABE\x0AB9\x0AC0\x0020\x0A85\x0AA8\x0AC7");
    1.94 +
    1.95 +// Sample 4
    1.96 +_LIT16(KTestGujarati1,"\x0AAC\x0ABF\x0AA8\x0AB8\x0ABE\x0A82\x0AAA\x0ACD\x0AB0\x0AA6\x0ABE\x0AAF\x0ABF\x0A95\x0AA4\x0ABE\x002C\x0020\x0A9C\x0ABE\x0AA4\x0ABE\x0AAF\x0020\x0AB8\x0AAE\x0ABE\x0AA8\x0AA4\x0ABE\x002C\x0020\x0AAA\x0AB0\x0ACD\x0AAF\x0ABE\x0AB5\x0AB0\x0AA3\x0020\x0AB8\x0AC1\x0AB0\x0A95\x0ACD\x0AB7\x0ABE\x002C\x0020\x0AB8\x0ABE\x0AAE\x0ABE\x0A9C\x0ABF\x0A95\x0020\x0A85\x0AB5\x0AB0\x0ACB\x0AA7\x0ACB\x0AA8\x0AC1\x0A82");
    1.97 +_LIT16(KTestGujarati2,"\x0AA8\x0ABF\x0AB5\x0ABE\x0AB0\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");
    1.98 +_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");
    1.99 +
   1.100 +
   1.101 +//Bengali sample text
   1.102 +// sample 1
   1.103 +_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");
   1.104 +_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");
   1.105 +_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");
   1.106 +// sample 2
   1.107 +_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");
   1.108 +_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");
   1.109 +_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");
   1.110 +// sample 3
   1.111 +_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");
   1.112 +_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");
   1.113 +_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");
   1.114 +
   1.115 +// Sample 4
   1.116 +_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");
   1.117 +_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");
   1.118 +_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");
   1.119 +
   1.120 +
   1.121 +
   1.122 +//Tamil sample text
   1.123 +// sample 1
   1.124 +_LIT16(KTamil1,"\x0BAA\x0BBE\x0BAF\x0BBF\x0BB0\x0BAE\x0BCD");
   1.125 +_LIT16(KTamil2,"\x0B95\x0B9F\x0BB5\x0BC1\x0BB3\x0BCD\x0BB5\x0BBE\x0BB4\x0BCD\x0BA4\x0BCD\x0BA4\x0BC1");
   1.126 +_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");
   1.127 +// sample 2
   1.128 +_LIT16(KTamil4,"\x0BA8\x0BBE\x0BB5\x0BBF\x0BA9\x0BBE\x0BB2\x0BCD\x0BA8\x0BBE\x0BB3\x0BC1\x0BAE\x0BCD\x0BA8\x0BB5\x0BBF\x0BA9\x0BCD\x0BB1\x0BC7\x0BA4\x0BCD\x0BA4\x0BBF\x0BAE\x0BC7\x0BB5\x0BC1\x0BAE\x0BC1\x0B9F\x0BBF");
   1.129 +_LIT16(KTamil5,"\x0BAA\x0BC6\x0BB2\x0BCD\x0BB2\x0BBE\x0BAE\x0BCD\x0B89\x0BA3\x0BB0\x0B8E\x0BB4\x0BC1\x0BA4\x0BCD\x0BA4\x0BBF\x0BA9\x0BCD\x0B87\x0BB2\x0B95\x0BCD\x0B95\x0BA3\x0BA4\x0BCD\x0BA4\x0BC8\x0B9A\x0BCD");
   1.130 +_LIT16(KTamil6,"\x0B9A\x0BCA\x0BB2\x0BCD\x0BB2\x0BBE\x0BB2\x0BCD\x0B89\x0BB0\x0BC8\x0BAA\x0BCD\x0BAA\x0BA9\x0BCD\x0BA4\x0BCA\x0B95\x0BC1\x0BA4\x0BCD\x0BA4\x0BC1.");
   1.131 +// sample 3
   1.132 +_LIT16(KTamil7,"\x0B85\x0BB5\x0BC8\x0BAF\x0B9F\x0B95\x0BCD\x0B95\x0BAE\x0BCD");
   1.133 +_LIT16(KTamil8,"\x0B89\x0BA3\x0BCD\x0BA3\x0BAE\x0BC1\x0B9F\x0BBF\x0BAF\x0BBE\x0BA4\x0BB5\x0BCB\x0BA4\x0BA8\x0BC0\x0BB0\x0BCD\x0BB5\x0BBE\x0BA9\x0BCD\x0BB5\x0BBE\x0BAF\x0BCD\x0BAA\x0BCD\x0BAA\x0B9F\x0BCD");
   1.134 +_LIT16(KTamil9,"\x0B9F\x0BC6\x0BA3\x0BCD\x0BA3\x0B85\x0BAE\x0BC1\x0BA4\x0BBE\x0BA9\x0BA4\x0BBF\x0BB2\x0BCD\x0BB2\x0BC8\x0BAF\x0BCB-\x0BAE\x0BA3\x0BCD\x0BA3\x0BBF\x0BA9\x0BCD\x0BAE\x0BC7\x0BB2\x0BCD");
   1.135 +// Sample 4
   1.136 +_LIT16(KTestTamil1,"\x0BA8\x0BB2\x0BCD\x0BB2\x0BBE\x0BB0\x0BC8\x0B9A\x0BCD\x0B9A\x0BC7\x0BB0\x0BCD\x0BA8\x0BCD\x0BA4\x0BB2\x0BBE\x0BB2\x0BCD\x0BA8\x0BBE\x0BA9\x0BCD\x0B9A\x0BCA\x0BA9\x0BCD\x0BA9\x0BAA\x0BC1\x0BA9\x0BCD\x0B9A\x0BCA\x0BB2\x0BCD\x0BB2\x0BC1\x0BAE\x0BCD");
   1.137 +_LIT16(KTestTamil2,"\x0B8E\x0BB2\x0BCD\x0BB2\x0BCB\x0BB0\x0BC1\x0BAE\x0BCD\x0B95\x0BC8\x0B95\x0BCA\x0BB3\x0BCD\x0BB5\x0BB0\x0BCD\x0B88\x0B99\x0BCD\x0B95\x0BC1.");
   1.138 +_LIT16(KTestTamil3,"\x0B89\x0BA3\x0BCD\x0BA3\x0BAE\x0BC1\x0B9F\x0BBF\x0BAF\x0BBE\x0BA4\x0BB5\x0BCB\x0BA4\x0BA8\x0BC0\x0BB0\x0BCD\x0BB5\x0BBE\x0BA9\x0BCD\x0BB5\x0BBE\x0BAF\x0BCD\x0BAA\x0BCD\x0BAA\x0B9F\x0BCD");
   1.139 +
   1.140 +
   1.141 +//Telugu sample text
   1.142 +// sample 1
   1.143 +_LIT16(KTelugu1,"\x0C38\x0C30\x0C4D\x0C35\x0C24\x0C4D\x0C30\x0C17\x0C2E\x0C1A\x0C3F\x0C28\x0C4D\x0C24\x0C4D\x0C2F\x0C1E\x0C4D");
   1.144 +_LIT16(KTelugu2,"\x0C15\x0C42\x0C1F\x0C38\x0C4D\x0C25\x0C2E\x0C1A\x0C32\x0C28\x0C4D\x0C27\x0C4D\x0C30\x0C41\x0C35\x0C2E");
   1.145 +_LIT16(KTelugu3,"\x0C05\x0C25\x0C48\x0C24\x0C26\x0C2A\x0C4D\x0C2F\x0C36\x0C15\x0C4D\x0C24\x0C4B\x093D\x0C38");
   1.146 +// sample 2
   1.147 +_LIT16(KTelugu4,"\x0C2F\x0C4B\x0C28\x0C3F\x0C30\x0C4D\x0C2E\x0C39\x0C26\x0C4D\x0C2C\x0C4D\x0C30\x0C39\x0C4D\x0C2E");
   1.148 +_LIT16(KTelugu5,"\x0C26\x0C47\x0C39\x0C47\x093D\x0C38\x0C4D\x0C2E\x0C3F\x0C28\x0C4D\x0C2A\x0C4D\x0C30\x0C15\x0C3E\x0C36");
   1.149 +_LIT16(KTelugu6,"\x0C2A\x0C4D\x0C30\x0C35\x0C43\x0C24\x0C4D\x0C24\x0C3F\x0C30\x0C3E\x0C30\x0C2E\x0C4D\x0C2D\x0C03");
   1.150 +// sample 3
   1.151 +_LIT16(KTelugu7,"\x0C1C\x0C41\x0C39\x0C4D\x0C35\x0C26\x0C43\x0C37\x0C3F\x0C30\x0C4D\x0C39\x0C4B\x0C24\x0C3E");
   1.152 +_LIT16(KTelugu8,"\x0C2A\x0C24\x0C24\x0C4D\x0C30\x0C48\x0C30\x0C4D\x0C26\x0C4D\x0C2F\x0C3E\x0C35\x0C3E\x0C2D\x0C42\x0C2E");
   1.153 +_LIT16(KTelugu9,"\x0C26\x0C4D\x0C2F\x0C3E\x0C14\x0C30\x0C4D\x0C23\x0C4B\x0C28\x0C4D\x0C2E\x0C39\x0C3F\x0C28\x0C3E");
   1.154 +// Sample 4
   1.155 +_LIT16(KTestTelugu1,"\x0C09\x0C26\x0C4D\x0C35\x0C43\x0C24\x0C4D\x0C30\x0C39\x0C28\x0C4D\x0C35\x0C3E\x0C1C\x0C3F\x0C28\x0C3E\x0C02");
   1.156 +_LIT16(KTestTelugu2,"\x0C05\x0C30\x0C4D\x0C37\x0C28\x0C4D\x0C24\x0C4D\x0C2F\x0C42\x0C30\x0C4D\x0C2E\x0C2F\x0C4B \x0C18\x0C43\x0C24\x0C38\x0C4D");
   1.157 +_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");
   1.158 +
   1.159 +void Panic(TInt aPanic)
   1.160 +	{
   1.161 +	_LIT(KPanic, "hindiDemo Application");
   1.162 +	User::Panic(KPanic,aPanic);
   1.163 +	}
   1.164 +
   1.165 +// Class CHindiContainer
   1.166 +
   1.167 +void CHindiContainer::ConstructL(const TRect& aRect)
   1.168 +	{
   1.169 +	
   1.170 +	CreateWindowL();
   1.171 +	SetBlank();
   1.172 +
   1.173 +	_LIT(KMyFontName,"Series 60 Hindi TitleSmB");	
   1.174 +	TFontSpec hindiFontSpec(KMyFontName,200);
   1.175 +	iFontSpec = hindiFontSpec;
   1.176 +	SetFontSize(200);
   1.177 +	
   1.178 +	// first label
   1.179 +	_LIT(KSomeHindi,"   " );
   1.180 +	iTest = new(ELeave) CEikLabel;
   1.181 +	iTest->SetContainerWindowL(*this);
   1.182 +	iTest->SetBufferReserveLengthL(64);
   1.183 +	iTest->SetTextL(KSomeHindi); 
   1.184 +
   1.185 +	// add a CEikRichTextEditor
   1.186 +/*    TResourceReader reader;
   1.187 +    TBuf<500> buf;
   1.188 +    iCoeEnv->CreateResourceReaderLC(reader, R_OUTPUT_WINDOW_RTEXTED);
   1.189 +    iOutputWindow = new (ELeave) CEikRichTextEditor();
   1.190 +    iOutputWindow->SetContainerWindowL(*this);
   1.191 +    iOutputWindow->ConstructFromResourceL(reader);
   1.192 +    CleanupStack::PopAndDestroy();  // Resource reader
   1.193 +    iOutputWindow->SetFocus(ETrue);
   1.194 +
   1.195 +    const TPoint KOutputPosition = TPoint(10, 35);
   1.196 +    const TSize  KOutputSize     = TSize(150, 100);
   1.197 +    iOutputWindow->SetExtent(KOutputPosition, KOutputSize); 
   1.198 +
   1.199 +    buf.Append(_L("abc"));
   1.200 +    buf.Append(KHindi);
   1.201 +    buf.Append(_L(" xyz"));
   1.202 +    iOutputWindow->SetTextL(&buf); */
   1.203 +
   1.204 +	SetRect(aRect);
   1.205 +	ActivateL();
   1.206 +	iSample =1;
   1.207 +	}
   1.208 +
   1.209 +CHindiContainer::~CHindiContainer()
   1.210 +	{
   1.211 +	delete iTest;
   1.212 +	delete iOutputWindow;
   1.213 +	}
   1.214 +
   1.215 +void CHindiContainer::SizeChanged()
   1.216 +	{
   1.217 +	TPoint pos = Position();
   1.218 +	iTest->SetExtent(pos + TPoint(10,10), TSize(500, 40));
   1.219 +	}
   1.220 +
   1.221 +TInt CHindiContainer::CountComponentControls() const
   1.222 +	{
   1.223 +	return 1 /* 2 */;
   1.224 +	}
   1.225 +
   1.226 +CCoeControl* CHindiContainer::ComponentControl(TInt aIndex) const
   1.227 +	{
   1.228 +	CCoeControl* controls[] = { iTest/*, iOutputWindow */ };
   1.229 +	return controls[aIndex];
   1.230 +	}
   1.231 +
   1.232 +void CHindiContainer::HandleControlEventL(CCoeControl* /* aControl */,
   1.233 +						TCoeEvent aEventType)
   1.234 +	{
   1.235 +	if (aEventType == EEventStateChanged)
   1.236 +		{
   1.237 +		//  AppUi()->Exit();
   1.238 +		}
   1.239 +	}
   1.240 +
   1.241 +void CHindiContainer::Draw(const TRect& aRect) const
   1.242 +	{
   1.243 +	TRect rect(Rect());
   1.244 +	rect.Intersection(aRect);
   1.245 +
   1.246 +	// draw the text directly on the display
   1.247 +	CWindowGc& gc = SystemGc();
   1.248 +	DrawHindiText(gc);
   1.249 +	}
   1.250 +
   1.251 +void CHindiContainer::ChangeSample( TInt aSample)
   1.252 +	{
   1.253 +	iSample = aSample;
   1.254 +	if (iSample > 24 ) iSample = 1;
   1.255 +	if (iSample < 1 ) iSample = 24;	
   1.256 +	}
   1.257 +
   1.258 +TInt CHindiContainer::GetSample()
   1.259 +	{
   1.260 +	return iSample;
   1.261 +	}
   1.262 +
   1.263 +void CHindiContainer::SetHindiFont( TFontSpec& aFontSpec )
   1.264 +	{
   1.265 +	iFontSpec = aFontSpec;
   1.266 +	}
   1.267 +
   1.268 +void CHindiContainer::SetFontSize( TInt aFontSize )
   1.269 +	{
   1.270 +	iFontSize = aFontSize;
   1.271 +	iFontSpec.iHeight = iFontSize;
   1.272 +	}
   1.273 +
   1.274 +TInt CHindiContainer::GetFontSize()
   1.275 +	{
   1.276 +	return iFontSize;
   1.277 +	}
   1.278 +	
   1.279 +	
   1.280 +const TInt UnicodeZeroWidthNonJoiner = 0x200C;
   1.281 +
   1.282 +/* Display Hindi without shaping by inserting a Unicode Zero Width Non Joiner
   1.283 +character bewteen each character
   1.284 +aInput the Hindi text to be displayed
   1.285 +aOutput the same text with the ZWNJ characters added, This buffer must be big enough
   1.286 +*/
   1.287 +void CHindiContainer::DisableShaping(const TDesC* aInput, TDes& aOutput ) const
   1.288 +	{
   1.289 +	aOutput.Zero();
   1.290 +	for (TInt i = 0; i < aInput->Length(); i++ )
   1.291 +		{
   1.292 +		aOutput.Append( aInput->Mid(i,1) );
   1.293 +		aOutput.Append( UnicodeZeroWidthNonJoiner );
   1.294 +		}
   1.295 +	}
   1.296 +
   1.297 +/* create a text file which contains the sample hindi data
   1.298 +this can be used for testing 
   1.299 +*/
   1.300 +void CHindiContainer::CreateHindiTxtFile() const
   1.301 +	{
   1.302 +	RFs fs;
   1.303 +	TInt error = KErrNone;
   1.304 +	RFile file;
   1.305 +	
   1.306 +	// Open or create hindi.txt
   1.307 +	error = fs.Connect();
   1.308 +	error = file.Open(fs, _L("c:\\hindi.txt"), EFileWrite);
   1.309 +	if ( error == KErrNotFound)
   1.310 +		{
   1.311 +		error = file.Create(fs, _L("c:\\hindi.txt"), EFileWrite);
   1.312 +		}
   1.313 +	
   1.314 +	// load buffer with data to write
   1.315 +	RBuf8 buffer;
   1.316 +	buffer.Create(10000);
   1.317 +	TPtrC16 pHindi(KHindi1);
   1.318 +	buffer.Append( _L("\xff\xfe") ); 
   1.319 +	buffer.Append((const unsigned char *)pHindi.Ptr(), pHindi.Size() ); 
   1.320 +
   1.321 +	TPtrC16 pHindi2(KHindi2);
   1.322 +	buffer.Append((const unsigned char *)pHindi2.Ptr(), pHindi2.Size() ); 
   1.323 +
   1.324 +	TPtrC16 pHindi3(KHindi3);
   1.325 +	buffer.Append((const unsigned char *)pHindi3.Ptr(), pHindi3.Size() ); 
   1.326 +
   1.327 +	TPtrC16 pHindi4(KHindi4);
   1.328 +	buffer.Append((const unsigned char *)pHindi4.Ptr(), pHindi4.Size() ); 
   1.329 +
   1.330 +	TPtrC16 pHindi5(KHindi5);
   1.331 +	buffer.Append((const unsigned char *)pHindi5.Ptr(), pHindi5.Size() ); 
   1.332 +
   1.333 +	TPtrC16 pHindi6(KHindi6);
   1.334 +	buffer.Append((const unsigned char *)pHindi6.Ptr(), pHindi6.Size() ); 
   1.335 +
   1.336 +	TPtrC16 pHindi7(KHindi7);
   1.337 +	buffer.Append((const unsigned char *)pHindi7.Ptr(), pHindi7.Size() ); 
   1.338 +
   1.339 +	TPtrC16 pHindi8(KHindi8);
   1.340 +	buffer.Append((const unsigned char *)pHindi8.Ptr(), pHindi8.Size() ); 
   1.341 +
   1.342 +	TPtrC16 pHindi9(KHindi9);
   1.343 +	buffer.Append((const unsigned char *)pHindi9.Ptr(), pHindi9.Size() ); 
   1.344 +
   1.345 +	// write buffer
   1.346 +	error = file.Write(buffer);
   1.347 +	
   1.348 +	buffer.Close();
   1.349 +	
   1.350 +	file.Close();
   1.351 +	fs.Close();
   1.352 +	
   1.353 +	}
   1.354 +
   1.355 +
   1.356 +/* create a text file which contains the sample Kannada data
   1.357 +this can be used for testing 
   1.358 +*/
   1.359 +void CHindiContainer::CreateKannadaTxtFile() const
   1.360 +	{
   1.361 +	RFs fs;
   1.362 +	TInt error = KErrNone;
   1.363 +	RFile file;
   1.364 +	
   1.365 +	// Open or create Kannada.txt
   1.366 +	error = fs.Connect();
   1.367 +	error = file.Open(fs, _L("c:\\Kannada.txt"), EFileWrite);
   1.368 +	if ( error == KErrNotFound)
   1.369 +		{
   1.370 +		error = file.Create(fs, _L("c:\\Kannada.txt"), EFileWrite);
   1.371 +		}
   1.372 +	
   1.373 +	// load buffer with data to write
   1.374 +//	TBuf8<10000> buffer;
   1.375 +	RBuf8 buffer;
   1.376 +	buffer.Create(10000);
   1.377 +	TPtrC16 pKannada(KKannada1);
   1.378 +	buffer.Append( _L("\xff\xfe") ); 
   1.379 +	buffer.Append((const unsigned char *)pKannada.Ptr(), pKannada.Size() ); 
   1.380 +
   1.381 +	TPtrC16 pKannada2(KKannada2);
   1.382 +	buffer.Append((const unsigned char *)pKannada2.Ptr(), pKannada2.Size() ); 
   1.383 +
   1.384 +	TPtrC16 pKannada3(KKannada3);
   1.385 +	buffer.Append((const unsigned char *)pKannada3.Ptr(), pKannada3.Size() ); 
   1.386 +
   1.387 +	TPtrC16 pKannada4(KKannada4);
   1.388 +	buffer.Append((const unsigned char *)pKannada4.Ptr(), pKannada4.Size() ); 
   1.389 +
   1.390 +	TPtrC16 pKannada5(KKannada5);
   1.391 +	buffer.Append((const unsigned char *)pKannada5.Ptr(), pKannada5.Size() ); 
   1.392 +
   1.393 +	TPtrC16 pKannada6(KKannada6);
   1.394 +	buffer.Append((const unsigned char *)pKannada6.Ptr(), pKannada6.Size() ); 
   1.395 +
   1.396 +	TPtrC16 pKannada7(KKannada7);
   1.397 +	buffer.Append((const unsigned char *)pKannada7.Ptr(), pKannada7.Size() ); 
   1.398 +
   1.399 +	TPtrC16 pKannada8(KKannada8);
   1.400 +	buffer.Append((const unsigned char *)pKannada8.Ptr(), pKannada8.Size() ); 
   1.401 +
   1.402 +	TPtrC16 pKannada9(KKannada9);
   1.403 +	buffer.Append((const unsigned char *)pKannada9.Ptr(), pKannada9.Size() ); 
   1.404 +
   1.405 +	// write buffer
   1.406 +	error = file.Write(buffer);
   1.407 +
   1.408 +	buffer.Close();
   1.409 +	
   1.410 +	file.Close();
   1.411 +	fs.Close();
   1.412 +	
   1.413 +	}
   1.414 +
   1.415 +/* create a text file which contains the sample Gujarati data
   1.416 +this can be used for testing 
   1.417 +*/
   1.418 +void CHindiContainer::CreateGujaratiTxtFile() const
   1.419 +	{
   1.420 +	RFs fs;
   1.421 +	TInt error = KErrNone;
   1.422 +	RFile file;
   1.423 +	
   1.424 +	// Open or create Gujarati.txt
   1.425 +	error = fs.Connect();
   1.426 +	error = file.Open(fs, _L("c:\\Gujarati.txt"), EFileWrite);
   1.427 +	if ( error == KErrNotFound)
   1.428 +		{
   1.429 +		error = file.Create(fs, _L("c:\\Gujarati.txt"), EFileWrite);
   1.430 +		}
   1.431 +	
   1.432 +	// load buffer with data to write
   1.433 +//	TBuf8<10000> buffer;
   1.434 +	RBuf8 buffer;
   1.435 +	buffer.Create(10000);
   1.436 +	TPtrC16 pGujarati(KGujarati1);
   1.437 +	buffer.Append( _L("\xff\xfe") ); 
   1.438 +	buffer.Append((const unsigned char *)pGujarati.Ptr(), pGujarati.Size() ); 
   1.439 +
   1.440 +	TPtrC16 pGujarati2(KGujarati2);
   1.441 +	buffer.Append((const unsigned char *)pGujarati2.Ptr(), pGujarati2.Size() ); 
   1.442 +
   1.443 +	TPtrC16 pGujarati3(KGujarati3);
   1.444 +	buffer.Append((const unsigned char *)pGujarati3.Ptr(), pGujarati3.Size() ); 
   1.445 +
   1.446 +	TPtrC16 pGujarati4(KGujarati4);
   1.447 +	buffer.Append((const unsigned char *)pGujarati4.Ptr(), pGujarati4.Size() ); 
   1.448 +
   1.449 +	TPtrC16 pGujarati5(KGujarati5);
   1.450 +	buffer.Append((const unsigned char *)pGujarati5.Ptr(), pGujarati5.Size() ); 
   1.451 +
   1.452 +	TPtrC16 pGujarati6(KGujarati6);
   1.453 +	buffer.Append((const unsigned char *)pGujarati6.Ptr(), pGujarati6.Size() ); 
   1.454 +
   1.455 +	TPtrC16 pGujarati7(KGujarati7);
   1.456 +	buffer.Append((const unsigned char *)pGujarati7.Ptr(), pGujarati7.Size() ); 
   1.457 +
   1.458 +	TPtrC16 pGujarati8(KGujarati8);
   1.459 +	buffer.Append((const unsigned char *)pGujarati8.Ptr(), pGujarati8.Size() ); 
   1.460 +
   1.461 +	TPtrC16 pGujarati9(KGujarati9);
   1.462 +	buffer.Append((const unsigned char *)pGujarati9.Ptr(), pGujarati9.Size() ); 
   1.463 +
   1.464 +	// write buffer
   1.465 +	error = file.Write(buffer);
   1.466 +
   1.467 +	buffer.Close();
   1.468 +	
   1.469 +	file.Close();
   1.470 +	fs.Close();
   1.471 +	}
   1.472 +/* create a text file which contains the sample Bengali data
   1.473 +this can be used for testing 
   1.474 +*/
   1.475 +
   1.476 +void CHindiContainer::CreateBengaliTxtFile() const
   1.477 +	{
   1.478 +	RFs fs1;
   1.479 +	TInt error = KErrNone;
   1.480 +	RFile file1;
   1.481 +	// Open or create Bengali.txt
   1.482 +	error = fs1.Connect();
   1.483 +	error = file1.Open(fs1, _L("c:\\Bengali.txt"), EFileWrite);
   1.484 +	if ( error == KErrNotFound)
   1.485 +		{
   1.486 +		error = file1.Create(fs1, _L("c:\\Bengali.txt"), EFileWrite);
   1.487 +		}
   1.488 +	// load buffer with data to write
   1.489 +	RBuf8 buffer;
   1.490 +	buffer.Create(10000);
   1.491 +	TPtrC16 pBengali(KBengali1);
   1.492 +	buffer.Append( _L("\xff\xfe")); 
   1.493 +	buffer.Append((const unsigned char *)pBengali.Ptr(), pBengali.Size()); 
   1.494 +	
   1.495 +	TPtrC16 pBengali2(KBengali2);
   1.496 +	buffer.Append((const unsigned char *)pBengali2.Ptr(), pBengali2.Size()); 
   1.497 +	
   1.498 +	TPtrC16 pBengali3(KBengali3);
   1.499 +	buffer.Append((const unsigned char *)pBengali3.Ptr(), pBengali3.Size()); 
   1.500 +	
   1.501 +	TPtrC16 pBengali4(KBengali4);
   1.502 +	buffer.Append((const unsigned char *)pBengali4.Ptr(), pBengali4.Size()); 
   1.503 +	
   1.504 +	TPtrC16 pBengali5(KBengali5);
   1.505 +	buffer.Append((const unsigned char *)pBengali5.Ptr(), pBengali5.Size()); 
   1.506 +	
   1.507 +	TPtrC16 pBengali6(KBengali6);
   1.508 +	buffer.Append((const unsigned char *)pBengali6.Ptr(), pBengali6.Size()); 
   1.509 +	
   1.510 +	TPtrC16 pBengali7(KBengali7);
   1.511 +	buffer.Append((const unsigned char *)pBengali7.Ptr(), pBengali7.Size()); 
   1.512 +	
   1.513 +	TPtrC16 pBengali8(KBengali8);
   1.514 +	buffer.Append((const unsigned char *)pBengali8.Ptr(), pBengali8.Size()); 
   1.515 +	
   1.516 +	TPtrC16 pBengali9(KBengali9);
   1.517 +	buffer.Append((const unsigned char *)pBengali9.Ptr(), pBengali9.Size()); 
   1.518 +	
   1.519 +	// write buffer
   1.520 +	error = file1.Write(buffer);
   1.521 +	buffer.Close();
   1.522 +	file1.Close();
   1.523 +	fs1.Close();
   1.524 +	}
   1.525 +
   1.526 +void CHindiContainer::CreateTamilTxtFile() const
   1.527 +{
   1.528 +RFs fs;
   1.529 +TInt error = KErrNone;
   1.530 +RFile file;
   1.531 +
   1.532 +// Open or create Tamil.txt
   1.533 +error = fs.Connect();
   1.534 +error = file.Open(fs, _L("c:\\Tamil.txt"), EFileWrite);
   1.535 +if ( error == KErrNotFound)
   1.536 +	{
   1.537 +	error = file.Create(fs, _L("c:\\Tamil.txt"), EFileWrite);
   1.538 +	}
   1.539 +
   1.540 +// load buffer with data to write
   1.541 +//	TBuf8<10000> buffer;
   1.542 +RBuf8 buffer;
   1.543 +buffer.Create(10000);
   1.544 +TPtrC16 pTamil(KTamil1);
   1.545 +buffer.Append( _L("\xff\xfe") ); 
   1.546 +buffer.Append((const unsigned char *)pTamil.Ptr(), pTamil.Size() ); 
   1.547 +
   1.548 +TPtrC16 pTamil2(KTamil2);
   1.549 +buffer.Append((const unsigned char *)pTamil2.Ptr(), pTamil2.Size() ); 
   1.550 +
   1.551 +TPtrC16 pTamil3(KTamil3);
   1.552 +buffer.Append((const unsigned char *)pTamil3.Ptr(), pTamil3.Size() ); 
   1.553 +
   1.554 +TPtrC16 pTamil4(KTamil4);
   1.555 +buffer.Append((const unsigned char *)pTamil4.Ptr(), pTamil4.Size() ); 
   1.556 +
   1.557 +TPtrC16 pTamil5(KTamil5);
   1.558 +buffer.Append((const unsigned char *)pTamil5.Ptr(), pTamil5.Size() ); 
   1.559 +
   1.560 +TPtrC16 pTamil6(KTamil6);
   1.561 +buffer.Append((const unsigned char *)pTamil6.Ptr(), pTamil6.Size() ); 
   1.562 +
   1.563 +TPtrC16 pTamil7(KTamil7);
   1.564 +buffer.Append((const unsigned char *)pTamil7.Ptr(), pTamil7.Size() ); 
   1.565 +
   1.566 +TPtrC16 pTamil8(KTamil8);
   1.567 +buffer.Append((const unsigned char *)pTamil8.Ptr(), pTamil8.Size() ); 
   1.568 +
   1.569 +TPtrC16 pTamil9(KTamil9);
   1.570 +buffer.Append((const unsigned char *)pTamil9.Ptr(), pTamil9.Size() ); 
   1.571 +
   1.572 +// write buffer
   1.573 +error = file.Write(buffer);
   1.574 +
   1.575 +buffer.Close();
   1.576 +
   1.577 +file.Close();
   1.578 +fs.Close();
   1.579 +}
   1.580 +
   1.581 +void CHindiContainer::CreateTeluguTxtFile() const
   1.582 +{
   1.583 +RFs fs;
   1.584 +TInt error = KErrNone;
   1.585 +RFile file;
   1.586 +
   1.587 +// Open or create Telugu.txt
   1.588 +error = fs.Connect();
   1.589 +error = file.Open(fs, _L("c:\\Telugu.txt"), EFileWrite);
   1.590 +if ( error == KErrNotFound)
   1.591 +	{
   1.592 +	error = file.Create(fs, _L("c:\\Telugu.txt"), EFileWrite);
   1.593 +	}
   1.594 +
   1.595 +// load buffer with data to write
   1.596 +//	TBuf8<10000> buffer;
   1.597 +RBuf8 buffer;
   1.598 +buffer.Create(10000);
   1.599 +TPtrC16 pTelugu(KTelugu1);
   1.600 +buffer.Append( _L("\xff\xfe") ); 
   1.601 +buffer.Append((const unsigned char *)pTelugu.Ptr(), pTelugu.Size() ); 
   1.602 +
   1.603 +TPtrC16 pTelugu2(KTelugu2);
   1.604 +buffer.Append((const unsigned char *)pTelugu2.Ptr(), pTelugu2.Size() ); 
   1.605 +
   1.606 +TPtrC16 pTelugu3(KTelugu3);
   1.607 +buffer.Append((const unsigned char *)pTelugu3.Ptr(), pTelugu3.Size() ); 
   1.608 +
   1.609 +TPtrC16 pTelugu4(KTelugu4);
   1.610 +buffer.Append((const unsigned char *)pTelugu4.Ptr(), pTelugu4.Size() ); 
   1.611 +
   1.612 +TPtrC16 pTelugu5(KTelugu5);
   1.613 +buffer.Append((const unsigned char *)pTelugu5.Ptr(), pTelugu5.Size() ); 
   1.614 +
   1.615 +TPtrC16 pTelugu6(KTelugu6);
   1.616 +buffer.Append((const unsigned char *)pTelugu6.Ptr(), pTelugu6.Size() ); 
   1.617 +
   1.618 +TPtrC16 pTelugu7(KTelugu7);
   1.619 +buffer.Append((const unsigned char *)pTelugu7.Ptr(), pTelugu7.Size() ); 
   1.620 +
   1.621 +TPtrC16 pTelugu8(KTelugu8);
   1.622 +buffer.Append((const unsigned char *)pTelugu8.Ptr(), pTelugu8.Size() ); 
   1.623 +
   1.624 +TPtrC16 pTelugu9(KTelugu9);
   1.625 +buffer.Append((const unsigned char *)pTelugu9.Ptr(), pTelugu9.Size() ); 
   1.626 +
   1.627 +// write buffer
   1.628 +error = file.Write(buffer);
   1.629 +
   1.630 +buffer.Close();
   1.631 +
   1.632 +file.Close();
   1.633 +fs.Close();
   1.634 +}
   1.635 +
   1.636 +/**
   1.637 +@file
   1.638 +@SYMTestCaseID				GRAPHICS-SYSLIB-ICULAYOUTENGINE-CIT-1499			
   1.639 +@SYMTestCaseDesc 			Test the IcuLayout Engine .
   1.640 +@SYMTestPriority 			High
   1.641 +@SYMTestActions  			Test Check that Hindi text is shaped:
   1.642 +@SYMTestExpectedResults		The test must not fail.
   1.643 +@SYMPREQ					PREQ18
   1.644 +*/ 
   1.645 +
   1.646 +/**
   1.647 +@file
   1.648 +@SYMTestCaseID				GRAPHICS-SYSLIB-ICULAYOUTENGINE-CIT-3382		
   1.649 +@SYMTestCaseDesc 			Test the IcuLayout Engine for Kannada support by extending functionalities of DrawHindiText(CWindowGc& aGc) function.
   1.650 +@SYMTestPriority 			High
   1.651 +@SYMTestActions  			Test Check that Kannada text is shaped:
   1.652 +@SYMTestExpectedResults		The test must not fail.
   1.653 +@SYMPREQ					PREQ19
   1.654 +*/
   1.655 +/**
   1.656 +@file
   1.657 +@SYMTestCaseID				GRAPHICS-SYSLIB-ICULAYOUTENGINE-CIT-3418		
   1.658 +@SYMTestCaseDesc 			Test the IcuLayout Engine for Gujarati support by extending functionalities of DrawHindiText(CWindowGc& aGc) function.
   1.659 +@SYMTestPriority 			High
   1.660 +@SYMTestActions  			Test Check that gujarati text is shaped:
   1.661 +@SYMTestExpectedResults		The test must not fail.
   1.662 +@SYMPREQ					PREQ19
   1.663 +*/  
   1.664 +
   1.665 +/**
   1.666 +@file
   1.667 +@SYMTestCaseID				GRAPHICS-SYSLIB-ICULAYOUTENGINE-CIT-4004
   1.668 +@SYMTestCaseDesc 			Test the IcuLayout Engine for Bengali support by extending functionalities of DrawHindiText(CWindowGc& aGc) function.
   1.669 +@SYMTestPriority 			High
   1.670 +@SYMTestActions  			Test Check that Bengali text is shaped:
   1.671 +@SYMTestExpectedResults		The test must not fail.
   1.672 +@SYMPREQ					PREQ1766
   1.673 +*/
   1.674 +
   1.675 +/**
   1.676 +@file
   1.677 +@SYMTestCaseID				GRAPHICS-SYSLIB-ICULAYOUTENGINE-CIT-4005
   1.678 +@SYMTestCaseDesc 			Test the IcuLayout Engine for Tamil support by extending functionalities of DrawHindiText(CWindowGc& aGc) function.
   1.679 +@SYMTestPriority 			High
   1.680 +@SYMTestActions  			Test Check that Tamil text is shaped:
   1.681 +@SYMTestExpectedResults		The test must not fail.
   1.682 +@SYMPREQ					PREQ1766
   1.683 +*/  
   1.684 +
   1.685 +
   1.686 +/**
   1.687 +@file
   1.688 +@SYMTestCaseID				GRAPHICS-SYSLIB-ICULAYOUTENGINE-CIT-4006
   1.689 +@SYMTestCaseDesc 			Test the IcuLayout Engine for Telugu support by extending functionalities of DrawHindiText(CWindowGc& aGc) function.
   1.690 +@SYMTestPriority 			High
   1.691 +@SYMTestActions  			Test Check that Telugu text is shaped:
   1.692 +@SYMTestExpectedResults		The test must not fail.
   1.693 +@SYMPREQ					PREQ1766
   1.694 +*/  
   1.695 +
   1.696 +void CHindiContainer::DrawHindiText(CWindowGc& aGc) const
   1.697 +	{
   1.698 +	
   1.699 +	// start with test font
   1.700 +	CFont* myFont;
   1.701 +	_LIT(KTestFontName,"DejaVu Sans Condensed");
   1.702 +	TFontSpec testFontSpec(KTestFontName,200); 
   1.703 +	CGraphicsDevice* screenDevice=iCoeEnv->ScreenDevice();
   1.704 +	screenDevice->GetNearestFontInTwips(myFont,testFontSpec);
   1.705 +
   1.706 +	// set the required attributes
   1.707 +	aGc.UseFont(myFont);
   1.708 +	aGc.SetPenColor(KRgbBlack);
   1.709 +	aGc.SetBrushColor(KRgbBlue);
   1.710 +	aGc.CancelClippingRect();
   1.711 +
   1.712 +	// Set the text drawing position & draw
   1.713 +	TPoint pos(10,20);
   1.714 +	TBuf<100> textLine;
   1.715 +	textLine.Append(_L("The following is "));
   1.716 +	
   1.717 +	switch( iSample )
   1.718 +		{
   1.719 +		case 1:
   1.720 +			textLine.Append(_L("Hindi sample 1 "));
   1.721 +			break;
   1.722 +		case 2:
   1.723 +			textLine.Append(_L("Hindi sample 2 "));
   1.724 +			break;
   1.725 +		case 3:
   1.726 +			textLine.Append(_L("Hindi sample 3 "));
   1.727 +			break;
   1.728 +		case 4:
   1.729 +			textLine.Append(_L(" Hindi Sample 4 "));
   1.730 +			break;
   1.731 +		case 5:
   1.732 +			textLine.Append(_L("Kannada sample 1 "));
   1.733 +			break;
   1.734 +		case 6:
   1.735 +			textLine.Append(_L("Kannada sample 2 "));
   1.736 +			break;
   1.737 +		case 7:
   1.738 +			textLine.Append(_L("Kannada sample 3 "));
   1.739 +			break;
   1.740 +		case 8:
   1.741 +			textLine.Append(_L("Kannada Sample 4 "));
   1.742 +			break;
   1.743 +		case 9:
   1.744 +			textLine.Append(_L("Gujarati sample 1 "));
   1.745 +			break;
   1.746 +		case 10:
   1.747 +			textLine.Append(_L("Gujarati sample 2 "));
   1.748 +			break;
   1.749 +		case 11:
   1.750 +			textLine.Append(_L("Gujarati sample 3 "));
   1.751 +			break;
   1.752 +		case 12:
   1.753 +			textLine.Append(_L("Gujarati Sample 4 "));
   1.754 +			break;
   1.755 +		case 13:
   1.756 +			textLine.Append(_L("Bengali sample 1 "));
   1.757 +			break;
   1.758 +		case 14:
   1.759 +			textLine.Append(_L("Bengali sample 2 "));
   1.760 +			break;
   1.761 +		case 15:
   1.762 +			textLine.Append(_L("Bengali sample 3 "));
   1.763 +			break;
   1.764 +		case 16:
   1.765 +			textLine.Append(_L("Bengali Sample 4 "));
   1.766 +			break;
   1.767 +		case 17:
   1.768 +			textLine.Append(_L("Tamil sample 1 "));
   1.769 +			break;
   1.770 +		case 18:
   1.771 +			textLine.Append(_L("Tamil sample 2 "));
   1.772 +			break;
   1.773 +		case 19:
   1.774 +			textLine.Append(_L("Tamil sample 3 "));
   1.775 +			break;
   1.776 +		case 20:
   1.777 +			textLine.Append(_L("Tamil Sample 4 "));
   1.778 +			break;
   1.779 +		case 21:
   1.780 +			textLine.Append(_L("Telugu sample 1 "));
   1.781 +			break;
   1.782 +		case 22:
   1.783 +			textLine.Append(_L("Telugu sample 2 "));
   1.784 +			break;
   1.785 +		case 23:
   1.786 +			textLine.Append(_L("Telugu sample 3 "));
   1.787 +			break;
   1.788 +		case 24:
   1.789 +			textLine.Append(_L("Telugu Sample 4 "));
   1.790 +			break;
   1.791 +		default:
   1.792 +			textLine.Append(_L("what? "));
   1.793 +			break;
   1.794 +	 	}
   1.795 +
   1.796 +	textLine.Append(_L("using font "));
   1.797 +	textLine.Append(iFontSpec.iTypeface.iName);
   1.798 +	aGc.DrawText(textLine,pos);
   1.799 +
   1.800 +	TPoint pos2(10,35);
   1.801 +	TBuf<100> textLine2;
   1.802 +	textLine2.Format(_L("Size:%dpt Blue is shaped, Black is not"),iFontSize/20);
   1.803 +	aGc.DrawText(textLine2, pos2);
   1.804 +	
   1.805 +	// Discard and destroy the test font
   1.806 +	aGc.DiscardFont();
   1.807 +	screenDevice->ReleaseFont(myFont);
   1.808 +	
   1.809 +	// set the selected font
   1.810 +	screenDevice->GetNearestFontInTwips(myFont,iFontSpec);
   1.811 +
   1.812 +	// set the required attributes
   1.813 +	aGc.UseFont(myFont);
   1.814 +	aGc.SetPenColor(KRgbBlack);
   1.815 +	aGc.SetBrushColor(KRgbBlue);
   1.816 +	aGc.CancelClippingRect();
   1.817 +
   1.818 +	// some rectangles to fit the text in
   1.819 +	TRect textRect(10,-30,600, 600);
   1.820 +	TRect textRect2(10,-5,600, 600);
   1.821 +	TRect textRect3(10, 25, 600, 600);
   1.822 +	TRect textRect4(10, 50, 600, 600);
   1.823 +	TRect textRect5(10, 80, 600, 600);
   1.824 +	TRect textRect6(10, 105, 600, 600);
   1.825 +
   1.826 +	TBuf<200> textWithoutShaping;
   1.827 +
   1.828 +	// Draw some Hindi in a rectangle
   1.829 +	switch (iSample)
   1.830 +	{
   1.831 +	
   1.832 +		//Hindi Sample 1
   1.833 +	case 1:
   1.834 +	
   1.835 +		// First draw in Black with shaping disabled
   1.836 +		DisableShaping(&KHindi1, textWithoutShaping );
   1.837 +		aGc.SetPenColor(KRgbBlack);
   1.838 +		aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
   1.839 +
   1.840 +		// Now in Blue with shaping
   1.841 +		aGc.SetPenColor(KRgbBlue);
   1.842 +		aGc.DrawText(KHindi1, textRect2, 100, CGraphicsContext::ELeft);
   1.843 +	
   1.844 +		//--------------------------------------------------------------------------
   1.845 +		// Without the Layout Engine
   1.846 +		aGc.SetPenColor(KRgbBlack);
   1.847 +		DisableShaping(&KHindi2, textWithoutShaping );
   1.848 +		aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
   1.849 +
   1.850 +		aGc.SetPenColor(KRgbBlue);
   1.851 +		aGc.DrawText(KHindi2, textRect4, 100, CGraphicsContext::ELeft);
   1.852 +		//--------------------------------------------------------------------------
   1.853 +		// Without the Layout Engine
   1.854 +		DisableShaping(&KHindi3, textWithoutShaping );
   1.855 +		aGc.SetPenColor(KRgbBlack);
   1.856 +		aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
   1.857 +
   1.858 +		aGc.SetPenColor(KRgbBlue);
   1.859 +		aGc.DrawText(KHindi3, textRect6, 100, CGraphicsContext::ELeft);
   1.860 +		//--------------------------------------------------------------------------
   1.861 +		break;
   1.862 +		//Hindi Sample 2
   1.863 +	case 2:		
   1.864 +		DisableShaping(&KHindi4, textWithoutShaping );
   1.865 +		aGc.SetPenColor(KRgbBlack);
   1.866 +		aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
   1.867 +
   1.868 +		aGc.SetPenColor(KRgbBlue);
   1.869 +		aGc.DrawText(KHindi4, textRect2, 100, CGraphicsContext::ELeft);
   1.870 +	
   1.871 +		//--------------------------------------------------------------------------
   1.872 +		// Without the Layout Engine
   1.873 +		DisableShaping(&KHindi5, textWithoutShaping );
   1.874 +		aGc.SetPenColor(KRgbBlack);
   1.875 +		aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
   1.876 +
   1.877 +		aGc.SetPenColor(KRgbBlue);
   1.878 +		aGc.DrawText(KHindi5, textRect4, 100, CGraphicsContext::ELeft);
   1.879 +		//--------------------------------------------------------------------------
   1.880 +		// Without the Layout Engine
   1.881 +		DisableShaping(&KHindi6, textWithoutShaping );
   1.882 +		aGc.SetPenColor(KRgbBlack);
   1.883 +		aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
   1.884 +
   1.885 +		aGc.SetPenColor(KRgbBlue);
   1.886 +		aGc.DrawText(KHindi6, textRect6, 100, CGraphicsContext::ELeft);
   1.887 +		//--------------------------------------------------------------------------
   1.888 +		break;
   1.889 +		//Hindi Sample 3
   1.890 +	case 3:	
   1.891 +		DisableShaping(&KHindi7, textWithoutShaping );
   1.892 +		aGc.SetPenColor(KRgbBlack);
   1.893 +		aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
   1.894 +
   1.895 +		aGc.SetPenColor(KRgbBlue);
   1.896 +		aGc.DrawText(KHindi7, textRect2, 100, CGraphicsContext::ELeft);
   1.897 +	
   1.898 +		//--------------------------------------------------------------------------
   1.899 +		// Without the Layout Engine
   1.900 +		DisableShaping(&KHindi8, textWithoutShaping );
   1.901 +		aGc.SetPenColor(KRgbBlack);
   1.902 +		aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
   1.903 +
   1.904 +		aGc.SetPenColor(KRgbBlue);
   1.905 +		aGc.DrawText(KHindi8, textRect4, 100, CGraphicsContext::ELeft);
   1.906 +		//--------------------------------------------------------------------------
   1.907 +		// Without the Layout Engine
   1.908 +		DisableShaping(&KHindi9, textWithoutShaping );
   1.909 +		aGc.SetPenColor(KRgbBlack);
   1.910 +		aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
   1.911 +
   1.912 +		aGc.SetPenColor(KRgbBlue);
   1.913 +		aGc.DrawText(KHindi9, textRect6, 100, CGraphicsContext::ELeft);
   1.914 +		//--------------------------------------------------------------------------
   1.915 +		break;
   1.916 +		//Hindi Sample 4
   1.917 +	case 4:
   1.918 +		// test 
   1.919 +		DisableShaping(&KTest1, textWithoutShaping );
   1.920 +		aGc.DrawText(KTest1, textRect, 100, CGraphicsContext::ELeft);
   1.921 +
   1.922 +		aGc.SetPenColor(KRgbBlue);
   1.923 +		aGc.DrawText(KTest1, textRect2, 100, CGraphicsContext::ELeft);
   1.924 +	
   1.925 +		//--------------------------------------------------------------------------
   1.926 +		// Without the Layout Engine
   1.927 +
   1.928 +		aGc.SetPenColor(KRgbBlack);
   1.929 +		aGc.DrawText(KTest2, textRect3, 100, CGraphicsContext::ELeft);
   1.930 +		// With the Layout Engine
   1.931 +
   1.932 +		aGc.SetPenColor(KRgbBlue);
   1.933 +		aGc.DrawText(KTest2, textRect4, 100, CGraphicsContext::ELeft);
   1.934 +		//--------------------------------------------------------------------------
   1.935 +		// Without the Layout Engine
   1.936 +
   1.937 +		aGc.SetPenColor(KRgbBlack);
   1.938 +		aGc.DrawText(KTest3, textRect5, 100, CGraphicsContext::ELeft);
   1.939 +		// With the Layout Engine
   1.940 +
   1.941 +		aGc.SetPenColor(KRgbBlue);
   1.942 +		aGc.DrawText(KTest3, textRect6, 100, CGraphicsContext::ELeft);
   1.943 +		//--------------------------------------------------------------------------
   1.944 +		break;
   1.945 +		
   1.946 +		//Kannada Sample 1
   1.947 +	case 5:		
   1.948 +	// First draw in Black with shaping disabled
   1.949 +		DisableShaping(&KKannada1, textWithoutShaping );
   1.950 +		aGc.SetPenColor(KRgbBlack);
   1.951 +		aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
   1.952 +
   1.953 +		// Now in Blue with shaping
   1.954 +		aGc.SetPenColor(KRgbBlue);
   1.955 +		aGc.DrawText(KKannada1, textRect2, 100, CGraphicsContext::ELeft);
   1.956 +	
   1.957 +		//--------------------------------------------------------------------------
   1.958 +		// Without the Layout Engine
   1.959 +		aGc.SetPenColor(KRgbBlack);
   1.960 +		DisableShaping(&KKannada2, textWithoutShaping );
   1.961 +		aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
   1.962 +
   1.963 +		aGc.SetPenColor(KRgbBlue);
   1.964 +		aGc.DrawText(KKannada2, textRect4, 100, CGraphicsContext::ELeft);
   1.965 +		//--------------------------------------------------------------------------
   1.966 +		// Without the Layout Engine
   1.967 +		DisableShaping(&KKannada3, textWithoutShaping );
   1.968 +		aGc.SetPenColor(KRgbBlack);
   1.969 +		aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
   1.970 +
   1.971 +		aGc.SetPenColor(KRgbBlue);
   1.972 +		aGc.DrawText(KKannada3, textRect6, 100, CGraphicsContext::ELeft);
   1.973 +		//--------------------------------------------------------------------------
   1.974 +		break;
   1.975 +		//Kannada Sample 2
   1.976 +		
   1.977 +	case 6:		
   1.978 +		DisableShaping(&KKannada4, textWithoutShaping );
   1.979 +		aGc.SetPenColor(KRgbBlack);
   1.980 +		aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
   1.981 +
   1.982 +		aGc.SetPenColor(KRgbBlue);
   1.983 +		aGc.DrawText(KKannada4, textRect2, 100, CGraphicsContext::ELeft);
   1.984 +	
   1.985 +		//--------------------------------------------------------------------------
   1.986 +		// Without the Layout Engine
   1.987 +		DisableShaping(&KKannada5, textWithoutShaping );
   1.988 +		aGc.SetPenColor(KRgbBlack);
   1.989 +		aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
   1.990 +
   1.991 +		aGc.SetPenColor(KRgbBlue);
   1.992 +		aGc.DrawText(KKannada5, textRect4, 100, CGraphicsContext::ELeft);
   1.993 +		//--------------------------------------------------------------------------
   1.994 +		// Without the Layout Engine
   1.995 +		DisableShaping(&KKannada6, textWithoutShaping );
   1.996 +		aGc.SetPenColor(KRgbBlack);
   1.997 +		aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
   1.998 +
   1.999 +		aGc.SetPenColor(KRgbBlue);
  1.1000 +		aGc.DrawText(KKannada6, textRect6, 100, CGraphicsContext::ELeft);
  1.1001 +		//--------------------------------------------------------------------------
  1.1002 +		break;
  1.1003 +		
  1.1004 +		//Kannada Sample 3
  1.1005 +	
  1.1006 +	case 7:	
  1.1007 +		DisableShaping(&KKannada7, textWithoutShaping );
  1.1008 +		aGc.SetPenColor(KRgbBlack);
  1.1009 +		aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
  1.1010 +
  1.1011 +		aGc.SetPenColor(KRgbBlue);
  1.1012 +		aGc.DrawText(KKannada7, textRect2, 100, CGraphicsContext::ELeft);
  1.1013 +	
  1.1014 +		//--------------------------------------------------------------------------
  1.1015 +		// Without the Layout Engine
  1.1016 +		DisableShaping(&KKannada8, textWithoutShaping );
  1.1017 +		aGc.SetPenColor(KRgbBlack);
  1.1018 +		aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
  1.1019 +
  1.1020 +		aGc.SetPenColor(KRgbBlue);
  1.1021 +		aGc.DrawText(KKannada8, textRect4, 100, CGraphicsContext::ELeft);
  1.1022 +		//--------------------------------------------------------------------------
  1.1023 +		// Without the Layout Engine
  1.1024 +		DisableShaping(&KKannada9, textWithoutShaping );
  1.1025 +		aGc.SetPenColor(KRgbBlack);
  1.1026 +		aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
  1.1027 +
  1.1028 +		aGc.SetPenColor(KRgbBlue);
  1.1029 +		aGc.DrawText(KKannada9, textRect6, 100, CGraphicsContext::ELeft);
  1.1030 +		//--------------------------------------------------------------------------
  1.1031 +		break;
  1.1032 +		//Kannada Sample 4 	
  1.1033 +	case 8:
  1.1034 +		
  1.1035 +		DisableShaping(&KTestKannada1, textWithoutShaping );
  1.1036 +		aGc.DrawText(KTestKannada1, textRect, 100, CGraphicsContext::ELeft);
  1.1037 +
  1.1038 +		aGc.SetPenColor(KRgbBlue);
  1.1039 +		aGc.DrawText(KTestKannada1, textRect2, 100, CGraphicsContext::ELeft);
  1.1040 +	
  1.1041 +		//--------------------------------------------------------------------------
  1.1042 +		// Without the Layout Engine
  1.1043 +
  1.1044 +		aGc.SetPenColor(KRgbBlack);
  1.1045 +		aGc.DrawText(KTestKannada2, textRect3, 100, CGraphicsContext::ELeft);
  1.1046 +		// With the Layout Engine
  1.1047 +
  1.1048 +		aGc.SetPenColor(KRgbBlue);
  1.1049 +		aGc.DrawText(KTestKannada2, textRect4, 100, CGraphicsContext::ELeft);
  1.1050 +		//--------------------------------------------------------------------------
  1.1051 +		// Without the Layout Engine
  1.1052 +
  1.1053 +		aGc.SetPenColor(KRgbBlack);
  1.1054 +		aGc.DrawText(KTestKannada3, textRect5, 100, CGraphicsContext::ELeft);
  1.1055 +		// With the Layout Engine
  1.1056 +
  1.1057 +		aGc.SetPenColor(KRgbBlue);
  1.1058 +		aGc.DrawText(KTestKannada3, textRect6, 100, CGraphicsContext::ELeft);
  1.1059 +		//--------------------------------------------------------------------------
  1.1060 +		
  1.1061 +		break;
  1.1062 +	//	break;
  1.1063 +	
  1.1064 +	//Gujarati Sample 1
  1.1065 +	case 9:		
  1.1066 +	// First draw in Black with shaping disabled
  1.1067 +		DisableShaping(&KGujarati1, textWithoutShaping );
  1.1068 +		aGc.SetPenColor(KRgbBlack);
  1.1069 +		aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
  1.1070 +
  1.1071 +		// Now in Blue with shaping
  1.1072 +		aGc.SetPenColor(KRgbBlue);
  1.1073 +		aGc.DrawText(KGujarati1, textRect2, 100, CGraphicsContext::ELeft);
  1.1074 +	
  1.1075 +		//--------------------------------------------------------------------------
  1.1076 +		// Without the Layout Engine
  1.1077 +		aGc.SetPenColor(KRgbBlack);
  1.1078 +		DisableShaping(&KGujarati2, textWithoutShaping );
  1.1079 +		aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
  1.1080 +
  1.1081 +		aGc.SetPenColor(KRgbBlue);
  1.1082 +		aGc.DrawText(KGujarati2, textRect4, 100, CGraphicsContext::ELeft);
  1.1083 +		//--------------------------------------------------------------------------
  1.1084 +		// Without the Layout Engine
  1.1085 +		DisableShaping(&KGujarati3, textWithoutShaping );
  1.1086 +		aGc.SetPenColor(KRgbBlack);
  1.1087 +		aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
  1.1088 +
  1.1089 +		aGc.SetPenColor(KRgbBlue);
  1.1090 +		aGc.DrawText(KGujarati3, textRect6, 100, CGraphicsContext::ELeft);
  1.1091 +		//--------------------------------------------------------------------------
  1.1092 +		break;
  1.1093 +		//Gujarati Sample 2
  1.1094 +		
  1.1095 +	case 10:		
  1.1096 +		DisableShaping(&KGujarati4, textWithoutShaping );
  1.1097 +		aGc.SetPenColor(KRgbBlack);
  1.1098 +		aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
  1.1099 +
  1.1100 +		aGc.SetPenColor(KRgbBlue);
  1.1101 +		aGc.DrawText(KGujarati4, textRect2, 100, CGraphicsContext::ELeft);
  1.1102 +	
  1.1103 +		//--------------------------------------------------------------------------
  1.1104 +		// Without the Layout Engine
  1.1105 +		DisableShaping(&KGujarati5, textWithoutShaping );
  1.1106 +		aGc.SetPenColor(KRgbBlack);
  1.1107 +		aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
  1.1108 +
  1.1109 +		aGc.SetPenColor(KRgbBlue);
  1.1110 +		aGc.DrawText(KGujarati5, textRect4, 100, CGraphicsContext::ELeft);
  1.1111 +		//--------------------------------------------------------------------------
  1.1112 +		// Without the Layout Engine
  1.1113 +		DisableShaping(&KGujarati6, textWithoutShaping );
  1.1114 +		aGc.SetPenColor(KRgbBlack);
  1.1115 +		aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
  1.1116 +
  1.1117 +		aGc.SetPenColor(KRgbBlue);
  1.1118 +		aGc.DrawText(KGujarati6, textRect6, 100, CGraphicsContext::ELeft);
  1.1119 +		//--------------------------------------------------------------------------
  1.1120 +		break;
  1.1121 +		
  1.1122 +		//Gujarati Sample 3
  1.1123 +	
  1.1124 +	case 11:	
  1.1125 +		DisableShaping(&KGujarati7, textWithoutShaping );
  1.1126 +		aGc.SetPenColor(KRgbBlack);
  1.1127 +		aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
  1.1128 +
  1.1129 +		aGc.SetPenColor(KRgbBlue);
  1.1130 +		aGc.DrawText(KGujarati7, textRect2, 100, CGraphicsContext::ELeft);
  1.1131 +	
  1.1132 +		//--------------------------------------------------------------------------
  1.1133 +		// Without the Layout Engine
  1.1134 +		DisableShaping(&KGujarati8, textWithoutShaping );
  1.1135 +		aGc.SetPenColor(KRgbBlack);
  1.1136 +		aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
  1.1137 +
  1.1138 +		aGc.SetPenColor(KRgbBlue);
  1.1139 +		aGc.DrawText(KGujarati8, textRect4, 100, CGraphicsContext::ELeft);
  1.1140 +		//--------------------------------------------------------------------------
  1.1141 +		// Without the Layout Engine
  1.1142 +		DisableShaping(&KGujarati9, textWithoutShaping );
  1.1143 +		aGc.SetPenColor(KRgbBlack);
  1.1144 +		aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
  1.1145 +
  1.1146 +		aGc.SetPenColor(KRgbBlue);
  1.1147 +		aGc.DrawText(KGujarati9, textRect6, 100, CGraphicsContext::ELeft);
  1.1148 +		//--------------------------------------------------------------------------
  1.1149 +		break;
  1.1150 +		//Gujarati Sample 4 	
  1.1151 +	case 12:
  1.1152 +		
  1.1153 +		DisableShaping(&KTestGujarati1, textWithoutShaping );
  1.1154 +		aGc.DrawText(KTestGujarati1, textRect, 100, CGraphicsContext::ELeft);
  1.1155 +
  1.1156 +		aGc.SetPenColor(KRgbBlue);
  1.1157 +		aGc.DrawText(KTestGujarati1, textRect2, 100, CGraphicsContext::ELeft);
  1.1158 +	
  1.1159 +		//--------------------------------------------------------------------------
  1.1160 +		// Without the Layout Engine
  1.1161 +
  1.1162 +		aGc.SetPenColor(KRgbBlack);
  1.1163 +		aGc.DrawText(KTestGujarati2, textRect3, 100, CGraphicsContext::ELeft);
  1.1164 +		// With the Layout Engine
  1.1165 +
  1.1166 +		aGc.SetPenColor(KRgbBlue);
  1.1167 +		aGc.DrawText(KTestGujarati2, textRect4, 100, CGraphicsContext::ELeft);
  1.1168 +		//--------------------------------------------------------------------------
  1.1169 +		// Without the Layout Engine
  1.1170 +
  1.1171 +		aGc.SetPenColor(KRgbBlack);
  1.1172 +		aGc.DrawText(KTestGujarati3, textRect5, 100, CGraphicsContext::ELeft);
  1.1173 +		// With the Layout Engine
  1.1174 +
  1.1175 +		aGc.SetPenColor(KRgbBlue);
  1.1176 +		aGc.DrawText(KTestGujarati3, textRect6, 100, CGraphicsContext::ELeft);
  1.1177 +		//--------------------------------------------------------------------------
  1.1178 +		
  1.1179 +		break;
  1.1180 +		//Bengali Sample 1
  1.1181 +	case 13:		
  1.1182 +	// First draw in Black with shaping disabled
  1.1183 +		DisableShaping(&KBengali1, textWithoutShaping );
  1.1184 +		aGc.SetPenColor(KRgbBlack);
  1.1185 +		aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
  1.1186 +
  1.1187 +		// Now in Blue with shaping
  1.1188 +		aGc.SetPenColor(KRgbBlue);
  1.1189 +		aGc.DrawText(KBengali1, textRect2, 100, CGraphicsContext::ELeft);
  1.1190 +	
  1.1191 +		//--------------------------------------------------------------------------
  1.1192 +		// Without the Layout Engine
  1.1193 +		aGc.SetPenColor(KRgbBlack);
  1.1194 +		DisableShaping(&KBengali2, textWithoutShaping );
  1.1195 +		aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
  1.1196 +
  1.1197 +		aGc.SetPenColor(KRgbBlue);
  1.1198 +		aGc.DrawText(KBengali2, textRect4, 100, CGraphicsContext::ELeft);
  1.1199 +		//--------------------------------------------------------------------------
  1.1200 +		// Without the Layout Engine
  1.1201 +		DisableShaping(&KBengali3, textWithoutShaping );
  1.1202 +		aGc.SetPenColor(KRgbBlack);
  1.1203 +		aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
  1.1204 +
  1.1205 +		aGc.SetPenColor(KRgbBlue);
  1.1206 +		aGc.DrawText(KBengali3, textRect6, 100, CGraphicsContext::ELeft);
  1.1207 +		//--------------------------------------------------------------------------
  1.1208 +		break;
  1.1209 +		//Bengali Sample 2
  1.1210 +		
  1.1211 +	case 14:		
  1.1212 +		DisableShaping(&KBengali4, textWithoutShaping );
  1.1213 +		aGc.SetPenColor(KRgbBlack);
  1.1214 +		aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
  1.1215 +
  1.1216 +		aGc.SetPenColor(KRgbBlue);
  1.1217 +		aGc.DrawText(KBengali4, textRect2, 100, CGraphicsContext::ELeft);
  1.1218 +	
  1.1219 +		//--------------------------------------------------------------------------
  1.1220 +		// Without the Layout Engine
  1.1221 +		DisableShaping(&KBengali5, textWithoutShaping );
  1.1222 +		aGc.SetPenColor(KRgbBlack);
  1.1223 +		aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
  1.1224 +
  1.1225 +		aGc.SetPenColor(KRgbBlue);
  1.1226 +		aGc.DrawText(KBengali5, textRect4, 100, CGraphicsContext::ELeft);
  1.1227 +		//--------------------------------------------------------------------------
  1.1228 +		// Without the Layout Engine
  1.1229 +		DisableShaping(&KBengali6, textWithoutShaping );
  1.1230 +		aGc.SetPenColor(KRgbBlack);
  1.1231 +		aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
  1.1232 +
  1.1233 +		aGc.SetPenColor(KRgbBlue);
  1.1234 +		aGc.DrawText(KBengali6, textRect6, 100, CGraphicsContext::ELeft);
  1.1235 +		//--------------------------------------------------------------------------
  1.1236 +		break;
  1.1237 +		
  1.1238 +		//Bengali Sample 3
  1.1239 +	
  1.1240 +	case 15:	
  1.1241 +		DisableShaping(&KBengali7, textWithoutShaping );
  1.1242 +		aGc.SetPenColor(KRgbBlack);
  1.1243 +		aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
  1.1244 +
  1.1245 +		aGc.SetPenColor(KRgbBlue);
  1.1246 +		aGc.DrawText(KBengali7, textRect2, 100, CGraphicsContext::ELeft);
  1.1247 +	
  1.1248 +		//--------------------------------------------------------------------------
  1.1249 +		// Without the Layout Engine
  1.1250 +		DisableShaping(&KBengali8, textWithoutShaping );
  1.1251 +		aGc.SetPenColor(KRgbBlack);
  1.1252 +		aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
  1.1253 +
  1.1254 +		aGc.SetPenColor(KRgbBlue);
  1.1255 +		aGc.DrawText(KBengali8, textRect4, 100, CGraphicsContext::ELeft);
  1.1256 +		//--------------------------------------------------------------------------
  1.1257 +		// Without the Layout Engine
  1.1258 +		DisableShaping(&KBengali9, textWithoutShaping );
  1.1259 +		aGc.SetPenColor(KRgbBlack);
  1.1260 +		aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
  1.1261 +
  1.1262 +		aGc.SetPenColor(KRgbBlue);
  1.1263 +		aGc.DrawText(KBengali9, textRect6, 100, CGraphicsContext::ELeft);
  1.1264 +		//--------------------------------------------------------------------------
  1.1265 +		break;
  1.1266 +		//Bengali Sample 4 	
  1.1267 +	case 16:
  1.1268 +		
  1.1269 +		DisableShaping(&KTestBengali1, textWithoutShaping );
  1.1270 +		aGc.DrawText(KTestBengali1, textRect, 100, CGraphicsContext::ELeft);
  1.1271 +
  1.1272 +		aGc.SetPenColor(KRgbBlue);
  1.1273 +		aGc.DrawText(KTestBengali1, textRect2, 100, CGraphicsContext::ELeft);
  1.1274 +	
  1.1275 +		//--------------------------------------------------------------------------
  1.1276 +		// Without the Layout Engine
  1.1277 +
  1.1278 +		aGc.SetPenColor(KRgbBlack);
  1.1279 +		aGc.DrawText(KTestBengali2, textRect3, 100, CGraphicsContext::ELeft);
  1.1280 +		// With the Layout Engine
  1.1281 +
  1.1282 +		aGc.SetPenColor(KRgbBlue);
  1.1283 +		aGc.DrawText(KTestBengali2, textRect4, 100, CGraphicsContext::ELeft);
  1.1284 +		//--------------------------------------------------------------------------
  1.1285 +		// Without the Layout Engine
  1.1286 +
  1.1287 +		aGc.SetPenColor(KRgbBlack);
  1.1288 +		aGc.DrawText(KTestBengali3, textRect5, 100, CGraphicsContext::ELeft);
  1.1289 +		// With the Layout Engine
  1.1290 +
  1.1291 +		aGc.SetPenColor(KRgbBlue);
  1.1292 +		aGc.DrawText(KTestBengali3, textRect6, 100, CGraphicsContext::ELeft);
  1.1293 +		//--------------------------------------------------------------------------
  1.1294 +		
  1.1295 +		break;	
  1.1296 +		
  1.1297 +	case 17:
  1.1298 +	//Tamil Sample 1
  1.1299 +	// First draw in Black with shaping disabled
  1.1300 +		DisableShaping(&KTamil1, textWithoutShaping );
  1.1301 +		aGc.SetPenColor(KRgbBlack);
  1.1302 +		aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
  1.1303 +
  1.1304 +		// Now in Blue with shaping
  1.1305 +		aGc.SetPenColor(KRgbBlue);
  1.1306 +		aGc.DrawText(KTamil1, textRect2, 100, CGraphicsContext::ELeft);
  1.1307 +	
  1.1308 +		//--------------------------------------------------------------------------
  1.1309 +		// Without the Layout Engine
  1.1310 +		aGc.SetPenColor(KRgbBlack);
  1.1311 +		DisableShaping(&KTamil2, textWithoutShaping );
  1.1312 +		aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
  1.1313 +
  1.1314 +		aGc.SetPenColor(KRgbBlue);
  1.1315 +		aGc.DrawText(KTamil2, textRect4, 100, CGraphicsContext::ELeft);
  1.1316 +		//--------------------------------------------------------------------------
  1.1317 +		// Without the Layout Engine
  1.1318 +		DisableShaping(&KTamil3, textWithoutShaping );
  1.1319 +		aGc.SetPenColor(KRgbBlack);
  1.1320 +		aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
  1.1321 +
  1.1322 +		aGc.SetPenColor(KRgbBlue);
  1.1323 +		aGc.DrawText(KTamil3, textRect6, 100, CGraphicsContext::ELeft);
  1.1324 +		//--------------------------------------------------------------------------
  1.1325 +		break;
  1.1326 +	case 18:		
  1.1327 +	//Tamil Sample 2
  1.1328 +	// First draw in Black with shaping disabled
  1.1329 +		DisableShaping(&KTamil4, textWithoutShaping );
  1.1330 +		aGc.SetPenColor(KRgbBlack);
  1.1331 +		aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
  1.1332 +
  1.1333 +		aGc.SetPenColor(KRgbBlue);
  1.1334 +		aGc.DrawText(KTamil4, textRect2, 100, CGraphicsContext::ELeft);
  1.1335 +	
  1.1336 +		//--------------------------------------------------------------------------
  1.1337 +		// Without the Layout Engine
  1.1338 +		DisableShaping(&KTamil5, textWithoutShaping );
  1.1339 +		aGc.SetPenColor(KRgbBlack);
  1.1340 +		aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
  1.1341 +
  1.1342 +		aGc.SetPenColor(KRgbBlue);
  1.1343 +		aGc.DrawText(KTamil5, textRect4, 100, CGraphicsContext::ELeft);
  1.1344 +		//--------------------------------------------------------------------------
  1.1345 +		// Without the Layout Engine
  1.1346 +		DisableShaping(&KTamil6, textWithoutShaping );
  1.1347 +		aGc.SetPenColor(KRgbBlack);
  1.1348 +		aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
  1.1349 +
  1.1350 +		aGc.SetPenColor(KRgbBlue);
  1.1351 +		aGc.DrawText(KTamil6, textRect6, 100, CGraphicsContext::ELeft);
  1.1352 +		//--------------------------------------------------------------------------
  1.1353 +		break;
  1.1354 +				
  1.1355 +	case 19:
  1.1356 +	//Tamil Sample 3
  1.1357 +	// First draw in Black with shaping disabled
  1.1358 +		DisableShaping(&KTamil7, textWithoutShaping );
  1.1359 +		aGc.SetPenColor(KRgbBlack);
  1.1360 +		aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
  1.1361 +
  1.1362 +		aGc.SetPenColor(KRgbBlue);
  1.1363 +		aGc.DrawText(KTamil7, textRect2, 100, CGraphicsContext::ELeft);
  1.1364 +	
  1.1365 +		//--------------------------------------------------------------------------
  1.1366 +		// Without the Layout Engine
  1.1367 +		DisableShaping(&KTamil8, textWithoutShaping );
  1.1368 +		aGc.SetPenColor(KRgbBlack);
  1.1369 +		aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
  1.1370 +
  1.1371 +		aGc.SetPenColor(KRgbBlue);
  1.1372 +		aGc.DrawText(KTamil8, textRect4, 100, CGraphicsContext::ELeft);
  1.1373 +		//--------------------------------------------------------------------------
  1.1374 +		// Without the Layout Engine
  1.1375 +		DisableShaping(&KTamil9, textWithoutShaping );
  1.1376 +		aGc.SetPenColor(KRgbBlack);
  1.1377 +		aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
  1.1378 +
  1.1379 +		aGc.SetPenColor(KRgbBlue);
  1.1380 +		aGc.DrawText(KTamil9, textRect6, 100, CGraphicsContext::ELeft);
  1.1381 +		//--------------------------------------------------------------------------
  1.1382 +		break;
  1.1383 +	case 20:
  1.1384 +	//Tamil Sample 4
  1.1385 +	// First draw in Black with shaping disabled
  1.1386 +		DisableShaping(&KTestTamil1, textWithoutShaping );
  1.1387 +		aGc.DrawText(KTestBengali1, textRect, 100, CGraphicsContext::ELeft);
  1.1388 +
  1.1389 +		aGc.SetPenColor(KRgbBlue);
  1.1390 +		aGc.DrawText(KTestTamil1, textRect2, 100, CGraphicsContext::ELeft);
  1.1391 +	
  1.1392 +		//--------------------------------------------------------------------------
  1.1393 +		// Without the Layout Engine
  1.1394 +
  1.1395 +		aGc.SetPenColor(KRgbBlack);
  1.1396 +		aGc.DrawText(KTestTamil2, textRect3, 100, CGraphicsContext::ELeft);
  1.1397 +		// With the Layout Engine
  1.1398 +
  1.1399 +		aGc.SetPenColor(KRgbBlue);
  1.1400 +		aGc.DrawText(KTestTamil2, textRect4, 100, CGraphicsContext::ELeft);
  1.1401 +		//--------------------------------------------------------------------------
  1.1402 +		// Without the Layout Engine
  1.1403 +
  1.1404 +		aGc.SetPenColor(KRgbBlack);
  1.1405 +		aGc.DrawText(KTestTamil3, textRect5, 100, CGraphicsContext::ELeft);
  1.1406 +		// With the Layout Engine
  1.1407 +
  1.1408 +		aGc.SetPenColor(KRgbBlue);
  1.1409 +		aGc.DrawText(KTestTamil3, textRect6, 100, CGraphicsContext::ELeft);
  1.1410 +		//--------------------------------------------------------------------------
  1.1411 +		
  1.1412 +		break;	
  1.1413 +		
  1.1414 +	case 21:	
  1.1415 +	//Telugu Sample 1
  1.1416 +	// First draw in Black with shaping disabled
  1.1417 +		DisableShaping(&KTelugu1, textWithoutShaping );
  1.1418 +		aGc.SetPenColor(KRgbBlack);
  1.1419 +		aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
  1.1420 +
  1.1421 +		// Now in Blue with shaping
  1.1422 +		aGc.SetPenColor(KRgbBlue);
  1.1423 +		aGc.DrawText(KTelugu1, textRect2, 100, CGraphicsContext::ELeft);
  1.1424 +	
  1.1425 +		//--------------------------------------------------------------------------
  1.1426 +		// Without the Layout Engine
  1.1427 +		aGc.SetPenColor(KRgbBlack);
  1.1428 +		DisableShaping(&KTelugu2, textWithoutShaping );
  1.1429 +		aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
  1.1430 +
  1.1431 +		aGc.SetPenColor(KRgbBlue);
  1.1432 +		aGc.DrawText(KTelugu2, textRect4, 100, CGraphicsContext::ELeft);
  1.1433 +		//--------------------------------------------------------------------------
  1.1434 +		// Without the Layout Engine
  1.1435 +		DisableShaping(&KTelugu3, textWithoutShaping );
  1.1436 +		aGc.SetPenColor(KRgbBlack);
  1.1437 +		aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
  1.1438 +
  1.1439 +		aGc.SetPenColor(KRgbBlue);
  1.1440 +		aGc.DrawText(KTelugu3, textRect6, 100, CGraphicsContext::ELeft);
  1.1441 +		//--------------------------------------------------------------------------
  1.1442 +		break;
  1.1443 +				
  1.1444 +	case 22:
  1.1445 +	//Telugu Sample 2
  1.1446 +	// First draw in Black with shaping disabled
  1.1447 +		DisableShaping(&KTelugu4, textWithoutShaping );
  1.1448 +		aGc.SetPenColor(KRgbBlack);
  1.1449 +		aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
  1.1450 +
  1.1451 +		aGc.SetPenColor(KRgbBlue);
  1.1452 +		aGc.DrawText(KTelugu4, textRect2, 100, CGraphicsContext::ELeft);
  1.1453 +	
  1.1454 +		//--------------------------------------------------------------------------
  1.1455 +		// Without the Layout Engine
  1.1456 +		DisableShaping(&KTelugu5, textWithoutShaping );
  1.1457 +		aGc.SetPenColor(KRgbBlack);
  1.1458 +		aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
  1.1459 +
  1.1460 +		aGc.SetPenColor(KRgbBlue);
  1.1461 +		aGc.DrawText(KTelugu5, textRect4, 100, CGraphicsContext::ELeft);
  1.1462 +		//--------------------------------------------------------------------------
  1.1463 +		// Without the Layout Engine
  1.1464 +		DisableShaping(&KTelugu6, textWithoutShaping );
  1.1465 +		aGc.SetPenColor(KRgbBlack);
  1.1466 +		aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
  1.1467 +
  1.1468 +		aGc.SetPenColor(KRgbBlue);
  1.1469 +		aGc.DrawText(KTelugu6, textRect6, 100, CGraphicsContext::ELeft);
  1.1470 +		//--------------------------------------------------------------------------
  1.1471 +		break;
  1.1472 +					
  1.1473 +	case 23:
  1.1474 +	//Telugu Sample 3
  1.1475 +	// First draw in Black with shaping disabled
  1.1476 +		DisableShaping(&KTelugu7, textWithoutShaping );
  1.1477 +		aGc.SetPenColor(KRgbBlack);
  1.1478 +		aGc.DrawText(textWithoutShaping, textRect, 100, CGraphicsContext::ELeft);
  1.1479 +
  1.1480 +		aGc.SetPenColor(KRgbBlue);
  1.1481 +		aGc.DrawText(KTelugu7, textRect2, 100, CGraphicsContext::ELeft);
  1.1482 +	
  1.1483 +		//--------------------------------------------------------------------------
  1.1484 +		// Without the Layout Engine
  1.1485 +		DisableShaping(&KTelugu8, textWithoutShaping );
  1.1486 +		aGc.SetPenColor(KRgbBlack);
  1.1487 +		aGc.DrawText(textWithoutShaping, textRect3, 100, CGraphicsContext::ELeft);
  1.1488 +
  1.1489 +		aGc.SetPenColor(KRgbBlue);
  1.1490 +		aGc.DrawText(KTelugu8, textRect4, 100, CGraphicsContext::ELeft);
  1.1491 +		//--------------------------------------------------------------------------
  1.1492 +		// Without the Layout Engine
  1.1493 +		DisableShaping(&KTelugu9, textWithoutShaping );
  1.1494 +		aGc.SetPenColor(KRgbBlack);
  1.1495 +		aGc.DrawText(textWithoutShaping, textRect5, 100, CGraphicsContext::ELeft);
  1.1496 +
  1.1497 +		aGc.SetPenColor(KRgbBlue);
  1.1498 +		aGc.DrawText(KTelugu9, textRect6, 100, CGraphicsContext::ELeft);
  1.1499 +		//--------------------------------------------------------------------------
  1.1500 +		break;
  1.1501 +		
  1.1502 +	case 24:
  1.1503 +	//Telugu Sample 4
  1.1504 +	// First draw in Black with shaping disabled		
  1.1505 +		DisableShaping(&KTestTelugu1, textWithoutShaping );
  1.1506 +		aGc.DrawText(KTestTelugu1, textRect, 100, CGraphicsContext::ELeft);
  1.1507 +
  1.1508 +		aGc.SetPenColor(KRgbBlue);
  1.1509 +		aGc.DrawText(KTestTelugu1, textRect2, 100, CGraphicsContext::ELeft);
  1.1510 +	
  1.1511 +		//--------------------------------------------------------------------------
  1.1512 +		// Without the Layout Engine
  1.1513 +
  1.1514 +		aGc.SetPenColor(KRgbBlack);
  1.1515 +		aGc.DrawText(KTestTelugu2, textRect3, 100, CGraphicsContext::ELeft);
  1.1516 +		// With the Layout Engine
  1.1517 +
  1.1518 +		aGc.SetPenColor(KRgbBlue);
  1.1519 +		aGc.DrawText(KTestTelugu2, textRect4, 100, CGraphicsContext::ELeft);
  1.1520 +		//--------------------------------------------------------------------------
  1.1521 +		// Without the Layout Engine
  1.1522 +
  1.1523 +		aGc.SetPenColor(KRgbBlack);
  1.1524 +		aGc.DrawText(KTestTelugu3, textRect5, 100, CGraphicsContext::ELeft);
  1.1525 +		// With the Layout Engine
  1.1526 +
  1.1527 +		aGc.SetPenColor(KRgbBlue);
  1.1528 +		aGc.DrawText(KTestTelugu3, textRect6, 100, CGraphicsContext::ELeft);
  1.1529 +		//--------------------------------------------------------------------------
  1.1530 +		break;	
  1.1531 +	default:
  1.1532 +		break;		
  1.1533 +	}
  1.1534 +	// Discard and destroy the font
  1.1535 +	aGc.DiscardFont();
  1.1536 +	screenDevice->ReleaseFont(myFont);
  1.1537 +	}
  1.1538 +
  1.1539 +// CHindiAppUi
  1.1540 +
  1.1541 +CHindiAppUi::~CHindiAppUi()
  1.1542 +	{
  1.1543 +	RemoveFromStack(iAppView);
  1.1544 +	delete iAppView;
  1.1545 +	}
  1.1546 +
  1.1547 +void CHindiAppUi::ConstructL()
  1.1548 +	{
  1.1549 +	BaseConstructL();
  1.1550 +	iAppView=new(ELeave) CHindiContainer;
  1.1551 +	iAppView->ConstructL(ClientRect());
  1.1552 +	AddToStackL(iAppView);
  1.1553 +	}
  1.1554 +
  1.1555 +void CHindiAppUi::HandleCommandL(TInt aCommand)
  1.1556 +	{
  1.1557 +	TCharFormat charFormat;
  1.1558 +	TCharFormatMask charMask;
  1.1559 +	
  1.1560 +	switch (aCommand)
  1.1561 +		{
  1.1562 +		case EEikCmdExit:
  1.1563 +			Exit();
  1.1564 +			break;
  1.1565 +			
  1.1566 +		case EEikCmdFont:
  1.1567 +			if ( CEikFontDialog::RunDlgLD(charFormat, charMask, EGulNoSymbolFonts, iCoeEnv->ScreenDevice()) )
  1.1568 +				{
  1.1569 +				// save the selected font in the view
  1.1570 +				iAppView->SetHindiFont( charFormat.iFontSpec );
  1.1571 +				iAppView->DrawNow();
  1.1572 +				}
  1.1573 +			break;
  1.1574 +			
  1.1575 +		case EEikCmdSample1:
  1.1576 +			iAppView->ChangeSample(1);
  1.1577 +			iAppView->DrawNow();
  1.1578 +			break;
  1.1579 +		case EEikCmdSample2:
  1.1580 +			iAppView->ChangeSample(2);
  1.1581 +			iAppView->DrawNow();
  1.1582 +			break;
  1.1583 +		case EEikCmdSample3:
  1.1584 +			iAppView->ChangeSample(3);
  1.1585 +			iAppView->DrawNow();
  1.1586 +			break;
  1.1587 +		case EEikCmdSample4:
  1.1588 +			iAppView->ChangeSample(4);
  1.1589 +			iAppView->DrawNow();
  1.1590 +			break;
  1.1591 +		case EEikCmdSample5:
  1.1592 +			iAppView->ChangeSample(5);
  1.1593 +			iAppView->DrawNow();
  1.1594 +			break;
  1.1595 +		case EEikCmdSample6:
  1.1596 +			iAppView->ChangeSample(6);
  1.1597 +			iAppView->DrawNow();
  1.1598 +			break;
  1.1599 +		case EEikCmdSample7:
  1.1600 +			iAppView->ChangeSample(7);
  1.1601 +			iAppView->DrawNow();
  1.1602 +			break;
  1.1603 +		case EEikCmdSample8:
  1.1604 +			iAppView->ChangeSample(8);
  1.1605 +			iAppView->DrawNow();
  1.1606 +			break;
  1.1607 +		case EEikCmdSample9:
  1.1608 +			iAppView->ChangeSample(9);
  1.1609 +			iAppView->DrawNow();
  1.1610 +			break;
  1.1611 +		case EEikCmdSample10:
  1.1612 +			iAppView->ChangeSample(10);
  1.1613 +			iAppView->DrawNow();
  1.1614 +			break;
  1.1615 +		case EEikCmdSample11:
  1.1616 +			iAppView->ChangeSample(11);
  1.1617 +			iAppView->DrawNow();
  1.1618 +			break;
  1.1619 +		case EEikCmdSample12:
  1.1620 +			iAppView->ChangeSample(12);
  1.1621 +			iAppView->DrawNow();
  1.1622 +		case EEikCmdSample13:
  1.1623 +			iAppView->ChangeSample(13);
  1.1624 +			iAppView->DrawNow();
  1.1625 +			break;
  1.1626 +		case EEikCmdSample14:
  1.1627 +			iAppView->ChangeSample(14);
  1.1628 +			iAppView->DrawNow();
  1.1629 +			break;
  1.1630 +		case EEikCmdSample15:
  1.1631 +			iAppView->ChangeSample(15);
  1.1632 +			iAppView->DrawNow();
  1.1633 +			break;
  1.1634 +		case EEikCmdSample16:
  1.1635 +			iAppView->ChangeSample(16);
  1.1636 +			iAppView->DrawNow();
  1.1637 +			break;
  1.1638 +		case EEikCmdSample17:
  1.1639 +			iAppView->ChangeSample(17);
  1.1640 +			iAppView->DrawNow();
  1.1641 +			break;
  1.1642 +		case EEikCmdSample18:
  1.1643 +			iAppView->ChangeSample(18);
  1.1644 +			iAppView->DrawNow();
  1.1645 +			break;
  1.1646 +		case EEikCmdSample19:
  1.1647 +			iAppView->ChangeSample(19);
  1.1648 +			iAppView->DrawNow();
  1.1649 +			break;
  1.1650 +		case EEikCmdSample20:
  1.1651 +			iAppView->ChangeSample(20);
  1.1652 +			iAppView->DrawNow();
  1.1653 +			break;
  1.1654 +		case EEikCmdSample21:
  1.1655 +			iAppView->ChangeSample(21);
  1.1656 +			iAppView->DrawNow();
  1.1657 +			break;
  1.1658 +		case EEikCmdSample22:
  1.1659 +			iAppView->ChangeSample(22);
  1.1660 +			iAppView->DrawNow();
  1.1661 +			break;
  1.1662 +		case EEikCmdSample23:
  1.1663 +			iAppView->ChangeSample(23);
  1.1664 +			iAppView->DrawNow();
  1.1665 +			break;
  1.1666 +		case EEikCmdSample24:
  1.1667 +			iAppView->ChangeSample(24);
  1.1668 +			iAppView->DrawNow();
  1.1669 +			break;
  1.1670 +		case EEikCmdMakeHindiTxt:
  1.1671 +			iAppView->CreateHindiTxtFile();
  1.1672 +			break;
  1.1673 +		case EEikCmdMakeKannadaTxt:
  1.1674 +			iAppView->CreateKannadaTxtFile();
  1.1675 +			break;
  1.1676 +		case EEikCmdMakeGujaratiTxt:
  1.1677 +			iAppView->CreateGujaratiTxtFile();
  1.1678 +			break;
  1.1679 +		case EEikCmdMakeBengaliTxt:
  1.1680 +		 	iAppView->CreateBengaliTxtFile();
  1.1681 +		 	break;
  1.1682 +		case EEikCmdMakeTamilTxt:
  1.1683 +		 	iAppView->CreateTamilTxtFile();
  1.1684 +		 	break;	
  1.1685 +		case EEikCmdMakeTeluguTxt:
  1.1686 +		 	iAppView->CreateTeluguTxtFile();
  1.1687 +		 	break;		 	
  1.1688 +		default:
  1.1689 +		  	Panic(0);
  1.1690 +			break;
  1.1691 +		}
  1.1692 +	}
  1.1693 +
  1.1694 +TKeyResponse CHindiAppUi::HandleKeyEventL(const TKeyEvent&  aKeyEvent, TEventCode /* aType */)
  1.1695 +	{
  1.1696 +	  	switch (aKeyEvent.iCode) 
  1.1697 +  		{
  1.1698 +  	  	case EKeyUpArrow:
  1.1699 + 			// increase font size
  1.1700 + 			iAppView->SetFontSize(iAppView->GetFontSize() +20);
  1.1701 + 			break;
  1.1702 +  	  	case EKeyDownArrow:
  1.1703 + 			// increase font size
  1.1704 + 			iAppView->SetFontSize(iAppView->GetFontSize() -20);
  1.1705 + 			break;
  1.1706 +   	  	case EKeyLeftArrow:
  1.1707 +   	  		// next sample
  1.1708 +			iAppView->ChangeSample(iAppView->GetSample()-1);
  1.1709 + 			break;
  1.1710 +   	  	case EKeyRightArrow:
  1.1711 + 			// increase font size
  1.1712 +			iAppView->ChangeSample(iAppView->GetSample()+1);
  1.1713 + 			break;
  1.1714 +	  	default:
  1.1715 +	   		return EKeyWasNotConsumed;
  1.1716 +	   	}
  1.1717 +	iAppView->DrawNow();
  1.1718 +	return EKeyWasConsumed;  	
  1.1719 +	}
  1.1720 +
  1.1721 +// CHindiEikDocument
  1.1722 +
  1.1723 +CEikAppUi* CHindiEikDocument::CreateAppUiL()
  1.1724 +	{
  1.1725 +	return(new(ELeave) CHindiAppUi);
  1.1726 +	}
  1.1727 +
  1.1728 +void CHindiEikDocument::ConstructL()
  1.1729 +	{
  1.1730 +	}
  1.1731 +
  1.1732 +
  1.1733 +// CHindiApplication
  1.1734 +
  1.1735 +TUid CHindiApplication::AppDllUid() const
  1.1736 +	{
  1.1737 +	return KUidHindiDemoApp;
  1.1738 +	}
  1.1739 +
  1.1740 +CApaDocument* CHindiApplication::CreateDocumentL()
  1.1741 +	{
  1.1742 +	CHindiEikDocument* document=new(ELeave) CHindiEikDocument(*this);
  1.1743 +	CleanupStack::PushL(document);
  1.1744 +	document->ConstructL();
  1.1745 +	CleanupStack::Pop();
  1.1746 +	return(document);
  1.1747 +	}
  1.1748 +
  1.1749 +//
  1.1750 +// EXPORTed functions
  1.1751 +//
  1.1752 +
  1.1753 +// for MCL build 
  1.1754 +#ifdef __SECURE_DATA__
  1.1755 +
  1.1756 +static CApaApplication* NewApplication()
  1.1757 +	{
  1.1758 +	return new CHindiApplication;
  1.1759 +	}
  1.1760 +
  1.1761 +GLDEF_C TInt E32Main()
  1.1762 +	{
  1.1763 +	return EikStart::RunApplication(&NewApplication);
  1.1764 +	}
  1.1765 +
  1.1766 +#else
  1.1767 +
  1.1768 +// for 8.1 build
  1.1769 +EXPORT_C CApaApplication* NewApplication()
  1.1770 +	{
  1.1771 +	return new CHindiApplication;
  1.1772 +	}
  1.1773 +	
  1.1774 +GLDEF_C TInt E32Dll(TDllReason)
  1.1775 +	{
  1.1776 +	return KErrNone;
  1.1777 +	}
  1.1778 +	
  1.1779 +#endif