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 |
TBool ShowScreenOrHelpOptionsMenuL();
|
|
169 |
TInt NumCommandsForOkOptionsMenu() const;
|
|
170 |
TInt NumCommandsForScreenOrHelpOptionsMenu() const;
|
|
171 |
TInt GetHighestPriorityScreenOrHelpCommand() const;
|
|
172 |
void SetItemCommandList(CMIDCommandList* aList, CMIDCommand* aMSKCommand);
|
|
173 |
void SetMSKCommand(CMIDCommand* aMSKCommand);
|
|
174 |
|
|
175 |
/**
|
|
176 |
* Stores select command to Displayable
|
|
177 |
* @param aSelectCommand a command used in MSK and in menu
|
|
178 |
*/
|
|
179 |
void SetSelectCommand(CMIDCommand* aSelectCommand);
|
|
180 |
/**
|
|
181 |
* Disables or enables select command
|
|
182 |
* @aEnableSelectCommand ETrue enables select command and EFalse disables select command
|
|
183 |
*/
|
|
184 |
void SetSelectCommandState(TBool aEnableSelectCommand);
|
|
185 |
|
|
186 |
TInt CommandCount();
|
|
187 |
void ProcessCommandL(TInt aCommandId);
|
|
188 |
void DisplayableBehindPopupIsDestroyed();
|
|
189 |
// Processes native Help command event to java
|
|
190 |
void HandleHelpCommandL();
|
|
191 |
// Get number of inserted help commands
|
|
192 |
TInt NumCommandsForHelpOptionsMenu() const;
|
|
193 |
void HandleHighestPriorityScreenOrHelpCommandL();
|
|
194 |
|
|
195 |
#ifdef RD_SCALABLE_UI_V2
|
|
196 |
// This function can be moved out from RD_SCALABLE_UI_V2 flag if needed.
|
|
197 |
// It is behind this flag because currently it is used only by Touch.
|
|
198 |
/**
|
|
199 |
* Passes call to ProcessCommandL (TInt aCommandId) function.
|
|
200 |
* This is useful in situations in which the internal Command ID is not available.
|
|
201 |
*
|
|
202 |
* @param aCommand to be executed.
|
|
203 |
* @since S60 5.0
|
|
204 |
*/
|
|
205 |
void ProcessCommandL(CMIDCommand* aCommand);
|
|
206 |
#endif // RD_SCALABLE_UI_V2
|
|
207 |
|
|
208 |
void CreateMenuItemsL(const CMIDMenuHandler::TMenuType& aMenuType,
|
|
209 |
RArray<CEikMenuPaneItem::SData>& aMenuItems);
|
|
210 |
// Skin
|
|
211 |
MAknsControlContext* BackGroundControlContext();
|
|
212 |
|
|
213 |
/** From MAknLongTapDetectorCallBack */
|
|
214 |
void HandleLongTapEventL(const TPoint& /*aPenEventLocation*/, const TPoint& /*aPenEventScreenLocation*/);
|
|
215 |
|
|
216 |
/**
|
|
217 |
* Way to report pointer event to displayable so that the component will get the
|
|
218 |
* default long tap functionality. This method should be called when ever a pointer
|
|
219 |
* event occurs in an ui component. Returns true if the event is consumed and should
|
|
220 |
* not be forwarded any more (e.g. pointer up event after a detected long tap).
|
|
221 |
**/
|
|
222 |
TBool TryDetectLongTapL(const TPointerEvent& aPointerEvent);
|
|
223 |
|
|
224 |
// Misc.
|
|
225 |
TBool IsFullScreenMode() const;
|
|
226 |
CMIDMenuHandler* MenuHandler() const;
|
|
227 |
TBool IsActive() const;
|
|
228 |
|
|
229 |
/**
|
|
230 |
* Content component notifies Displayable about its deletion.
|
|
231 |
*
|
|
232 |
* @note It might happen that content is destroyed before displayable
|
|
233 |
* and that's why we need to notify displayable about its content deletion.
|
|
234 |
* @see Displayable.java: registeredFinalize()
|
|
235 |
**/
|
|
236 |
void NotifyContentDestroyed();
|
|
237 |
|
|
238 |
/**
|
|
239 |
* Gets a command listener existence info.
|
|
240 |
* @since Series S60 3.2
|
|
241 |
* @return ETrue if a command listener is set
|
|
242 |
*/
|
|
243 |
TBool IsCommandListenerSet() const;
|
|
244 |
/**
|
|
245 |
* Get UI manager
|
|
246 |
* @return CMIDUIManager instance
|
|
247 |
*
|
|
248 |
* @since s60
|
|
249 |
*/
|
|
250 |
virtual CMIDUIManager* GetUIManager() const;
|
|
251 |
|
|
252 |
/**
|
|
253 |
* Sets S60 Selection Key Compatibility
|
|
254 |
*/
|
|
255 |
void SetS60SelectionKeyCompatibility(TBool aS60SelectionKeyCompatibility);
|
|
256 |
|
|
257 |
/**
|
|
258 |
Adds a rectangle which is excluded from redrawing (for DSA)
|
|
259 |
@param "aRect" Rentangle to be exluded from redrawing.
|
|
260 |
*/
|
|
261 |
void AddDirectContentArea(const TRect& aRect);
|
|
262 |
|
|
263 |
/**
|
|
264 |
Removes a rectangle which is excluded from redrawing (for DSA)
|
|
265 |
@param "aRect" Rentangle to be removed from exclusion list.
|
|
266 |
*/
|
|
267 |
void RemoveDirectContentArea(const TRect& aRect);
|
|
268 |
|
|
269 |
/**
|
|
270 |
Checks if there were some direct content area added
|
|
271 |
@return ETrue if there no DC Area has been added
|
|
272 |
*/
|
|
273 |
TBool NoDirectContentAreaDefined();
|
|
274 |
|
|
275 |
/**
|
|
276 |
* Sets popup style TextBox boolean value. Called by CMIDTextBoxDialogControl when
|
|
277 |
* TextBox presentation is pop-up.
|
|
278 |
*
|
|
279 |
* @param "aPopup" boolean value indicating whether the textbox is popup or not.
|
|
280 |
*
|
|
281 |
* @since S60 5.0
|
|
282 |
*/
|
|
283 |
void SetPopupTextBox(TBool aPopup);
|
|
284 |
|
|
285 |
/**
|
|
286 |
* Returns boolean value indicating whether this displayable is pop-up TextBox.
|
|
287 |
*
|
|
288 |
* @return TBool
|
|
289 |
*
|
|
290 |
* @since S60 5.0
|
|
291 |
*/
|
|
292 |
virtual TBool IsPopupTextBox();
|
|
293 |
|
|
294 |
/**
|
|
295 |
* Handles the On-Screen Keypad visual appearance.
|
|
296 |
*
|
|
297 |
* @return void
|
|
298 |
*
|
|
299 |
* @since S60 5.0
|
|
300 |
*/
|
|
301 |
void HandleOnScreenKeypadVisual();
|
|
302 |
|
|
303 |
/**
|
|
304 |
* Notify a CMIDDisplayable then application is switch to background.
|
|
305 |
*
|
|
306 |
* @return void
|
|
307 |
*
|
|
308 |
* @since S60 5.0
|
|
309 |
*/
|
|
310 |
void HandleApplicationBackground();
|
|
311 |
|
|
312 |
/**
|
|
313 |
* Function process command which is mapped to MSK
|
|
314 |
*
|
|
315 |
* @return void
|
|
316 |
*
|
|
317 |
* @since S60 5.0
|
|
318 |
*/
|
|
319 |
void ProcessMSKCommandL();
|
|
320 |
/**
|
|
321 |
* Enum callback type
|
|
322 |
* @since S60 9.2
|
|
323 |
*/
|
|
324 |
enum TLcduiUiCallbackType
|
|
325 |
{
|
|
326 |
EFixUIOrientation,
|
|
327 |
EUnFixUIOrientation
|
|
328 |
};
|
|
329 |
|
|
330 |
/**
|
|
331 |
* Fix orientation from MMA
|
|
332 |
*
|
|
333 |
* @return void
|
|
334 |
*
|
|
335 |
* @since S60 9.2
|
|
336 |
*/
|
|
337 |
void FixOrientation();
|
|
338 |
|
|
339 |
/**
|
|
340 |
* Release orientation from MMA
|
|
341 |
*
|
|
342 |
* @return void
|
|
343 |
*
|
|
344 |
* @since S60 9.2
|
|
345 |
*/
|
|
346 |
void ReleaseOrientation();
|
|
347 |
|
|
348 |
private:
|
|
349 |
// Construction and destruction
|
|
350 |
CMIDDisplayable(MMIDEnv& aEnv,CMIDUIManager& aUIManager);
|
|
351 |
void ConstructL();
|
|
352 |
~CMIDDisplayable();
|
|
353 |
|
|
354 |
// From CCoeControl
|
|
355 |
void Draw(const TRect& aRect) const;
|
|
356 |
virtual TInt CountComponentControls() const;
|
|
357 |
CCoeControl* ComponentControl(TInt aIndex) const;
|
|
358 |
void SizeChanged();
|
|
359 |
TTypeUid::Ptr MopSupplyObject(TTypeUid aId);
|
|
360 |
|
|
361 |
// Private command handling
|
|
362 |
void PopulateMenuItemsWithListL(const CMIDMenuHandler::TMenuType& aMenuType,
|
|
363 |
RArray<CEikMenuPaneItem::SData>& aItems, CMIDCommandList* aCommandList, TBool aSeparator);
|
|
364 |
TBool CommandIsMappedToSk(const CMIDCommand* aCommand) const;
|
|
365 |
void HandleStandardCommandL(const TCommandEntry& aCmdEntry);
|
|
366 |
void HandleItemCommandL(const TCommandEntry& aCmdEntry);
|
|
367 |
TInt GetInternalCommandIdFor(CMIDCommand* aCommand) const;
|
|
368 |
void GetOkOptionsMenuCommandsL(RPointerArray<CMIDCommand>& aCommands) const;
|
|
369 |
void ResetSoftKeysAndCommands(const RArray<CMIDCommandList*>& aLists);
|
|
370 |
|
|
371 |
// Visual layouting and updating
|
|
372 |
void UpdateVisualAppearanceL();
|
|
373 |
void UpdateTickerL();
|
|
374 |
void Layout();
|
|
375 |
void SizeWindowAndToolBar();
|
|
376 |
void ReplaceBehindAlertIfNeeded();
|
|
377 |
void UpdateDisplayableRect();
|
|
378 |
|
|
379 |
// Activation handling
|
|
380 |
void HandleActivatedL();
|
|
381 |
void HandleDeactivated();
|
|
382 |
|
|
383 |
|
|
384 |
// The structure to store the Direct content bounds and its identification number
|
|
385 |
struct TDirectContentsRect
|
|
386 |
{
|
|
387 |
/**
|
|
388 |
* Default ctor
|
|
389 |
*/
|
|
390 |
TDirectContentsRect()
|
|
391 |
: iRefCount(0) {}
|
|
392 |
|
|
393 |
/**
|
|
394 |
* Ctor
|
|
395 |
* @param aRect Rectangle
|
|
396 |
*/
|
|
397 |
TDirectContentsRect(const TRect& aRect)
|
|
398 |
: iRect(aRect), iRefCount(1) {}
|
|
399 |
|
|
400 |
TRect iRect;
|
|
401 |
TInt iRefCount;
|
|
402 |
};
|
|
403 |
|
|
404 |
/**
|
|
405 |
* Determines whether two TDirectContentsRect type objects match
|
|
406 |
* @param aLhs First object
|
|
407 |
* @param aRhs Second object
|
|
408 |
* @return True if matched
|
|
409 |
* @see RArray::Find
|
|
410 |
*/
|
|
411 |
static TBool MatchDirectContentsRects(
|
|
412 |
const TDirectContentsRect& aLhs, const TDirectContentsRect& aRhs);
|
|
413 |
|
|
414 |
/**
|
|
415 |
* Updates <code>iDirectContentsRegion</code> according to
|
|
416 |
* the <code>iDirectContentsRects</code> array.
|
|
417 |
*/
|
|
418 |
void UpdateDirectContentsRegion();
|
|
419 |
|
|
420 |
|
|
421 |
// From MEikMenuObserver
|
|
422 |
void SetEmphasis(CCoeControl* aMenuControl,TBool aEmphasis);
|
|
423 |
/**
|
|
424 |
* OnScreenKeypad
|
|
425 |
* Returns canvas rect from LAF when using OnScreenKeypad.
|
|
426 |
*
|
|
427 |
* @return TRect Canvas Rect
|
|
428 |
*
|
|
429 |
* @since S60 5.0
|
|
430 |
*/
|
|
431 |
TRect GetCanvasRectFromLaf();
|
|
432 |
|
|
433 |
/**
|
|
434 |
* Set correct On-Screen keyboard type.
|
|
435 |
*
|
|
436 |
* @return void
|
|
437 |
*
|
|
438 |
* @since S60 5.0
|
|
439 |
*/
|
|
440 |
void UpdateOnScreenKeypadSettings();
|
|
441 |
|
|
442 |
/**
|
|
443 |
* Read On-Screen keyboard MIDlet suite settings
|
|
444 |
*
|
|
445 |
* @return void
|
|
446 |
*
|
|
447 |
* @since S60 5.0
|
|
448 |
*/
|
|
449 |
void ReadOnScreenKeypadTypeFromSuiteSettings();
|
|
450 |
|
|
451 |
#ifdef RD_SCALABLE_UI_V2
|
|
452 |
/**
|
|
453 |
* Returns midlet suite setting for on screen keypad.
|
|
454 |
* The setting is retrieved from the User preferences API and it requires file accessing, thus
|
|
455 |
* this function should not be called repeatedly because of performance issues.
|
|
456 |
*
|
|
457 |
* @return TOnScreenKeypadValue Current setting value.
|
|
458 |
* Returns EOnScreenKeypadValueUndefined if reading of the setting fails.
|
|
459 |
*
|
|
460 |
* @since S60 5.0
|
|
461 |
*/
|
|
462 |
TUint OnScreenKeypadL();
|
|
463 |
#endif // RD_SCALABLE_UI_V2
|
|
464 |
|
|
465 |
void RenewFullscreenCanvasLabelCacheL();
|
|
466 |
|
|
467 |
/**
|
|
468 |
* In case content is Canvas, notifies it about changed
|
|
469 |
* foreground status.
|
|
470 |
*
|
|
471 |
* @param aForeground ETrue, if displayable is on foreground,
|
|
472 |
* EFalse otherwise.
|
|
473 |
* @since S60 9.2
|
|
474 |
*/
|
|
475 |
void HandleCanvasForeground(TBool aForeground);
|
|
476 |
|
|
477 |
void HideIndicator(CEikStatusPane* aSp, TInt aId);
|
|
478 |
void HideIndicators();
|
|
479 |
|
|
480 |
/**
|
|
481 |
* If content control is CMIDCanvas, returns pointer to it, NULL otherwise.
|
|
482 |
* @since S60 9.2
|
|
483 |
*/
|
|
484 |
CMIDCanvas* GetContentCanvas();
|
|
485 |
|
|
486 |
private:
|
|
487 |
CMIDAppUi* iAppUi;
|
|
488 |
CMIDUIManager* iUIManager;
|
|
489 |
MMIDEnv& iEnv;
|
|
490 |
CAknLongTapDetector* iLongTapDetector;
|
|
491 |
TBool iLongTapDetected;
|
|
492 |
CAknStylusPopUpMenu* iStylusPopupMenu;
|
|
493 |
|
|
494 |
// Controls
|
|
495 |
CCoeControl* iContentControl;
|
|
496 |
CEikButtonGroupContainer* iCba;
|
|
497 |
// Peers
|
|
498 |
CMIDTicker* iTicker;
|
|
499 |
MMIDComponent* iContent;
|
|
500 |
|
|
501 |
//The main displayable commands
|
|
502 |
CMIDCommandList* iCommandList;
|
|
503 |
|
|
504 |
//Displayable behind Alert and PopupTextBox
|
|
505 |
CMIDDisplayable* iDisplayableBehindPopup;
|
|
506 |
|
|
507 |
//The commands associated with form items
|
|
508 |
CMIDCommandList* iItemCommandList;
|
|
509 |
|
|
510 |
// The command associated with middle soft key, may be NULL
|
|
511 |
CMIDCommand* iMSKCommand;
|
|
512 |
|
|
513 |
//Sofkey information. For each softkey on the device it
|
|
514 |
//stores the allowed commands types, the mapped command
|
|
515 |
//or default CBA button
|
|
516 |
RPointerArray<CMIDSoftKey> iSoftKeys;
|
|
517 |
|
|
518 |
CMIDMenuHandler* iMenuHandler;
|
|
519 |
HBufC* iTitle;
|
|
520 |
TBool iHasTitle;
|
|
521 |
|
|
522 |
//Skin
|
|
523 |
CAknsBasicBackgroundControlContext* iBackGroundControlContext;
|
|
524 |
|
|
525 |
// State
|
|
526 |
TBool iIsFullScreenMode;
|
|
527 |
TBool iActive;
|
|
528 |
TBool iCommandListenerExistence;
|
|
529 |
TRect iDisplayableRect;
|
|
530 |
// current number of item commands
|
|
531 |
TInt iItemCommandsCount;
|
|
532 |
|
|
533 |
CMIDCommand* iSelectCommand;
|
|
534 |
TBool iSelectCommandEnabled;
|
|
535 |
|
|
536 |
TBool iS60SelectionKeyCompatibility;
|
|
537 |
|
|
538 |
//OnScreenKeypad specific members
|
|
539 |
CMIDCanvasKeypad* iCanvasKeypad;
|
|
540 |
CMIDCanvas* iCanvas;
|
|
541 |
TBool iUseOnScreenKeypad;
|
|
542 |
TInt iOnScreenKeyboardType;
|
|
543 |
TInt iSKPositionWithQwerty;
|
|
544 |
|
|
545 |
mutable RRegion iUpdateRegion;
|
|
546 |
RRegion iDirectContentsRegion;
|
|
547 |
// Direct content bounds list
|
|
548 |
RArray< TDirectContentsRect > iDirectContentsRects;
|
|
549 |
|
|
550 |
// Structure to store the softkey label position and anchor
|
|
551 |
struct TSoftkeyLabel
|
|
552 |
{
|
|
553 |
TPoint iPosition;
|
|
554 |
TSize iSize;
|
|
555 |
// Java anchor constant as defined in class Graphics
|
|
556 |
enum TJavaAnchor
|
|
557 |
{
|
|
558 |
EJavaHCenter = 1,
|
|
559 |
EJavaVCenter = 2,
|
|
560 |
EJavaLeft = 4,
|
|
561 |
EJavaRight = 8,
|
|
562 |
EJavaTop = 16,
|
|
563 |
EJavaBottom = 32
|
|
564 |
};
|
|
565 |
TInt iAnchor;
|
|
566 |
// Shows if the sk is used
|
|
567 |
TBool iIsOn;
|
|
568 |
};
|
|
569 |
|
|
570 |
// The storage of softkey labels data
|
|
571 |
// This is used for the increasing of the performace of getting SK properties
|
|
572 |
// The data validity is stored in iFullscreenCanvasLabelCacheIsValid
|
|
573 |
// The data are renewed/revalidated by RenewFullscreenCanvasLabelCache()
|
|
574 |
TSoftkeyLabel iFullscreenCanvasLabelCache[ KSoftKeyLabelPropertyNumberOfSoftKeys ];
|
|
575 |
|
|
576 |
// Shows if the data in iFullscreenCanvasLabelCache are valid
|
|
577 |
TBool iFullscreenCanvasLabelCacheIsValid;
|
|
578 |
|
|
579 |
// VKB status
|
|
580 |
#ifdef RD_TACTILE_FEEDBACK
|
|
581 |
RPeninputServer iPenInputServer;
|
|
582 |
TBool iPenInputServerConnected;
|
|
583 |
#endif
|
|
584 |
|
|
585 |
// Used by TextBox indicating whether the textbox is popup or not.
|
|
586 |
TBool iIsPopupTextBox;
|
|
587 |
|
|
588 |
/**
|
|
589 |
* Initialize iPropertyWatch as CPropertyWatch. Active Object will be
|
|
590 |
* removed from Active Scheduler in CMIDDisplayable (destructor).
|
|
591 |
*/
|
|
592 |
CPropertyWatch* iPropertyWatch;
|
|
593 |
|
|
594 |
//stores id of command mapped to the MSK
|
|
595 |
TInt iIdOfMSKCommand;
|
|
596 |
|
|
597 |
#ifdef RD_JAVA_S60_RELEASE_9_2
|
|
598 |
// Indicates opened split screen keyboard
|
|
599 |
TBool iSplitScreenKeyboard;
|
|
600 |
#endif // RD_JAVA_S60_RELEASE_9_2
|
|
601 |
|
|
602 |
TBool iRestoreOrientation;
|
|
603 |
CAknAppUiBase::TAppUiOrientation iOldUiOrientation;
|
|
604 |
TInt iReleaseCnt;
|
|
605 |
};
|
|
606 |
|
|
607 |
|
|
608 |
|
|
609 |
|
|
610 |
// Timer delay
|
|
611 |
const TInt KTimerDelayValue = 200000;//0.2s
|
|
612 |
|
|
613 |
/**
|
|
614 |
An active object that tracks changes to the active keyboard properties
|
|
615 |
*/
|
|
616 |
NONSHARABLE_CLASS(CPropertyWatch) : public CActive
|
|
617 |
{
|
|
618 |
public:
|
|
619 |
static CPropertyWatch* NewL(MMIDDisplayable* aDisplayable);
|
|
620 |
~CPropertyWatch();
|
|
621 |
private:
|
|
622 |
CPropertyWatch();
|
|
623 |
void ConstructL(MMIDDisplayable* aDisplayable);
|
|
624 |
void RunL();
|
|
625 |
void DoCancel();
|
|
626 |
void HandleDelayTimerEventL();
|
|
627 |
static TInt DelayTimerCallbackL(TAny* aThis);
|
|
628 |
|
|
629 |
CMIDDisplayable* iDisplayable;
|
|
630 |
RProperty iProperty;
|
|
631 |
|
|
632 |
/**
|
|
633 |
* Timer delay for reacting to keypad opening/closing.
|
|
634 |
*/
|
|
635 |
CPeriodic* iDelayTimer;
|
|
636 |
|
|
637 |
};
|
|
638 |
|
|
639 |
|
|
640 |
|
|
641 |
#endif // CMIDDISPLAYABLE_H
|
|
642 |
|
|
643 |
// End of File
|