|
1 /* |
|
2 * Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0"" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Pen input related enums |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef AKNFEPVKBPINYINANALYSER_H |
|
19 #define AKNFEPVKBPINYINANALYSER_H |
|
20 |
|
21 |
|
22 #include <e32base.h> |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 |
|
28 class TSpellBand; |
|
29 class CPinyinAnalyserDbFeed; |
|
30 |
|
31 /** |
|
32 * Composition no chars ui state |
|
33 * It provides key event handling and internal event handling in composition no chars state |
|
34 * |
|
35 * @lib peninputvkbcn.lib |
|
36 * @since S60 v3.2 |
|
37 */ |
|
38 class CAknFepVkbPinyinAnalyser : public CBase |
|
39 { |
|
40 public: |
|
41 |
|
42 /** |
|
43 * Two-phased constructor. |
|
44 * |
|
45 * @since S60 v3.2 |
|
46 * @param aDb The database file for pinyin or spell |
|
47 * @return The pointer point to CAknFepVkbPinyinAnalyser type object |
|
48 */ |
|
49 static CAknFepVkbPinyinAnalyser* NewL( CPinyinAnalyserDbFeed* aDb ); |
|
50 |
|
51 /** |
|
52 * Destructor. |
|
53 * |
|
54 * @since S60 v3.2 |
|
55 */ |
|
56 virtual ~CAknFepVkbPinyinAnalyser(); |
|
57 |
|
58 /** |
|
59 * Process key event |
|
60 * |
|
61 * @since S60 v3.2 |
|
62 * @param aData Carry information of key pressed |
|
63 * @return ETrue means event was responsed, otherwise EFalse |
|
64 */ |
|
65 |
|
66 |
|
67 TBool AnalyzeL(const TDesC& aInputString); |
|
68 |
|
69 HBufC* LastAnalysisResult(); |
|
70 |
|
71 private: |
|
72 CAknFepVkbPinyinAnalyser(); |
|
73 void ConstructL( CPinyinAnalyserDbFeed* aDb ); |
|
74 TBool DetailAnalyse(const TDesC& aInputString); |
|
75 TBool FindSpell(const TDesC& aSpell, TInt& aSameLength); |
|
76 TInt Compare(const TDesC& aFirst, const TDesC& aSecond, TInt& aSameLength); |
|
77 |
|
78 private: |
|
79 TSpellBand* iParagraph; |
|
80 TPtrC* iSpellLibrary; |
|
81 HBufC* iLastResult; |
|
82 RArray<TInt> iSeperators; |
|
83 CPinyinAnalyserDbFeed* iDb; |
|
84 TBool iAnalysisFlag; |
|
85 }; |
|
86 |
|
87 |
|
88 |
|
89 |
|
90 |
|
91 |
|
92 |
|
93 |
|
94 |
|
95 |
|
96 |
|
97 |
|
98 |
|
99 #endif // AKNFEPVKBPINYINANALYSER_H |