author | sl@SLION-WIN7.fritz.box |
Fri, 15 Jun 2012 03:10:57 +0200 | |
changeset 0 | bde4ae8d615e |
permissions | -rw-r--r-- |
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.h |
sl@0 | 16 |
* hindiDemo application |
sl@0 | 17 |
* |
sl@0 | 18 |
*/ |
sl@0 | 19 |
|
sl@0 | 20 |
|
sl@0 | 21 |
#ifndef __HINDIDEMO_H |
sl@0 | 22 |
#define __HINDIDEMO_H |
sl@0 | 23 |
|
sl@0 | 24 |
#include <coecntrl.h> |
sl@0 | 25 |
#include <coeccntx.h> |
sl@0 | 26 |
|
sl@0 | 27 |
#include <eikappui.h> |
sl@0 | 28 |
#include <eikapp.h> |
sl@0 | 29 |
#include <eikdoc.h> |
sl@0 | 30 |
#include <e32std.h> |
sl@0 | 31 |
|
sl@0 | 32 |
const TUid KUidHindiDemoApp={ 0x10005102 }; |
sl@0 | 33 |
|
sl@0 | 34 |
class CEikCommandButton; |
sl@0 | 35 |
class CEikLabel; |
sl@0 | 36 |
class CEikRichTextEditor; |
sl@0 | 37 |
|
sl@0 | 38 |
// class CHindiContainer |
sl@0 | 39 |
class CHindiContainer : public CCoeControl, public MCoeControlObserver |
sl@0 | 40 |
{ |
sl@0 | 41 |
public: |
sl@0 | 42 |
void ConstructL(const TRect& aRect); |
sl@0 | 43 |
~CHindiContainer(); |
sl@0 | 44 |
|
sl@0 | 45 |
void ChangeSample( TInt aSample); |
sl@0 | 46 |
TInt GetSample(); |
sl@0 | 47 |
void SetHindiFont( TFontSpec& aFontSpec ); |
sl@0 | 48 |
void SetFontSize( TInt aFontSize ); |
sl@0 | 49 |
TInt GetFontSize(); |
sl@0 | 50 |
void CreateHindiTxtFile() const; |
sl@0 | 51 |
void CreateKannadaTxtFile() const; |
sl@0 | 52 |
void CreateBengaliTxtFile() const; |
sl@0 | 53 |
void CreateTamilTxtFile() const; |
sl@0 | 54 |
void CreateGujaratiTxtFile() const; |
sl@0 | 55 |
void CreateTeluguTxtFile() const; |
sl@0 | 56 |
|
sl@0 | 57 |
private: |
sl@0 | 58 |
void SizeChanged(); |
sl@0 | 59 |
TInt CountComponentControls() const; |
sl@0 | 60 |
CCoeControl* ComponentControl(TInt aIndex) const; |
sl@0 | 61 |
void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType); |
sl@0 | 62 |
void Draw(const TRect& aRect) const; |
sl@0 | 63 |
|
sl@0 | 64 |
void NextTestL(); |
sl@0 | 65 |
|
sl@0 | 66 |
private: |
sl@0 | 67 |
CEikLabel* iTest; |
sl@0 | 68 |
CEikRichTextEditor* iOutputWindow; |
sl@0 | 69 |
|
sl@0 | 70 |
void DrawHindiText(CWindowGc& aGc) const; |
sl@0 | 71 |
void DisableShaping(const TDesC* aInput, TDes& aOutput ) const; |
sl@0 | 72 |
|
sl@0 | 73 |
TInt iSample; |
sl@0 | 74 |
TFontSpec iFontSpec; |
sl@0 | 75 |
TInt iFontSize; |
sl@0 | 76 |
}; |
sl@0 | 77 |
|
sl@0 | 78 |
|
sl@0 | 79 |
// class CHindiEikDocument |
sl@0 | 80 |
|
sl@0 | 81 |
class CHindiEikDocument : public CEikDocument |
sl@0 | 82 |
{ |
sl@0 | 83 |
public: |
sl@0 | 84 |
void ConstructL(); |
sl@0 | 85 |
CHindiEikDocument(CEikApplication& aApp): CEikDocument(aApp) { } |
sl@0 | 86 |
~CHindiEikDocument() {} |
sl@0 | 87 |
// Stop doc file being created |
sl@0 | 88 |
CFileStore* OpenFileL(TBool /*aDoOpen*/, |
sl@0 | 89 |
const TDesC& /*aFilename*/,RFs& /*aFs*/) {return NULL;} |
sl@0 | 90 |
private: |
sl@0 | 91 |
// from CEikDocument |
sl@0 | 92 |
CEikAppUi* CreateAppUiL(); |
sl@0 | 93 |
}; |
sl@0 | 94 |
|
sl@0 | 95 |
// CHindiAppUi |
sl@0 | 96 |
class CHindiAppUi : public CEikAppUi |
sl@0 | 97 |
{ |
sl@0 | 98 |
public: |
sl@0 | 99 |
void ConstructL(); |
sl@0 | 100 |
~CHindiAppUi(); |
sl@0 | 101 |
private: // from CEikAppUi |
sl@0 | 102 |
void HandleCommandL(TInt aCommand); |
sl@0 | 103 |
TKeyResponse HandleKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType); |
sl@0 | 104 |
private: |
sl@0 | 105 |
CHindiContainer * iAppView; |
sl@0 | 106 |
}; |
sl@0 | 107 |
|
sl@0 | 108 |
|
sl@0 | 109 |
// CHindiApplication |
sl@0 | 110 |
class CHindiApplication : public CEikApplication |
sl@0 | 111 |
{ |
sl@0 | 112 |
private: |
sl@0 | 113 |
// from CApaApplication |
sl@0 | 114 |
CApaDocument* CreateDocumentL(); |
sl@0 | 115 |
TUid AppDllUid() const; |
sl@0 | 116 |
}; |
sl@0 | 117 |
#endif |