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: peninput VKB data manager
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef PENINPUTVKBKRWINDOW_H
|
|
19 |
#define PENINPUTVKBKRWINDOW_H
|
|
20 |
|
|
21 |
#include <e32std.h>
|
|
22 |
#include <e32base.h>
|
|
23 |
#include <AknLayoutDef.h>
|
|
24 |
#include <peninputlayoutwindowext.h>
|
|
25 |
|
|
26 |
class CAknFepCtrlLabel;
|
|
27 |
class CAknFepCtrlRangeBar;
|
|
28 |
class CPeninputGenericVkbLafMgr;
|
|
29 |
class CPeninputCommonChoiceList;
|
|
30 |
class MPeninputUiStateMgr;
|
|
31 |
|
|
32 |
class CPeninputVkbKrWindow : public CPeninputLayoutWindowExt
|
|
33 |
{
|
|
34 |
public:
|
|
35 |
|
|
36 |
static CPeninputVkbKrWindow* NewLC(
|
|
37 |
CFepUiLayout* aUiLayout,
|
|
38 |
MPeninputLayoutContext* aLayoutContext,
|
|
39 |
MPeninputUiStateMgr* aUiStateMgr);
|
|
40 |
|
|
41 |
static CPeninputVkbKrWindow* NewL(
|
|
42 |
CFepUiLayout* aUiLayout,
|
|
43 |
MPeninputLayoutContext* aLayoutContext,
|
|
44 |
MPeninputUiStateMgr* aUiStateMgr);
|
|
45 |
|
|
46 |
virtual ~CPeninputVkbKrWindow();
|
|
47 |
|
|
48 |
private:
|
|
49 |
|
|
50 |
CPeninputVkbKrWindow(
|
|
51 |
CFepUiLayout* aUiLayout,
|
|
52 |
MPeninputLayoutContext* aLayoutContext,
|
|
53 |
MPeninputUiStateMgr* aUiStateMgr);
|
|
54 |
|
|
55 |
void ConstructL();
|
|
56 |
|
|
57 |
private:
|
|
58 |
|
|
59 |
void HandleControlEvent(
|
|
60 |
TInt aEventType,
|
|
61 |
CFepUiBaseCtrl* aCtrl,
|
|
62 |
const TDesC& aEventData );
|
|
63 |
|
|
64 |
/**
|
|
65 |
* Get id of window config resource
|
|
66 |
*
|
|
67 |
* @since S60 v3.2
|
|
68 |
* @return The id of window config resource
|
|
69 |
*/
|
|
70 |
virtual TInt GetWindowConfigResId();
|
|
71 |
|
|
72 |
/**
|
|
73 |
* Get id of window resource
|
|
74 |
*
|
|
75 |
* @since S60 v3.2
|
|
76 |
* @return The id of window resource
|
|
77 |
*/
|
|
78 |
virtual TInt GetWindowResId();
|
|
79 |
|
|
80 |
/**
|
|
81 |
* Get numeric keymapping resource id
|
|
82 |
*
|
|
83 |
* @since S60 v3.2
|
|
84 |
* @return The id of numeric keymapping
|
|
85 |
*/
|
|
86 |
virtual TInt GetNumKeymappingResId();
|
|
87 |
|
|
88 |
/**
|
|
89 |
* Get file name of window config resource
|
|
90 |
*
|
|
91 |
* @since S60 v3.2
|
|
92 |
* @param aLangID The id of language
|
|
93 |
* @return The file name of window config resource
|
|
94 |
*/
|
|
95 |
virtual const TDesC&
|
|
96 |
GetWindowConfigResFileName( TInt aLangID );
|
|
97 |
|
|
98 |
/**
|
|
99 |
* Get file name of window resource
|
|
100 |
*
|
|
101 |
* @since S60 v3.2
|
|
102 |
* @return The file name of window resource
|
|
103 |
*/
|
|
104 |
virtual const TDesC& GetWindowResFileName();
|
|
105 |
|
|
106 |
/**
|
|
107 |
* Change unit size
|
|
108 |
*
|
|
109 |
* @since S60 v3.2
|
|
110 |
* @return The rect of whole window
|
|
111 |
*/
|
|
112 |
virtual const TRect ChangeUnitSize();
|
|
113 |
|
|
114 |
/**
|
|
115 |
* Change size of client area
|
|
116 |
*
|
|
117 |
* @since S60 v3.2
|
|
118 |
* @param aLeftTopPoint The left top point of client area
|
|
119 |
* @return None
|
|
120 |
*/
|
|
121 |
virtual void ChangeClientSize();
|
|
122 |
|
|
123 |
/**
|
|
124 |
* Construct all controls specified in resource(implementation will be
|
|
125 |
* postponed in subclass)
|
|
126 |
*
|
|
127 |
* @since S60 v3.2
|
|
128 |
* @return None
|
|
129 |
*/
|
|
130 |
virtual void CreateAllControlsL();
|
|
131 |
|
|
132 |
/**
|
|
133 |
* Set control fonts. Fonts info comes from resource
|
|
134 |
*
|
|
135 |
* @since S60 v3.2
|
|
136 |
* @return None
|
|
137 |
*/
|
|
138 |
virtual void SetControlsFont();
|
|
139 |
|
|
140 |
/**
|
|
141 |
* Pop up choice list
|
|
142 |
*
|
|
143 |
* @since S60 v3.2
|
|
144 |
* @return None
|
|
145 |
*/
|
|
146 |
virtual void PopupChoiceList();
|
|
147 |
|
|
148 |
/**
|
|
149 |
* Re-organize all controls in the assigned client area layout
|
|
150 |
*
|
|
151 |
* @since S60 v3.2
|
|
152 |
* @param aClientLayoutId The id of client area layout
|
|
153 |
* @return None
|
|
154 |
*/
|
|
155 |
virtual void ReorganizeControls( TInt aClientLayoutId, TBool aNeedReset );
|
|
156 |
|
|
157 |
/**
|
|
158 |
* Do when case changed
|
|
159 |
*
|
|
160 |
* @since S60 v3.2
|
|
161 |
* @param aNewCase The new case
|
|
162 |
* @return None
|
|
163 |
*/
|
|
164 |
virtual void DoCaseChange( TInt aNewCase );
|
|
165 |
|
|
166 |
|
|
167 |
virtual TBool CreateCustomControlL( TInt16 aControlId, TInt32 aImageId );
|
|
168 |
|
|
169 |
virtual void AddCustomControlGroupL(CFepUiBaseCtrl* aCtrl);
|
|
170 |
|
|
171 |
private:
|
|
172 |
|
|
173 |
void SetVkbLayoutSize();
|
|
174 |
|
|
175 |
void ConstructFromResourceL();
|
|
176 |
|
|
177 |
void SetRangeBarSizeL(TInt x, TInt y);
|
|
178 |
|
|
179 |
CAknFepCtrlEventButton* AddButtonL(
|
|
180 |
const TInt aControlId,
|
|
181 |
const TInt aEventId,
|
|
182 |
const TInt aResId,
|
|
183 |
const TInt aUnicode = 0,
|
|
184 |
const TBool aIsRepeat = EFalse );
|
|
185 |
|
|
186 |
void ReorgnizeTitleBar();
|
|
187 |
|
|
188 |
void ReorgnizeTableUpDown();
|
|
189 |
|
|
190 |
void ResetAccentButton();
|
|
191 |
|
|
192 |
void UpdateICFTextL();
|
|
193 |
|
|
194 |
static TInt BackgroundTaskL(TAny* aPtr);
|
|
195 |
|
|
196 |
void PopupWindowSizeChange();
|
|
197 |
|
|
198 |
void DoIdleConstructL();
|
|
199 |
|
|
200 |
void GetPopupWndInfoFromResL(
|
|
201 |
TResourceReader aRes,
|
|
202 |
const TRect& aRect );
|
|
203 |
|
|
204 |
void PopupSwitchWindowL();
|
|
205 |
|
|
206 |
TBool IsSymbolRange();
|
|
207 |
|
|
208 |
void FakeClientLayoutUpdateL(const TInt& aVkbLayoutId=0);
|
|
209 |
|
|
210 |
public:
|
|
211 |
|
|
212 |
void SetPromptTextL(TUint8* aData);
|
|
213 |
|
|
214 |
void SetSwitchlistSecretFlag(TBool aSecret);
|
|
215 |
|
|
216 |
void DimArrowKeys( TBool aDimArrow );
|
|
217 |
|
|
218 |
void DimEnterKey( TBool aDimmed );
|
|
219 |
|
|
220 |
void ShowBubble(TInt aShow);
|
|
221 |
|
|
222 |
void PreProcessRange(const TInt& aRange);
|
|
223 |
|
|
224 |
void UpdateLafData();
|
|
225 |
|
|
226 |
private:
|
|
227 |
|
|
228 |
MPeninputUiStateMgr* iUiStateMgr;
|
|
229 |
|
|
230 |
TAknWindowLineLayout iBubbleSize;
|
|
231 |
|
|
232 |
TAknTextLineLayout iBubbleTextLayout;
|
|
233 |
|
|
234 |
CAknFepCtrlRangeBar* iRangeBar;
|
|
235 |
|
|
236 |
CPeninputVkbCtrlExt* iVkbCtrl;
|
|
237 |
|
|
238 |
CPeninputGenericVkbLafMgr* iLafMgr;
|
|
239 |
|
|
240 |
CAknFepCtrlDragButton* iMoveButton;
|
|
241 |
|
|
242 |
CAknFepCtrlRepeatButton* iArrowLeftButton;
|
|
243 |
|
|
244 |
CAknFepCtrlRepeatButton* iArrowRightButton;
|
|
245 |
|
|
246 |
CAknFepCtrlRepeatButton* iTableUpButton;
|
|
247 |
|
|
248 |
CAknFepCtrlRepeatButton* iTableDownButton;
|
|
249 |
|
|
250 |
CAknFepCtrlEventButton* iTablePageLabel;
|
|
251 |
|
|
252 |
TBool iFirstConstruct;
|
|
253 |
|
|
254 |
CIdle *iIdle;
|
|
255 |
|
|
256 |
TBool iPopupSet;
|
|
257 |
|
|
258 |
TBool iPopupInited;
|
|
259 |
|
|
260 |
TRect iAppWndRect;
|
|
261 |
|
|
262 |
TRect iPopupItemRect;
|
|
263 |
|
|
264 |
CPeninputCommonChoiceList* iPopupWnd;
|
|
265 |
|
|
266 |
CFbsBitmap* iPopupWndBgImg;
|
|
267 |
|
|
268 |
CFbsBitmap* iPopupWndFocusImg;
|
|
269 |
|
|
270 |
};
|
|
271 |
|
|
272 |
#endif // PENINPUTVKBKRWINDOW_H
|