|
1 /* |
|
2 * Copyright (c) 2009 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: |
|
15 * |
|
16 */ |
|
17 #ifndef C_CHNSPLITITUTUISTATEPREDICTBASE_H |
|
18 #define C_CHNSPLITITUTUISTATEPREDICTBASE_H |
|
19 |
|
20 #include "peninputsplititutuistatebase.h" |
|
21 |
|
22 /** |
|
23 * class CChnSplitItutUiStatePredict. |
|
24 * |
|
25 * chinese split itu-t predict state |
|
26 * |
|
27 * @lib peninputsplititut.lib |
|
28 * @since S60 v5.0 |
|
29 */ |
|
30 class CChnSplitItutUiStatePredict : public CSplitItutUiStateBase |
|
31 { |
|
32 public: |
|
33 /** |
|
34 * Symbian constructor. |
|
35 * |
|
36 * @since S60 5.0 |
|
37 * |
|
38 * @param aOwner |
|
39 * @return Pointer to created CChnSplitItutUiStatePredict object |
|
40 */ |
|
41 static CChnSplitItutUiStatePredict* NewL(CSplitItutUiMgrBase* aOwner); |
|
42 |
|
43 /** |
|
44 * standard c++ destructor. |
|
45 * |
|
46 * @since S60 5.0 |
|
47 * @return none |
|
48 */ |
|
49 ~CChnSplitItutUiStatePredict(); |
|
50 |
|
51 /** |
|
52 * From CSplitItutUiStateBase |
|
53 * exit current state |
|
54 * |
|
55 * @since S60 5.0 |
|
56 * @return none |
|
57 */ |
|
58 void OnExit(); |
|
59 |
|
60 /** |
|
61 * From CSplitItutUiStateBase |
|
62 * exit current state |
|
63 * |
|
64 * @since S60 5.0 |
|
65 * @return none |
|
66 */ |
|
67 void OnEntryL(); |
|
68 |
|
69 /** |
|
70 * From CSplitItutUiStateBase |
|
71 * exit current state |
|
72 * |
|
73 * @since S60 5.0 |
|
74 * @return |
|
75 */ |
|
76 CSplitItutUiMgrBase::TUiState StateType(); |
|
77 |
|
78 /** |
|
79 * From CSplitItutUiStateBase |
|
80 * handle key event |
|
81 * |
|
82 * @since S60 5.0 |
|
83 * @param aCmd |
|
84 * @param aKey |
|
85 * @return none |
|
86 */ |
|
87 TBool HandleKeyL(TInt aCmd, TInt aKey); |
|
88 |
|
89 /** |
|
90 * From CSplitItutUiStateBase |
|
91 * handle control event |
|
92 * |
|
93 * @since S60 5.0 |
|
94 * @param aEventType |
|
95 * @param aCtrl |
|
96 * @param aEventData |
|
97 * @return none |
|
98 */ |
|
99 TBool HandleCtrlEventL( TInt aEventType, |
|
100 CFepUiBaseCtrl* aCtrl, |
|
101 const TDesC& aEventData); |
|
102 |
|
103 protected: |
|
104 /** |
|
105 * C++ constructor |
|
106 * |
|
107 * @since S60 5.0 |
|
108 * @param aOwner |
|
109 * @return none |
|
110 */ |
|
111 CChnSplitItutUiStatePredict(CSplitItutUiMgrBase* aOwner); |
|
112 |
|
113 private: |
|
114 /** |
|
115 * is valid key |
|
116 * |
|
117 * @since S60 5.0 |
|
118 * @param aKey |
|
119 * @return none |
|
120 */ |
|
121 TBool IsKeyValid(TInt aKey); |
|
122 |
|
123 /** |
|
124 * remove duplicate candidate |
|
125 * |
|
126 * @since S60 5.0 |
|
127 * @param aSrc |
|
128 * @param aTgt |
|
129 * @param aSrcStartIdx |
|
130 * @param aTgtStartIdx |
|
131 * @return none |
|
132 */ |
|
133 TInt RemoveDuplicateCand(const RPointerArray<HBufC>& aSrc, |
|
134 RPointerArray<HBufC>& aTgt, |
|
135 TInt aSrcStartIdx, |
|
136 TInt aTgtStartIdx); |
|
137 |
|
138 private: |
|
139 |
|
140 /** |
|
141 * last over lap index |
|
142 */ |
|
143 TInt iLastOverlapIdx; |
|
144 }; |
|
145 |
|
146 #endif //C_CHNSPLITITUTUISTATEPREDICTBASE_H |