sl@0: /* sl@0: * Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: sl@0: * hindiDemo.h sl@0: * hindiDemo application sl@0: * sl@0: */ sl@0: sl@0: sl@0: #ifndef __HINDIDEMO_H sl@0: #define __HINDIDEMO_H sl@0: sl@0: #include sl@0: #include sl@0: sl@0: #include sl@0: #include sl@0: #include sl@0: #include sl@0: sl@0: const TUid KUidHindiDemoApp={ 0x10005102 }; sl@0: sl@0: class CEikCommandButton; sl@0: class CEikLabel; sl@0: class CEikRichTextEditor; sl@0: sl@0: // class CHindiContainer sl@0: class CHindiContainer : public CCoeControl, public MCoeControlObserver sl@0: { sl@0: public: sl@0: void ConstructL(const TRect& aRect); sl@0: ~CHindiContainer(); sl@0: sl@0: void ChangeSample( TInt aSample); sl@0: TInt GetSample(); sl@0: void SetHindiFont( TFontSpec& aFontSpec ); sl@0: void SetFontSize( TInt aFontSize ); sl@0: TInt GetFontSize(); sl@0: void CreateHindiTxtFile() const; sl@0: void CreateKannadaTxtFile() const; sl@0: void CreateBengaliTxtFile() const; sl@0: void CreateTamilTxtFile() const; sl@0: void CreateGujaratiTxtFile() const; sl@0: void CreateTeluguTxtFile() const; sl@0: sl@0: private: sl@0: void SizeChanged(); sl@0: TInt CountComponentControls() const; sl@0: CCoeControl* ComponentControl(TInt aIndex) const; sl@0: void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType); sl@0: void Draw(const TRect& aRect) const; sl@0: sl@0: void NextTestL(); sl@0: sl@0: private: sl@0: CEikLabel* iTest; sl@0: CEikRichTextEditor* iOutputWindow; sl@0: sl@0: void DrawHindiText(CWindowGc& aGc) const; sl@0: void DisableShaping(const TDesC* aInput, TDes& aOutput ) const; sl@0: sl@0: TInt iSample; sl@0: TFontSpec iFontSpec; sl@0: TInt iFontSize; sl@0: }; sl@0: sl@0: sl@0: // class CHindiEikDocument sl@0: sl@0: class CHindiEikDocument : public CEikDocument sl@0: { sl@0: public: sl@0: void ConstructL(); sl@0: CHindiEikDocument(CEikApplication& aApp): CEikDocument(aApp) { } sl@0: ~CHindiEikDocument() {} sl@0: // Stop doc file being created sl@0: CFileStore* OpenFileL(TBool /*aDoOpen*/, sl@0: const TDesC& /*aFilename*/,RFs& /*aFs*/) {return NULL;} sl@0: private: sl@0: // from CEikDocument sl@0: CEikAppUi* CreateAppUiL(); sl@0: }; sl@0: sl@0: // CHindiAppUi sl@0: class CHindiAppUi : public CEikAppUi sl@0: { sl@0: public: sl@0: void ConstructL(); sl@0: ~CHindiAppUi(); sl@0: private: // from CEikAppUi sl@0: void HandleCommandL(TInt aCommand); sl@0: TKeyResponse HandleKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType); sl@0: private: sl@0: CHindiContainer * iAppView; sl@0: }; sl@0: sl@0: sl@0: // CHindiApplication sl@0: class CHindiApplication : public CEikApplication sl@0: { sl@0: private: sl@0: // from CApaApplication sl@0: CApaDocument* CreateDocumentL(); sl@0: TUid AppDllUid() const; sl@0: }; sl@0: #endif