|
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: drop-down list control |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_SPLITITUTUIMGRBASE_H |
|
20 #define C_SPLITITUTUIMGRBASE_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <ptidefs.h> |
|
24 |
|
25 class CSplitItutUiStateBase; |
|
26 class MSplitItutLayoutContext; |
|
27 class CSplitItutDataMgr; |
|
28 class CFepUiBaseCtrl; |
|
29 class CSplitItutWindowManager; |
|
30 |
|
31 /** |
|
32 * class CSplitItutUiMgrBase. |
|
33 * |
|
34 * Split itut ui manager base class. |
|
35 * |
|
36 * @lib peninputsplititut.lib |
|
37 * @since S60 v5.0 |
|
38 */ |
|
39 class CSplitItutUiMgrBase : public CBase |
|
40 { |
|
41 public: |
|
42 enum TUiState |
|
43 { |
|
44 EStateNull, |
|
45 // chinese ui state |
|
46 EStateStandby, |
|
47 EStateComposition, |
|
48 EStatePredict, |
|
49 // western ui state |
|
50 EStateWesternStandby |
|
51 }; |
|
52 |
|
53 public: |
|
54 /** |
|
55 * standard c++ destructor. |
|
56 * |
|
57 * @since S60 v5.0 |
|
58 * @return None |
|
59 */ |
|
60 virtual ~CSplitItutUiMgrBase(); |
|
61 |
|
62 /** |
|
63 * handle command |
|
64 * |
|
65 * @since S60 v5.0 |
|
66 * @param aCmd |
|
67 * @param aData |
|
68 * @return TBool |
|
69 */ |
|
70 virtual TInt HandleCommandL(TInt aCmd, TUint8* aData); |
|
71 |
|
72 /** |
|
73 * handle control event |
|
74 * |
|
75 * @since S60 v5.0 |
|
76 * @param aEventType |
|
77 * @param aCtrl |
|
78 * @param aEventData |
|
79 * @return TBool |
|
80 */ |
|
81 virtual TBool HandleCtrlEventL( TInt aEventType, |
|
82 CFepUiBaseCtrl* aCtrl, |
|
83 const TDesC& aEventData); |
|
84 |
|
85 /** |
|
86 * set current state |
|
87 * |
|
88 * @since S60 v5.0 |
|
89 * @param aNewState |
|
90 * @return None |
|
91 */ |
|
92 virtual void SetCurrentStateL(TUiState aNewState) = 0; |
|
93 |
|
94 /** |
|
95 * active ui |
|
96 * |
|
97 * @since S60 v5.0 |
|
98 * @return None |
|
99 */ |
|
100 virtual void ActivateUiL() = 0; |
|
101 |
|
102 /** |
|
103 * deactive ui |
|
104 * |
|
105 * @since S60 v5.0 |
|
106 * @return None |
|
107 */ |
|
108 virtual void DeactivateUI() = 0; |
|
109 |
|
110 /** |
|
111 * handle long press number key |
|
112 * |
|
113 * @since S60 v5.0 |
|
114 * @param aKey |
|
115 * @return None |
|
116 */ |
|
117 virtual void HandleLongPressNumberKeyL(TPtiKey aKey); |
|
118 |
|
119 /** |
|
120 * Set number long press valit |
|
121 * |
|
122 * @since S60 v5.0 |
|
123 * @param aValid |
|
124 * @return None |
|
125 */ |
|
126 inline void SetNumLongPressValid(TBool aValid); |
|
127 |
|
128 /** |
|
129 * get number long press valit |
|
130 * |
|
131 * @since S60 v5.0 |
|
132 * @return TBool |
|
133 */ |
|
134 inline TBool NumLongPressValid(); |
|
135 |
|
136 /** |
|
137 * get layout context |
|
138 * |
|
139 * @since S60 v5.0 |
|
140 * @return layout context |
|
141 */ |
|
142 inline MSplitItutLayoutContext* LayoutContext(); |
|
143 |
|
144 /** |
|
145 * get data mgr |
|
146 * |
|
147 * @since S60 v5.0 |
|
148 * @return data mgr |
|
149 */ |
|
150 inline CSplitItutDataMgr* DataMgr(); |
|
151 |
|
152 /** |
|
153 * get current state |
|
154 * |
|
155 * @since S60 v5.0 |
|
156 * @return current state |
|
157 */ |
|
158 inline CSplitItutUiStateBase* CurrentState(); |
|
159 |
|
160 /** |
|
161 * is control consumed |
|
162 * |
|
163 * @since S60 v5.0 |
|
164 * @return TBool |
|
165 */ |
|
166 inline TBool ClrConsumed(); |
|
167 |
|
168 /** |
|
169 * set control consumed |
|
170 * |
|
171 * @since S60 v5.0 |
|
172 * @param aConsume |
|
173 * @return None |
|
174 */ |
|
175 inline void SetClrConsume(TBool aConsume); |
|
176 |
|
177 /** |
|
178 * get ui manager |
|
179 * |
|
180 * @since S60 v5.0 |
|
181 * @return UI mgr |
|
182 */ |
|
183 inline CSplitItutWindowManager* UiManager(); |
|
184 |
|
185 protected: |
|
186 /** |
|
187 * C++ constructor |
|
188 * |
|
189 * @since S60 v5.0 |
|
190 * @return None |
|
191 */ |
|
192 CSplitItutUiMgrBase(MSplitItutLayoutContext* aContext, |
|
193 CSplitItutDataMgr* aDataMgr, |
|
194 CSplitItutWindowManager* aUiManager); |
|
195 |
|
196 /** |
|
197 * Symbian second-phase constructor |
|
198 * |
|
199 * @since S60 v5.0 |
|
200 * @return None |
|
201 */ |
|
202 virtual void ConstructL(); |
|
203 |
|
204 protected: |
|
205 |
|
206 /** |
|
207 * The layout context |
|
208 * not own |
|
209 */ |
|
210 MSplitItutLayoutContext* iLayoutContext; |
|
211 |
|
212 /** |
|
213 * The data mgr |
|
214 * not own |
|
215 */ |
|
216 CSplitItutDataMgr* iDataMgr; |
|
217 |
|
218 /** |
|
219 * current state |
|
220 * not own |
|
221 */ |
|
222 CSplitItutUiStateBase* iCurrentState; |
|
223 |
|
224 /** |
|
225 * number long press valid |
|
226 */ |
|
227 TBool iNumLongPressValid; |
|
228 |
|
229 /** |
|
230 * control consume |
|
231 */ |
|
232 TBool iClrConsume; |
|
233 |
|
234 /** |
|
235 * UI mgr |
|
236 * not own |
|
237 */ |
|
238 CSplitItutWindowManager* iUiMgr; |
|
239 }; |
|
240 |
|
241 // --------------------------------------------------------------------------- |
|
242 // CSplitItutUiMgrBase::LayoutContext |
|
243 // --------------------------------------------------------------------------- |
|
244 // |
|
245 inline MSplitItutLayoutContext* CSplitItutUiMgrBase::LayoutContext() |
|
246 { |
|
247 return iLayoutContext; |
|
248 } |
|
249 |
|
250 // --------------------------------------------------------------------------- |
|
251 // CSplitItutUiMgrBase::DataMgr |
|
252 // --------------------------------------------------------------------------- |
|
253 // |
|
254 inline CSplitItutDataMgr* CSplitItutUiMgrBase::DataMgr() |
|
255 { |
|
256 return iDataMgr; |
|
257 } |
|
258 |
|
259 // --------------------------------------------------------------------------- |
|
260 // CSplitItutUiMgrBase::CurrentState |
|
261 // --------------------------------------------------------------------------- |
|
262 // |
|
263 inline CSplitItutUiStateBase* CSplitItutUiMgrBase::CurrentState() |
|
264 { |
|
265 return iCurrentState; |
|
266 } |
|
267 |
|
268 // --------------------------------------------------------------------------- |
|
269 // CSplitItutUiMgrBase::SetNumLongPressValid |
|
270 // --------------------------------------------------------------------------- |
|
271 // |
|
272 inline void CSplitItutUiMgrBase::SetNumLongPressValid(TBool aValid) |
|
273 { |
|
274 iNumLongPressValid = aValid; |
|
275 } |
|
276 |
|
277 // --------------------------------------------------------------------------- |
|
278 // CSplitItutUiMgrBase::NumLongPressValid |
|
279 // --------------------------------------------------------------------------- |
|
280 // |
|
281 inline TBool CSplitItutUiMgrBase::NumLongPressValid() |
|
282 { |
|
283 return iNumLongPressValid; |
|
284 } |
|
285 |
|
286 // --------------------------------------------------------------------------- |
|
287 // CSplitItutUiMgrBase::ClrConsumed |
|
288 // --------------------------------------------------------------------------- |
|
289 // |
|
290 inline TBool CSplitItutUiMgrBase::ClrConsumed() |
|
291 { |
|
292 return iClrConsume; |
|
293 } |
|
294 |
|
295 // --------------------------------------------------------------------------- |
|
296 // CSplitItutUiMgrBase::SetClrConsume |
|
297 // --------------------------------------------------------------------------- |
|
298 // |
|
299 inline void CSplitItutUiMgrBase::SetClrConsume(TBool aConsume) |
|
300 { |
|
301 iClrConsume = aConsume; |
|
302 } |
|
303 |
|
304 // --------------------------------------------------------------------------- |
|
305 // CSplitItutUiMgrBase::UiManager |
|
306 // --------------------------------------------------------------------------- |
|
307 // |
|
308 inline CSplitItutWindowManager* CSplitItutUiMgrBase::UiManager() |
|
309 { |
|
310 return iUiMgr; |
|
311 } |
|
312 |
|
313 #endif // C_SPLITITUTUIMGRBASE_H |