35 // using API for skin in CMIDDisplayable.cpp |
35 // using API for skin in CMIDDisplayable.cpp |
36 // using API for icons and skin in CMIDChoiceGroupModel.cpp |
36 // using API for icons and skin in CMIDChoiceGroupModel.cpp |
37 #include <AknsDrawUtils.h>// skin |
37 #include <AknsDrawUtils.h>// skin |
38 // for backgroud control context (iBackGroundControlContext) |
38 // for backgroud control context (iBackGroundControlContext) |
39 #include <AknsBasicBackgroundControlContext.h> //skin |
39 #include <AknsBasicBackgroundControlContext.h> //skin |
|
40 #include <aknappui.h> |
40 |
41 |
41 #include "CMIDCommand.h" |
42 #include "CMIDCommand.h" |
42 // API needed for working with commands and command list (setting, getting, handling) |
43 // API needed for working with commands and command list (setting, getting, handling) |
43 #include "CMIDCommandList.h" |
44 #include "CMIDCommandList.h" |
44 // using CMIDMenuHandler::TMenuType |
45 // using CMIDMenuHandler::TMenuType |
45 #include "CMIDMenuHandler.h" |
46 #include "CMIDMenuHandler.h" |
46 // using TMidpCustomEvents enumeration |
|
47 #include "S60LCDUICustomEvents.h" |
|
48 #include "CMIDCanvasKeypad.h" |
47 #include "CMIDCanvasKeypad.h" |
49 #include <e32property.h> |
48 #include <e32property.h> |
50 |
49 |
51 #ifdef RD_TACTILE_FEEDBACK |
50 #ifdef RD_TACTILE_FEEDBACK |
52 #include <touchfeedback.h> |
51 #include <touchfeedback.h> |
68 class CAknStylusPopUpMenu; |
67 class CAknStylusPopUpMenu; |
69 class CPropertyWatch; |
68 class CPropertyWatch; |
70 |
69 |
71 // Container for MIDlet Displayables. |
70 // Container for MIDlet Displayables. |
72 NONSHARABLE_CLASS(CMIDDisplayable) : public CEikBorderedControl, public MMIDDisplayable, |
71 NONSHARABLE_CLASS(CMIDDisplayable) : public CEikBorderedControl, public MMIDDisplayable, |
73 public MMIDEnvObserver, public MAknLongTapDetectorCallBack, public MEikMenuObserver |
72 public MMIDEnvObserver, public MAknLongTapDetectorCallBack, public MEikMenuObserver |
74 { |
73 { |
75 public: |
74 public: |
76 |
75 |
77 #ifdef RD_SCALABLE_UI_V2 |
76 #ifdef RD_SCALABLE_UI_V2 |
78 /** |
77 /** |
140 |
139 |
141 // From MMIDEnvObserver |
140 // From MMIDEnvObserver |
142 void HandleSwitchOnL(TBool aSwitchOn); |
141 void HandleSwitchOnL(TBool aSwitchOn); |
143 void HandleForegroundL(TBool aForeground); |
142 void HandleForegroundL(TBool aForeground); |
144 void HandleResourceChangeL(TInt aType); |
143 void HandleResourceChangeL(TInt aType); |
|
144 #ifdef RD_JAVA_NGA_ENABLED |
|
145 void HandleFullOrPartialForegroundL(TBool aFullOrPartialFg); |
|
146 void HandleFreeGraphicsMemory(); |
|
147 #endif |
145 |
148 |
146 // Title handling |
149 // Title handling |
147 TBool HasTitle() const; |
150 TBool HasTitle() const; |
148 void ShowTitleL(); |
151 void ShowTitleL(); |
149 HBufC* Title(); |
152 HBufC* Title(); |
160 * @see RestoreMenuL() |
163 * @see RestoreMenuL() |
161 **/ |
164 **/ |
162 void InitializeCbasL(); |
165 void InitializeCbasL(); |
163 void SetCba(CEikButtonGroupContainer* aCba); |
166 void SetCba(CEikButtonGroupContainer* aCba); |
164 TBool ShowOkOptionsMenuL(); |
167 TBool ShowOkOptionsMenuL(); |
|
168 TBool ShowScreenOrHelpOptionsMenuL(); |
165 TInt NumCommandsForOkOptionsMenu() const; |
169 TInt NumCommandsForOkOptionsMenu() const; |
|
170 TInt NumCommandsForScreenOrHelpOptionsMenu() const; |
166 TInt GetHighestPriorityScreenOrHelpCommand() const; |
171 TInt GetHighestPriorityScreenOrHelpCommand() const; |
167 void SetItemCommandList(CMIDCommandList* aList, CMIDCommand* aMSKCommand); |
172 void SetItemCommandList(CMIDCommandList* aList, CMIDCommand* aMSKCommand); |
168 void SetMSKCommand(CMIDCommand* aMSKCommand); |
173 void SetMSKCommand(CMIDCommand* aMSKCommand); |
|
174 |
169 /** |
175 /** |
170 * Stores select command to Displayable |
176 * Stores select command to Displayable |
171 * @param aSelectCommand a command used in MSK and in menu |
177 * @param aSelectCommand a command used in MSK and in menu |
172 */ |
178 */ |
173 void SetSelectCommand(CMIDCommand* aSelectCommand); |
179 void SetSelectCommand(CMIDCommand* aSelectCommand); |
309 * @return void |
315 * @return void |
310 * |
316 * |
311 * @since S60 5.0 |
317 * @since S60 5.0 |
312 */ |
318 */ |
313 void ProcessMSKCommandL(); |
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(); |
314 |
347 |
315 private: |
348 private: |
316 // Construction and destruction |
349 // Construction and destruction |
317 CMIDDisplayable(MMIDEnv& aEnv,CMIDUIManager& aUIManager); |
350 CMIDDisplayable(MMIDEnv& aEnv,CMIDUIManager& aUIManager); |
318 void ConstructL(); |
351 void ConstructL(); |
330 RArray<CEikMenuPaneItem::SData>& aItems, CMIDCommandList* aCommandList, TBool aSeparator); |
363 RArray<CEikMenuPaneItem::SData>& aItems, CMIDCommandList* aCommandList, TBool aSeparator); |
331 TBool CommandIsMappedToSk(const CMIDCommand* aCommand) const; |
364 TBool CommandIsMappedToSk(const CMIDCommand* aCommand) const; |
332 void HandleStandardCommandL(const TCommandEntry& aCmdEntry); |
365 void HandleStandardCommandL(const TCommandEntry& aCmdEntry); |
333 void HandleItemCommandL(const TCommandEntry& aCmdEntry); |
366 void HandleItemCommandL(const TCommandEntry& aCmdEntry); |
334 TInt GetInternalCommandIdFor(CMIDCommand* aCommand) const; |
367 TInt GetInternalCommandIdFor(CMIDCommand* aCommand) const; |
335 void GetOkOptionsMenuCommands(RPointerArray<CMIDCommand>& aCommands) const; |
368 void GetOkOptionsMenuCommandsL(RPointerArray<CMIDCommand>& aCommands) const; |
336 void ResetSoftKeysAndCommands(const RArray<CMIDCommandList*>& aLists); |
369 void ResetSoftKeysAndCommands(const RArray<CMIDCommandList*>& aLists); |
337 |
370 |
338 // Visual layouting and updating |
371 // Visual layouting and updating |
339 void UpdateVisualAppearanceL(); |
372 void UpdateVisualAppearanceL(); |
340 void UpdateTickerL(); |
373 void UpdateTickerL(); |
441 */ |
474 */ |
442 void HandleCanvasForeground(TBool aForeground); |
475 void HandleCanvasForeground(TBool aForeground); |
443 |
476 |
444 void HideIndicator(CEikStatusPane* aSp, TInt aId); |
477 void HideIndicator(CEikStatusPane* aSp, TInt aId); |
445 void HideIndicators(); |
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(); |
446 |
485 |
447 private: |
486 private: |
448 CMIDAppUi* iAppUi; |
487 CMIDAppUi* iAppUi; |
449 CMIDUIManager* iUIManager; |
488 CMIDUIManager* iUIManager; |
450 MMIDEnv& iEnv; |
489 MMIDEnv& iEnv; |
557 |
596 |
558 #ifdef RD_JAVA_S60_RELEASE_9_2 |
597 #ifdef RD_JAVA_S60_RELEASE_9_2 |
559 // Indicates opened split screen keyboard |
598 // Indicates opened split screen keyboard |
560 TBool iSplitScreenKeyboard; |
599 TBool iSplitScreenKeyboard; |
561 #endif // RD_JAVA_S60_RELEASE_9_2 |
600 #endif // RD_JAVA_S60_RELEASE_9_2 |
562 |
601 |
|
602 TBool iRestoreOrientation; |
|
603 CAknAppUiBase::TAppUiOrientation iOldUiOrientation; |
|
604 TInt iReleaseCnt; |
563 }; |
605 }; |
564 |
606 |
565 |
607 |
566 |
608 |
567 |
609 |