44
|
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: split screen qwerty layout
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef C_PENINPUTSPLITQWERTYLAYOUT_H
|
|
19 |
#define C_PENINPUTSPLITQWERTYLAYOUT_H
|
|
20 |
|
|
21 |
// User includes
|
|
22 |
#include <AknFepGlobalEnums.h>
|
|
23 |
#include "peninputcommonlayoutext.h"
|
|
24 |
|
|
25 |
|
|
26 |
/**
|
|
27 |
* Split qwerty layout implementation class
|
|
28 |
*
|
|
29 |
* @lib peninputsplitqwerty.lib
|
|
30 |
* @since since S60 v5.0
|
|
31 |
*/
|
|
32 |
class CPeninputSplitQwertyLayoutImp : public CFepUiLayoutInterface
|
|
33 |
{
|
|
34 |
public:
|
|
35 |
|
|
36 |
/**
|
|
37 |
* Symbian constructor
|
|
38 |
*
|
|
39 |
* @since since S60 v5.0
|
|
40 |
* @param aInitParams Init data for layout
|
|
41 |
* @return Pointer to created object
|
|
42 |
*/
|
|
43 |
static CPeninputSplitQwertyLayoutImp* NewL( TAny* aInitParams );
|
|
44 |
|
|
45 |
/**
|
|
46 |
* C++ destructor
|
|
47 |
*
|
|
48 |
* @since since S60 v5.0
|
|
49 |
* @return None
|
|
50 |
*/
|
|
51 |
virtual ~CPeninputSplitQwertyLayoutImp();
|
|
52 |
|
|
53 |
public: // From base class CFepUiLayoutInterface
|
|
54 |
|
|
55 |
/**
|
|
56 |
* From CFepUiLayoutInterface
|
|
57 |
* Create fep ui layout
|
|
58 |
*
|
|
59 |
* @since since S60 v5.0
|
|
60 |
* @param aLayoutOwner The layout owner
|
|
61 |
* @param aData The data for creating layout
|
|
62 |
* @return Pointer to created CFepUiLayout object
|
|
63 |
*/
|
|
64 |
CFepUiLayout* CreateFepUiLayoutL( MLayoutOwner* aLayoutOwner,
|
|
65 |
const TAny* aData );
|
|
66 |
|
|
67 |
private:
|
|
68 |
|
|
69 |
/**
|
|
70 |
* C++ constructor
|
|
71 |
*
|
|
72 |
* @since since S60 v5.0
|
|
73 |
* @return None
|
|
74 |
*/
|
|
75 |
CPeninputSplitQwertyLayoutImp();
|
|
76 |
|
|
77 |
/**
|
|
78 |
* Symbian constructor
|
|
79 |
*
|
|
80 |
* @since since S60 v5.0
|
|
81 |
* @return None
|
|
82 |
*/
|
|
83 |
void ConstructL();
|
|
84 |
|
|
85 |
};
|
|
86 |
|
|
87 |
/**
|
|
88 |
* class CPeninputSplitQwertyLayout
|
|
89 |
*
|
|
90 |
* @lib peninputsplitqwerty.lib
|
|
91 |
* @since since S60 v5.0
|
|
92 |
*/
|
|
93 |
class CPeninputSplitQwertyLayout : public CPeninputCommonLayoutExt
|
|
94 |
{
|
|
95 |
public:
|
|
96 |
|
|
97 |
/**
|
|
98 |
* Symbian constructor
|
|
99 |
*
|
|
100 |
* @since since S60 v5.0
|
|
101 |
* @param aLayoutOwner The owner of layout
|
|
102 |
* @param aInitData Init data of layout
|
|
103 |
* @return The pointer to created object
|
|
104 |
*/
|
|
105 |
static CPeninputSplitQwertyLayout* NewL( MLayoutOwner* aLayoutOwner,
|
|
106 |
const TAny* aInitData );
|
|
107 |
|
|
108 |
/**
|
|
109 |
* C++ destructor
|
|
110 |
*
|
|
111 |
* @since since S60 v5.0
|
|
112 |
* @return None
|
|
113 |
*/
|
|
114 |
virtual ~CPeninputSplitQwertyLayout();
|
|
115 |
|
|
116 |
/**
|
|
117 |
* Check if ITI is enabled.
|
|
118 |
*
|
|
119 |
* @return ETrue if ITI is enabled.
|
|
120 |
*/
|
|
121 |
inline TBool IsEnableITI() const;
|
|
122 |
|
|
123 |
public: // From base class CPeninputCommonLayout
|
|
124 |
|
|
125 |
/**
|
|
126 |
* From CPeninputCommonLayout
|
|
127 |
* Handle layout command event
|
|
128 |
*
|
|
129 |
* @since since S60 v5.0
|
|
130 |
* @param aCmd Command Id
|
|
131 |
* @param aData Data for command
|
|
132 |
* @return Errors when return value smaller than zero
|
|
133 |
*/
|
|
134 |
TInt HandleCommand( TInt aCmd, TUint8* aData );
|
|
135 |
|
|
136 |
/**
|
|
137 |
* From CPeninputCommonLayout
|
|
138 |
* Handle control event
|
|
139 |
*
|
|
140 |
* @since since S60 v5.0
|
|
141 |
* @param aEventType event type
|
|
142 |
* @param aCtrl Controler
|
|
143 |
* @param aEventData The event data
|
|
144 |
* @return None
|
|
145 |
*/
|
|
146 |
void HandleControlEvent( TInt aEventType, CFepUiBaseCtrl* aCtrl,
|
|
147 |
const TDesC& aEventData );
|
|
148 |
|
|
149 |
/**
|
|
150 |
* From CPeninputCommonLayout
|
|
151 |
* Handle editor text coming
|
|
152 |
* Called by animation dll when app editor text is coming
|
|
153 |
* If a ui layout has a editor area, it must implements
|
|
154 |
* this function to get the text
|
|
155 |
*
|
|
156 |
* @since S60 v5.0
|
|
157 |
* @param aData Editor Text Coming data
|
|
158 |
* @return KErrNone is operation succeeded
|
|
159 |
*/
|
|
160 |
TInt OnAppEditorTextComing( const TFepInputContextFieldData& aData );
|
|
161 |
|
|
162 |
/**
|
|
163 |
* From CPeninputCommonLayout
|
|
164 |
* Inform layout the size changing event
|
|
165 |
*
|
|
166 |
* @since S60 v3.2
|
|
167 |
* @param aData The event data
|
|
168 |
* @return KErrNone if successfully size changing
|
|
169 |
*/
|
|
170 |
TInt SizeChanged( const TAny* aData );
|
|
171 |
|
|
172 |
public: //from base class CFepUiLayout
|
|
173 |
/**
|
|
174 |
* From CFepUiLayout
|
|
175 |
* Inform UI that application infomation changed.
|
|
176 |
*
|
|
177 |
* @since S60 v5.0
|
|
178 |
* @param aInfo The information.
|
|
179 |
* @param aType The information type
|
|
180 |
* @return none
|
|
181 |
*/
|
|
182 |
void HandleAppInfoChange( const TDesC& aInfo, TPeninputAppInfo aType );
|
|
183 |
|
|
184 |
/**
|
|
185 |
* From CFepUiLayout
|
|
186 |
* Called by owner when the layout is going to be active
|
|
187 |
*
|
|
188 |
* @since S60 v5.0
|
|
189 |
* @return none
|
|
190 |
*/
|
|
191 |
void OnActivate();
|
|
192 |
|
|
193 |
/**
|
|
194 |
* From CFepUiLayout
|
|
195 |
* Tell whether this layout require transparency.
|
|
196 |
* This is to save memory used in mask bitmap. If transparency not deeded,
|
|
197 |
* We use black-white bitmap.
|
|
198 |
*
|
|
199 |
* @since since S60 v5.0
|
|
200 |
* @return ETrue if layout require transparency, otherwise EFalse.
|
|
201 |
*/
|
|
202 |
TBool SemiTransparencyRequired();
|
|
203 |
|
|
204 |
protected:
|
|
205 |
|
|
206 |
/**
|
|
207 |
* C++ constructor
|
|
208 |
*
|
|
209 |
* @since since S60 v5.0
|
|
210 |
* @param aLayoutOwner The owner of layout
|
|
211 |
* @return None
|
|
212 |
*/
|
|
213 |
CPeninputSplitQwertyLayout( MLayoutOwner* aLayoutOwner );
|
|
214 |
|
|
215 |
protected: // From base class CPeninputCommonLayout
|
|
216 |
/**
|
|
217 |
* Symbian constructor
|
|
218 |
*
|
|
219 |
* @since since S60 v5.0
|
|
220 |
* @param aInitData Init data of layout
|
|
221 |
* @return None
|
|
222 |
*/
|
|
223 |
void ConstructL( const TAny *aInitData );
|
|
224 |
|
|
225 |
/**
|
|
226 |
* From CPeninputCommonLayout
|
|
227 |
* Factory method for creation of layout window. The decision which
|
|
228 |
* layout window(VKB or HWR) is created will be postboned in subclasses
|
|
229 |
* of this class
|
|
230 |
*
|
|
231 |
* @since since S60 v5.0
|
|
232 |
* @return None
|
|
233 |
*/
|
|
234 |
void CreateLayoutWindowL();
|
|
235 |
|
|
236 |
/**
|
|
237 |
* From CPeninputCommonLayout
|
|
238 |
* Factory method for creation resource config. It is enough at present
|
|
239 |
* to create and initialize resource config. Any necessary extension
|
|
240 |
* will be implemented in subclasses
|
|
241 |
*
|
|
242 |
* @since since S60 v5.0
|
|
243 |
* @return None
|
|
244 |
*/
|
|
245 |
void CreateDataMgrL( const TAny* aInitData );
|
|
246 |
|
|
247 |
/**
|
|
248 |
* From CPeninputCommonLayout
|
|
249 |
* Get the layout type, child class must rewrite the function
|
|
250 |
*
|
|
251 |
* @since since S60 v5.0
|
|
252 |
* @return The layout type
|
|
253 |
*/
|
|
254 |
TInt LayoutType();
|
|
255 |
|
|
256 |
private:
|
|
257 |
/**
|
|
258 |
* Handle virtual key event
|
|
259 |
*
|
|
260 |
* @since since S60 v5.0
|
|
261 |
* @param aEventType event type
|
|
262 |
* @param aCtrl the control report this event
|
|
263 |
* @param aEventData event data
|
|
264 |
* @return none
|
|
265 |
*/
|
|
266 |
void HandleVirtualKeyUpL( TInt aEventType, CFepUiBaseCtrl* aCtrl,
|
|
267 |
const TDesC& aEventData );
|
|
268 |
|
|
269 |
private:
|
|
270 |
|
|
271 |
/**
|
|
272 |
* Layout type
|
|
273 |
*/
|
|
274 |
TInt iLayoutType;
|
|
275 |
|
|
276 |
/**
|
|
277 |
* word query flag
|
|
278 |
*/
|
|
279 |
TBool iInEditWordQueryDlg;
|
|
280 |
|
|
281 |
/*
|
|
282 |
* Indicate if ITI is enabled.
|
|
283 |
*/
|
|
284 |
TBool iITIEnabled;
|
|
285 |
};
|
|
286 |
|
|
287 |
/**
|
|
288 |
* Check if ITI is enabled.
|
|
289 |
*/
|
|
290 |
inline TBool CPeninputSplitQwertyLayout::IsEnableITI() const
|
|
291 |
{
|
|
292 |
return iITIEnabled;
|
|
293 |
}
|
|
294 |
|
|
295 |
#endif // C_PENINPUTSPLITQWERTYLAYOUT_H
|