author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Wed, 13 Oct 2010 14:23:59 +0300 | |
branch | RCL_3 |
changeset 83 | 26b2b12093af |
parent 77 | 7cee158cb8cd |
permissions | -rw-r--r-- |
66 | 1 |
/* |
2 |
* Copyright (c) 2003-2008 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: ?Description |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
||
19 |
#ifndef CMIDDISPLAYABLE_H |
|
20 |
#define CMIDDISPLAYABLE_H |
|
21 |
||
22 |
// CEikBorderedControl inheritance in class declaration |
|
23 |
#include <eikbctrl.h> |
|
24 |
#include <eikmobs.h> |
|
25 |
// needed for calling function SupplyMopObject in CMIDControlItem.cpp, CMIDDisplayable.cpp, CMIDForm.cpp |
|
26 |
#include <eikmop.h> |
|
27 |
#include <lcdui.h> |
|
28 |
#include <eikmenub.h> |
|
29 |
// used MAknLongTapDetectorCallBack interface in class declaration |
|
30 |
// using CAknLongTapDetector* iLongTapDetector member |
|
31 |
#include <aknlongtapdetector.h> |
|
32 |
||
33 |
// Skin |
|
34 |
// using API for icons in CMIDCanvas.cpp |
|
35 |
// using API for skin in CMIDDisplayable.cpp |
|
36 |
// using API for icons and skin in CMIDChoiceGroupModel.cpp |
|
37 |
#include <AknsDrawUtils.h>// skin |
|
38 |
// for backgroud control context (iBackGroundControlContext) |
|
39 |
#include <AknsBasicBackgroundControlContext.h> //skin |
|
40 |
#include <aknappui.h> |
|
41 |
||
42 |
#include "CMIDCommand.h" |
|
43 |
// API needed for working with commands and command list (setting, getting, handling) |
|
44 |
#include "CMIDCommandList.h" |
|
45 |
// using CMIDMenuHandler::TMenuType |
|
46 |
#include "CMIDMenuHandler.h" |
|
47 |
#include "CMIDCanvasKeypad.h" |
|
48 |
#include <e32property.h> |
|
49 |
||
50 |
#ifdef RD_TACTILE_FEEDBACK |
|
51 |
#include <touchfeedback.h> |
|
52 |
#include <peninputclient.h> |
|
53 |
#endif //RD_TACTILE_FEEDBACK |
|
54 |
||
55 |
// Constants |
|
56 |
const TInt KSoftKeyLabelPropertyNumberOfSoftKeys = 3; |
|
57 |
||
58 |
// Forward declarations |
|
59 |
class CMIDAppUi; |
|
60 |
class CMIDSoftKey; |
|
61 |
class CMIDUIManager; |
|
62 |
class CAknAppUi; |
|
63 |
class CMIDTicker; |
|
64 |
class CCommandList; |
|
65 |
class MMIDDisplayableObserver; |
|
66 |
class CEikButtonGroupContainer; |
|
67 |
class CAknStylusPopUpMenu; |
|
68 |
class CPropertyWatch; |
|
69 |
||
70 |
// Container for MIDlet Displayables. |
|
71 |
NONSHARABLE_CLASS(CMIDDisplayable) : public CEikBorderedControl, public MMIDDisplayable, |
|
72 |
public MMIDEnvObserver, public MAknLongTapDetectorCallBack, public MEikMenuObserver |
|
73 |
{ |
|
74 |
public: |
|
75 |
||
76 |
#ifdef RD_SCALABLE_UI_V2 |
|
77 |
/** |
|
78 |
* On screen keypad options for devices that do not have physical keypads. |
|
79 |
*/ |
|
80 |
enum TOnScreenKeypadValue |
|
81 |
{ |
|
82 |
EOnScreenKeypadValueUndefined = 0, |
|
83 |
EOnScreenKeypadValueNo, |
|
84 |
EOnScreenKeypadValueNavigationKeys, |
|
85 |
EOnScreenKeypadValueGameActions, |
|
86 |
EOnScreenKeypadValueLskRsk |
|
87 |
}; |
|
88 |
||
89 |
// is VKB on screen |
|
90 |
TBool IsVKBOnScreen(); |
|
91 |
#endif // RD_SCALABLE_UI_V2 |
|
92 |
||
93 |
/** |
|
94 |
* On-Screen Keypad SoftKey positions(used when hw-qwerty does not have LSK&RSK) |
|
95 |
*/ |
|
96 |
enum TOnScreenKeypadSoftKeysPosition |
|
97 |
{ |
|
98 |
ESoftkeysBottom = 0,//default value |
|
99 |
ESoftkeysRight |
|
100 |
}; |
|
101 |
||
102 |
/** |
|
103 |
* Returns SoftKey position defined by JAD parameter(default position is bottom) |
|
104 |
*/ |
|
105 |
TInt GetSKPositionForOSK(); |
|
106 |
||
107 |
// Construction |
|
108 |
static CMIDDisplayable* NewL(MMIDEnv& aEnv,CMIDUIManager& aUIManager); |
|
109 |
||
110 |
// From MMIDDisplayable |
|
111 |
void SetTitleL(const TDesC* aTitle); |
|
112 |
void SetTickerL(MMIDTicker* aTicker); |
|
113 |
MMIDTicker* Ticker() const; |
|
114 |
void AddCommandL(MMIDCommand* aCommand); |
|
115 |
void RemoveCommand(MMIDCommand* aCommand); |
|
116 |
TSize ContentSize() const; |
|
117 |
void HandleCurrentL(TBool aCurrent); |
|
118 |
void SetComponentL(MMIDComponent& aComponent); |
|
119 |
MMIDComponent* Component() const; |
|
120 |
void SetFullScreenModeL(TBool aFullScreen); |
|
121 |
#ifdef RD_JAVA_S60_RELEASE_9_2 |
|
122 |
void HandleSplitScreenKeyboard(TBool aOpened); |
|
123 |
#endif // RD_JAVA_S60_RELEASE_9_2 |
|
124 |
CCoeControl& ContentWindow(); |
|
125 |
TBool SoftKeyLabelLocation(TInt aSoftKeyId, TPoint& aPosition, TSize& aSize); |
|
126 |
TInt SoftKeyLabelAnchor(TInt aSoftKeyId); |
|
127 |
void DrawNow(); |
|
128 |
void ChangeOSKBackgroundState(TBool aOSKBackgroundState); |
|
129 |
||
130 |
/** |
|
131 |
* Sets a command listener existence info. |
|
132 |
* @since Series S60 3.2 |
|
133 |
* @param aExistence ETrue if command listener is set |
|
134 |
*/ |
|
135 |
void SetCommandListenerExistence(TBool aExistence); |
|
136 |
||
137 |
// From MMIDComponent |
|
138 |
void Dispose(); |
|
139 |
||
140 |
// From MMIDEnvObserver |
|
141 |
void HandleSwitchOnL(TBool aSwitchOn); |
|
142 |
void HandleForegroundL(TBool aForeground); |
|
143 |
void HandleResourceChangeL(TInt aType); |
|
144 |
#ifdef RD_JAVA_NGA_ENABLED |
|
145 |
void HandleFullOrPartialForegroundL(TBool aFullOrPartialFg); |
|
146 |
void HandleFreeGraphicsMemory(); |
|
147 |
#endif |
|
148 |
||
149 |
// Title handling |
|
150 |
TBool HasTitle() const; |
|
151 |
void ShowTitleL(); |
|
152 |
HBufC* Title(); |
|
153 |
void ClearTitleL(); |
|
154 |
||
155 |
// Command handling |
|
156 |
CMIDCommandList* MainCommandList() const; |
|
157 |
CMIDCommand* FindCommandWithId(TInt aCommandId) const; |
|
158 |
||
159 |
/** |
|
160 |
* Find the correct softkey commands, if any, and draw the CBA. |
|
161 |
* Finally draw the CBA. |
|
162 |
* |
|
163 |
* @see RestoreMenuL() |
|
164 |
**/ |
|
165 |
void InitializeCbasL(); |
|
166 |
void SetCba(CEikButtonGroupContainer* aCba); |
|
167 |
TBool ShowOkOptionsMenuL(); |
|
168 |
TInt NumCommandsForOkOptionsMenu() const; |
|
169 |
TInt GetHighestPriorityScreenOrHelpCommand() const; |
|
170 |
void SetItemCommandList(CMIDCommandList* aList, CMIDCommand* aMSKCommand); |
|
171 |
void SetMSKCommand(CMIDCommand* aMSKCommand); |
|
172 |
/** |
|
173 |
* Stores select command to Displayable |
|
174 |
* @param aSelectCommand a command used in MSK and in menu |
|
175 |
*/ |
|
176 |
void SetSelectCommand(CMIDCommand* aSelectCommand); |
|
177 |
/** |
|
178 |
* Disables or enables select command |
|
179 |
* @aEnableSelectCommand ETrue enables select command and EFalse disables select command |
|
180 |
*/ |
|
181 |
void SetSelectCommandState(TBool aEnableSelectCommand); |
|
182 |
||
183 |
TInt CommandCount(); |
|
184 |
void ProcessCommandL(TInt aCommandId); |
|
185 |
void DisplayableBehindPopupIsDestroyed(); |
|
186 |
// Processes native Help command event to java |
|
187 |
void HandleHelpCommandL(); |
|
188 |
// Get number of inserted help commands |
|
189 |
TInt NumCommandsForHelpOptionsMenu() const; |
|
190 |
void HandleHighestPriorityScreenOrHelpCommandL(); |
|
191 |
||
192 |
#ifdef RD_SCALABLE_UI_V2 |
|
193 |
// This function can be moved out from RD_SCALABLE_UI_V2 flag if needed. |
|
194 |
// It is behind this flag because currently it is used only by Touch. |
|
195 |
/** |
|
196 |
* Passes call to ProcessCommandL (TInt aCommandId) function. |
|
197 |
* This is useful in situations in which the internal Command ID is not available. |
|
198 |
* |
|
199 |
* @param aCommand to be executed. |
|
200 |
* @since S60 5.0 |
|
201 |
*/ |
|
202 |
void ProcessCommandL(CMIDCommand* aCommand); |
|
203 |
#endif // RD_SCALABLE_UI_V2 |
|
204 |
||
205 |
void CreateMenuItemsL(const CMIDMenuHandler::TMenuType& aMenuType, |
|
206 |
RArray<CEikMenuPaneItem::SData>& aMenuItems); |
|
207 |
// Skin |
|
208 |
MAknsControlContext* BackGroundControlContext(); |
|
209 |
||
210 |
/** From MAknLongTapDetectorCallBack */ |
|
211 |
void HandleLongTapEventL(const TPoint& /*aPenEventLocation*/, const TPoint& /*aPenEventScreenLocation*/); |
|
212 |
||
213 |
/** |
|
214 |
* Way to report pointer event to displayable so that the component will get the |
|
215 |
* default long tap functionality. This method should be called when ever a pointer |
|
216 |
* event occurs in an ui component. Returns true if the event is consumed and should |
|
217 |
* not be forwarded any more (e.g. pointer up event after a detected long tap). |
|
218 |
**/ |
|
219 |
TBool TryDetectLongTapL(const TPointerEvent& aPointerEvent); |
|
220 |
||
221 |
// Misc. |
|
222 |
TBool IsFullScreenMode() const; |
|
223 |
CMIDMenuHandler* MenuHandler() const; |
|
224 |
TBool IsActive() const; |
|
225 |
||
226 |
/** |
|
227 |
* Content component notifies Displayable about its deletion. |
|
228 |
* |
|
229 |
* @note It might happen that content is destroyed before displayable |
|
230 |
* and that's why we need to notify displayable about its content deletion. |
|
231 |
* @see Displayable.java: registeredFinalize() |
|
232 |
**/ |
|
233 |
void NotifyContentDestroyed(); |
|
234 |
||
235 |
/** |
|
236 |
* Gets a command listener existence info. |
|
237 |
* @since Series S60 3.2 |
|
238 |
* @return ETrue if a command listener is set |
|
239 |
*/ |
|
240 |
TBool IsCommandListenerSet() const; |
|
241 |
/** |
|
242 |
* Get UI manager |
|
243 |
* @return CMIDUIManager instance |
|
244 |
* |
|
245 |
* @since s60 |
|
246 |
*/ |
|
247 |
virtual CMIDUIManager* GetUIManager() const; |
|
248 |
||
249 |
/** |
|
250 |
* Sets S60 Selection Key Compatibility |
|
251 |
*/ |
|
252 |
void SetS60SelectionKeyCompatibility(TBool aS60SelectionKeyCompatibility); |
|
253 |
||
254 |
/** |
|
255 |
Adds a rectangle which is excluded from redrawing (for DSA) |
|
256 |
@param "aRect" Rentangle to be exluded from redrawing. |
|
257 |
*/ |
|
258 |
void AddDirectContentArea(const TRect& aRect); |
|
259 |
||
260 |
/** |
|
261 |
Removes a rectangle which is excluded from redrawing (for DSA) |
|
262 |
@param "aRect" Rentangle to be removed from exclusion list. |
|
263 |
*/ |
|
264 |
void RemoveDirectContentArea(const TRect& aRect); |
|
265 |
||
266 |
/** |
|
83
26b2b12093af
Revision: v2.2.17
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
77
diff
changeset
|
267 |
Checks if there were some direct content area added |
26b2b12093af
Revision: v2.2.17
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
77
diff
changeset
|
268 |
@return ETrue if there no DC Area has been added |
26b2b12093af
Revision: v2.2.17
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
77
diff
changeset
|
269 |
*/ |
26b2b12093af
Revision: v2.2.17
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
77
diff
changeset
|
270 |
TBool NoDirectContentAreaDefined(); |
26b2b12093af
Revision: v2.2.17
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
77
diff
changeset
|
271 |
|
26b2b12093af
Revision: v2.2.17
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
77
diff
changeset
|
272 |
/** |
66 | 273 |
* Sets popup style TextBox boolean value. Called by CMIDTextBoxDialogControl when |
274 |
* TextBox presentation is pop-up. |
|
275 |
* |
|
276 |
* @param "aPopup" boolean value indicating whether the textbox is popup or not. |
|
277 |
* |
|
278 |
* @since S60 5.0 |
|
279 |
*/ |
|
280 |
void SetPopupTextBox(TBool aPopup); |
|
281 |
||
282 |
/** |
|
283 |
* Returns boolean value indicating whether this displayable is pop-up TextBox. |
|
284 |
* |
|
285 |
* @return TBool |
|
286 |
* |
|
287 |
* @since S60 5.0 |
|
288 |
*/ |
|
289 |
virtual TBool IsPopupTextBox(); |
|
290 |
||
291 |
/** |
|
292 |
* Handles the On-Screen Keypad visual appearance. |
|
293 |
* |
|
294 |
* @return void |
|
295 |
* |
|
296 |
* @since S60 5.0 |
|
297 |
*/ |
|
298 |
void HandleOnScreenKeypadVisual(); |
|
299 |
||
300 |
/** |
|
301 |
* Notify a CMIDDisplayable then application is switch to background. |
|
302 |
* |
|
303 |
* @return void |
|
304 |
* |
|
305 |
* @since S60 5.0 |
|
306 |
*/ |
|
307 |
void HandleApplicationBackground(); |
|
308 |
||
309 |
/** |
|
310 |
* Function process command which is mapped to MSK |
|
311 |
* |
|
312 |
* @return void |
|
313 |
* |
|
314 |
* @since S60 5.0 |
|
315 |
*/ |
|
316 |
void ProcessMSKCommandL(); |
|
317 |
/** |
|
318 |
* Enum callback type |
|
319 |
* @since S60 9.2 |
|
320 |
*/ |
|
321 |
enum TLcduiUiCallbackType |
|
322 |
{ |
|
323 |
EFixUIOrientation, |
|
324 |
EUnFixUIOrientation |
|
325 |
}; |
|
326 |
||
327 |
/** |
|
328 |
* Fix orientation from MMA |
|
329 |
* |
|
330 |
* @return void |
|
331 |
* |
|
332 |
* @since S60 9.2 |
|
333 |
*/ |
|
334 |
void FixOrientation(); |
|
335 |
||
336 |
/** |
|
337 |
* Release orientation from MMA |
|
338 |
* |
|
339 |
* @return void |
|
340 |
* |
|
341 |
* @since S60 9.2 |
|
342 |
*/ |
|
343 |
void ReleaseOrientation(); |
|
344 |
||
345 |
private: |
|
346 |
// Construction and destruction |
|
347 |
CMIDDisplayable(MMIDEnv& aEnv,CMIDUIManager& aUIManager); |
|
348 |
void ConstructL(); |
|
349 |
~CMIDDisplayable(); |
|
350 |
||
351 |
// From CCoeControl |
|
352 |
void Draw(const TRect& aRect) const; |
|
353 |
virtual TInt CountComponentControls() const; |
|
354 |
CCoeControl* ComponentControl(TInt aIndex) const; |
|
355 |
void SizeChanged(); |
|
356 |
TTypeUid::Ptr MopSupplyObject(TTypeUid aId); |
|
357 |
||
358 |
// Private command handling |
|
359 |
void PopulateMenuItemsWithListL(const CMIDMenuHandler::TMenuType& aMenuType, |
|
360 |
RArray<CEikMenuPaneItem::SData>& aItems, CMIDCommandList* aCommandList, TBool aSeparator); |
|
361 |
TBool CommandIsMappedToSk(const CMIDCommand* aCommand) const; |
|
362 |
void HandleStandardCommandL(const TCommandEntry& aCmdEntry); |
|
363 |
void HandleItemCommandL(const TCommandEntry& aCmdEntry); |
|
364 |
TInt GetInternalCommandIdFor(CMIDCommand* aCommand) const; |
|
83
26b2b12093af
Revision: v2.2.17
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
77
diff
changeset
|
365 |
void GetOkOptionsMenuCommands(RPointerArray<CMIDCommand>& aCommands) const; |
66 | 366 |
void ResetSoftKeysAndCommands(const RArray<CMIDCommandList*>& aLists); |
367 |
||
368 |
// Visual layouting and updating |
|
369 |
void UpdateVisualAppearanceL(); |
|
370 |
void UpdateTickerL(); |
|
371 |
void Layout(); |
|
372 |
void SizeWindowAndToolBar(); |
|
373 |
void ReplaceBehindAlertIfNeeded(); |
|
374 |
void UpdateDisplayableRect(); |
|
375 |
||
376 |
// Activation handling |
|
377 |
void HandleActivatedL(); |
|
378 |
void HandleDeactivated(); |
|
379 |
||
380 |
||
381 |
// The structure to store the Direct content bounds and its identification number |
|
382 |
struct TDirectContentsRect |
|
383 |
{ |
|
384 |
/** |
|
385 |
* Default ctor |
|
386 |
*/ |
|
387 |
TDirectContentsRect() |
|
388 |
: iRefCount(0) {} |
|
389 |
||
390 |
/** |
|
391 |
* Ctor |
|
392 |
* @param aRect Rectangle |
|
393 |
*/ |
|
394 |
TDirectContentsRect(const TRect& aRect) |
|
395 |
: iRect(aRect), iRefCount(1) {} |
|
396 |
||
397 |
TRect iRect; |
|
398 |
TInt iRefCount; |
|
399 |
}; |
|
400 |
||
401 |
/** |
|
402 |
* Determines whether two TDirectContentsRect type objects match |
|
403 |
* @param aLhs First object |
|
404 |
* @param aRhs Second object |
|
405 |
* @return True if matched |
|
406 |
* @see RArray::Find |
|
407 |
*/ |
|
408 |
static TBool MatchDirectContentsRects( |
|
409 |
const TDirectContentsRect& aLhs, const TDirectContentsRect& aRhs); |
|
410 |
||
411 |
/** |
|
412 |
* Updates <code>iDirectContentsRegion</code> according to |
|
413 |
* the <code>iDirectContentsRects</code> array. |
|
414 |
*/ |
|
415 |
void UpdateDirectContentsRegion(); |
|
416 |
||
417 |
||
418 |
// From MEikMenuObserver |
|
419 |
void SetEmphasis(CCoeControl* aMenuControl,TBool aEmphasis); |
|
420 |
/** |
|
421 |
* OnScreenKeypad |
|
422 |
* Returns canvas rect from LAF when using OnScreenKeypad. |
|
423 |
* |
|
424 |
* @return TRect Canvas Rect |
|
425 |
* |
|
426 |
* @since S60 5.0 |
|
427 |
*/ |
|
428 |
TRect GetCanvasRectFromLaf(); |
|
429 |
||
430 |
/** |
|
431 |
* Set correct On-Screen keyboard type. |
|
432 |
* |
|
433 |
* @return void |
|
434 |
* |
|
435 |
* @since S60 5.0 |
|
436 |
*/ |
|
437 |
void UpdateOnScreenKeypadSettings(); |
|
438 |
||
439 |
/** |
|
440 |
* Read On-Screen keyboard MIDlet suite settings |
|
441 |
* |
|
442 |
* @return void |
|
443 |
* |
|
444 |
* @since S60 5.0 |
|
445 |
*/ |
|
446 |
void ReadOnScreenKeypadTypeFromSuiteSettings(); |
|
447 |
||
448 |
#ifdef RD_SCALABLE_UI_V2 |
|
449 |
/** |
|
450 |
* Returns midlet suite setting for on screen keypad. |
|
451 |
* The setting is retrieved from the User preferences API and it requires file accessing, thus |
|
452 |
* this function should not be called repeatedly because of performance issues. |
|
453 |
* |
|
454 |
* @return TOnScreenKeypadValue Current setting value. |
|
455 |
* Returns EOnScreenKeypadValueUndefined if reading of the setting fails. |
|
456 |
* |
|
457 |
* @since S60 5.0 |
|
458 |
*/ |
|
459 |
TUint OnScreenKeypadL(); |
|
460 |
#endif // RD_SCALABLE_UI_V2 |
|
461 |
||
462 |
void RenewFullscreenCanvasLabelCacheL(); |
|
463 |
||
464 |
/** |
|
465 |
* In case content is Canvas, notifies it about changed |
|
466 |
* foreground status. |
|
467 |
* |
|
468 |
* @param aForeground ETrue, if displayable is on foreground, |
|
469 |
* EFalse otherwise. |
|
470 |
* @since S60 9.2 |
|
471 |
*/ |
|
472 |
void HandleCanvasForeground(TBool aForeground); |
|
473 |
||
474 |
void HideIndicator(CEikStatusPane* aSp, TInt aId); |
|
475 |
void HideIndicators(); |
|
476 |
||
477 |
/** |
|
478 |
* If content control is CMIDCanvas, returns pointer to it, NULL otherwise. |
|
479 |
* @since S60 9.2 |
|
480 |
*/ |
|
83
26b2b12093af
Revision: v2.2.17
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
77
diff
changeset
|
481 |
CMIDCanvas* GetContentCanvas(); |
66 | 482 |
|
483 |
private: |
|
484 |
CMIDAppUi* iAppUi; |
|
485 |
CMIDUIManager* iUIManager; |
|
486 |
MMIDEnv& iEnv; |
|
487 |
CAknLongTapDetector* iLongTapDetector; |
|
488 |
TBool iLongTapDetected; |
|
489 |
CAknStylusPopUpMenu* iStylusPopupMenu; |
|
490 |
||
491 |
// Controls |
|
492 |
CCoeControl* iContentControl; |
|
493 |
CEikButtonGroupContainer* iCba; |
|
494 |
// Peers |
|
495 |
CMIDTicker* iTicker; |
|
496 |
MMIDComponent* iContent; |
|
497 |
||
498 |
//The main displayable commands |
|
499 |
CMIDCommandList* iCommandList; |
|
500 |
||
501 |
//Displayable behind Alert and PopupTextBox |
|
502 |
CMIDDisplayable* iDisplayableBehindPopup; |
|
503 |
||
504 |
//The commands associated with form items |
|
505 |
CMIDCommandList* iItemCommandList; |
|
506 |
||
507 |
// The command associated with middle soft key, may be NULL |
|
508 |
CMIDCommand* iMSKCommand; |
|
509 |
||
510 |
//Sofkey information. For each softkey on the device it |
|
511 |
//stores the allowed commands types, the mapped command |
|
512 |
//or default CBA button |
|
513 |
RPointerArray<CMIDSoftKey> iSoftKeys; |
|
514 |
||
515 |
CMIDMenuHandler* iMenuHandler; |
|
516 |
HBufC* iTitle; |
|
517 |
TBool iHasTitle; |
|
518 |
||
519 |
//Skin |
|
520 |
CAknsBasicBackgroundControlContext* iBackGroundControlContext; |
|
521 |
||
522 |
// State |
|
523 |
TBool iIsFullScreenMode; |
|
524 |
TBool iActive; |
|
525 |
TBool iCommandListenerExistence; |
|
526 |
TRect iDisplayableRect; |
|
527 |
// current number of item commands |
|
528 |
TInt iItemCommandsCount; |
|
529 |
||
530 |
CMIDCommand* iSelectCommand; |
|
531 |
TBool iSelectCommandEnabled; |
|
532 |
||
533 |
TBool iS60SelectionKeyCompatibility; |
|
534 |
||
535 |
//OnScreenKeypad specific members |
|
536 |
CMIDCanvasKeypad* iCanvasKeypad; |
|
537 |
CMIDCanvas* iCanvas; |
|
538 |
TBool iUseOnScreenKeypad; |
|
539 |
TInt iOnScreenKeyboardType; |
|
540 |
TInt iSKPositionWithQwerty; |
|
541 |
||
542 |
mutable RRegion iUpdateRegion; |
|
543 |
RRegion iDirectContentsRegion; |
|
544 |
// Direct content bounds list |
|
545 |
RArray< TDirectContentsRect > iDirectContentsRects; |
|
546 |
||
547 |
// Structure to store the softkey label position and anchor |
|
548 |
struct TSoftkeyLabel |
|
549 |
{ |
|
550 |
TPoint iPosition; |
|
551 |
TSize iSize; |
|
552 |
// Java anchor constant as defined in class Graphics |
|
553 |
enum TJavaAnchor |
|
554 |
{ |
|
555 |
EJavaHCenter = 1, |
|
556 |
EJavaVCenter = 2, |
|
557 |
EJavaLeft = 4, |
|
558 |
EJavaRight = 8, |
|
559 |
EJavaTop = 16, |
|
560 |
EJavaBottom = 32 |
|
561 |
}; |
|
562 |
TInt iAnchor; |
|
563 |
// Shows if the sk is used |
|
564 |
TBool iIsOn; |
|
565 |
}; |
|
566 |
||
567 |
// The storage of softkey labels data |
|
568 |
// This is used for the increasing of the performace of getting SK properties |
|
569 |
// The data validity is stored in iFullscreenCanvasLabelCacheIsValid |
|
570 |
// The data are renewed/revalidated by RenewFullscreenCanvasLabelCache() |
|
571 |
TSoftkeyLabel iFullscreenCanvasLabelCache[ KSoftKeyLabelPropertyNumberOfSoftKeys ]; |
|
572 |
||
573 |
// Shows if the data in iFullscreenCanvasLabelCache are valid |
|
574 |
TBool iFullscreenCanvasLabelCacheIsValid; |
|
575 |
||
576 |
// VKB status |
|
577 |
#ifdef RD_TACTILE_FEEDBACK |
|
578 |
RPeninputServer iPenInputServer; |
|
579 |
TBool iPenInputServerConnected; |
|
580 |
#endif |
|
581 |
||
582 |
// Used by TextBox indicating whether the textbox is popup or not. |
|
583 |
TBool iIsPopupTextBox; |
|
584 |
||
585 |
/** |
|
586 |
* Initialize iPropertyWatch as CPropertyWatch. Active Object will be |
|
587 |
* removed from Active Scheduler in CMIDDisplayable (destructor). |
|
588 |
*/ |
|
589 |
CPropertyWatch* iPropertyWatch; |
|
590 |
||
591 |
//stores id of command mapped to the MSK |
|
592 |
TInt iIdOfMSKCommand; |
|
593 |
||
594 |
#ifdef RD_JAVA_S60_RELEASE_9_2 |
|
595 |
// Indicates opened split screen keyboard |
|
596 |
TBool iSplitScreenKeyboard; |
|
597 |
#endif // RD_JAVA_S60_RELEASE_9_2 |
|
598 |
||
599 |
TBool iRestoreOrientation; |
|
600 |
CAknAppUiBase::TAppUiOrientation iOldUiOrientation; |
|
601 |
TInt iReleaseCnt; |
|
602 |
}; |
|
603 |
||
604 |
||
605 |
||
606 |
||
607 |
// Timer delay |
|
608 |
const TInt KTimerDelayValue = 200000;//0.2s |
|
609 |
||
610 |
/** |
|
611 |
An active object that tracks changes to the active keyboard properties |
|
612 |
*/ |
|
613 |
NONSHARABLE_CLASS(CPropertyWatch) : public CActive |
|
614 |
{ |
|
615 |
public: |
|
616 |
static CPropertyWatch* NewL(MMIDDisplayable* aDisplayable); |
|
617 |
~CPropertyWatch(); |
|
618 |
private: |
|
619 |
CPropertyWatch(); |
|
620 |
void ConstructL(MMIDDisplayable* aDisplayable); |
|
621 |
void RunL(); |
|
622 |
void DoCancel(); |
|
623 |
void HandleDelayTimerEventL(); |
|
624 |
static TInt DelayTimerCallbackL(TAny* aThis); |
|
625 |
||
626 |
CMIDDisplayable* iDisplayable; |
|
627 |
RProperty iProperty; |
|
628 |
||
629 |
/** |
|
630 |
* Timer delay for reacting to keypad opening/closing. |
|
631 |
*/ |
|
632 |
CPeriodic* iDelayTimer; |
|
633 |
||
634 |
}; |
|
635 |
||
636 |
||
637 |
||
638 |
#endif // CMIDDISPLAYABLE_H |
|
639 |
||
640 |
// End of File |