1 /* |
|
2 * Copyright (c) 2007-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: Application UI class |
|
15 * Version : %version: MM_83.1.2.1.23.1.20 % << Don't touch! Updated by Synergy at check-out. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef C_MMAPPUI_H |
|
21 #define C_MMAPPUI_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <gfxtranseffect/gfxtranseffect.h> // for transition effects |
|
25 #include <akntranseffect.h> // for transition effects |
|
26 |
|
27 #include <e32hashtab.h> |
|
28 #include <aknappui.h> |
|
29 #include <akntoolbarobserver.h> |
|
30 #include <eiklbo.h> |
|
31 #include <AknsSrvClient.h> |
|
32 |
|
33 #include "hncontrollerinterface.h" |
|
34 #include "mmwidgetobserver.h" |
|
35 #include "hnsuiteobserver.h" |
|
36 #include "mmactionrequest.h" |
|
37 #include "hnglobals.h" |
|
38 |
|
39 |
|
40 // FORWARD DECLARATIONS |
|
41 |
|
42 class CHnInterface; |
|
43 class CHnSuiteModel; |
|
44 class MHnMenuItemModelIterator; |
|
45 class CAknToolbar; |
|
46 class CMmWidgetContainer; |
|
47 class CMmListBoxContainer; |
|
48 class CMmGridContainer; |
|
49 class CMmHighlightManager; |
|
50 class CLiwGenericParamList; |
|
51 class CHnItemModel; |
|
52 class CMMExtensionManager; |
|
53 class CMmTemplateLibrary; |
|
54 class CMmNoMemory; |
|
55 class CMmAppkeyHandler; |
|
56 class CAknStylusPopUpMenu; |
|
57 |
|
58 /** |
|
59 * @ingroup group_matrixmenu |
|
60 * Matrix Menu Application UI. |
|
61 * Regular AVKON Application UI class, acts as controller for the application. |
|
62 * <br>Implements: |
|
63 * <ul> |
|
64 * <li>MHnControllerInterface - for notifications about model changes.</li> |
|
65 * <li>MAknToolbarObserver - to get notifications about toolbar events.</li> |
|
66 * <li>MMmWidgetObserver - |
|
67 * to get notifications about widget highlight changes.</li> |
|
68 * </ul> |
|
69 * |
|
70 * @since S60 v5.0 |
|
71 */ |
|
72 NONSHARABLE_CLASS(CMmAppUi) : public CAknAppUi, |
|
73 public MHnControllerInterface, |
|
74 public MAknToolbarObserver, |
|
75 public MMmWidgetObserver, |
|
76 public MMmActionRequest, |
|
77 public MAknsSkinChangeObserver |
|
78 { |
|
79 |
|
80 public: |
|
81 |
|
82 /** |
|
83 * 2nd phase constructor. |
|
84 * |
|
85 * @since S60 v5.0 |
|
86 */ |
|
87 void ConstructL(); |
|
88 |
|
89 /** |
|
90 * C++ default constructor. This needs to be public due to |
|
91 * the way the framework constructs the AppUi. |
|
92 * |
|
93 * @since S60 v5.0 |
|
94 */ |
|
95 CMmAppUi(); |
|
96 |
|
97 /** |
|
98 * Virtual Destructor. |
|
99 * |
|
100 * @since S60 v5.0 |
|
101 */ |
|
102 ~CMmAppUi(); |
|
103 |
|
104 // from base class CEikAppUi |
|
105 |
|
106 /** |
|
107 * From CEikAppUi. |
|
108 * Handles a change to the application's resources which |
|
109 * are shared across the environment. This function calls |
|
110 * CEikAppUi::HandleResourceChangeL except when aType is |
|
111 * KEikDynamicLayoutVariantSwitch. |
|
112 * |
|
113 * @since S60 v5.0 |
|
114 * @param aType The type of resources that have changed. |
|
115 */ |
|
116 void HandleResourceChangeL( TInt aType ); |
|
117 |
|
118 /** |
|
119 * From CEikAppUi. |
|
120 * Takes care of Command Line tail handling. |
|
121 * |
|
122 * @since S60 v5.0 |
|
123 * @param aCommand Not used by this app. |
|
124 * @param aDocumentName Not used by this app. |
|
125 * @param aTail Command line tail. |
|
126 */ |
|
127 TBool ProcessCommandParametersL( TApaCommand aCommand, |
|
128 TFileName& aDocumentName, |
|
129 const TDesC8& aTail ); |
|
130 |
|
131 /** |
|
132 * From CAknAppUi. |
|
133 * This method is overriden to ignore certain commands in |
|
134 * certain situations. For not ignored commands it simply |
|
135 * calls the base class implementation. |
|
136 * |
|
137 * @param aCommand A command ID. |
|
138 */ |
|
139 void ProcessCommandL(TInt aCommand); |
|
140 |
|
141 /** |
|
142 * From CEikAppUi. |
|
143 * Takes care of Command Line tail handling. |
|
144 * |
|
145 * @since S60 v5.0 |
|
146 * @param aUid UID of the message. |
|
147 * @param aParams Message params. |
|
148 */ |
|
149 void ProcessMessageL( TUid aUid, const TDesC8& aParams ); |
|
150 |
|
151 /** |
|
152 * From MCoeMessageObserver. |
|
153 * Handles window server messages. |
|
154 * |
|
155 * @since S60 v5.0 |
|
156 * @param aClientHandleOfTargetWindowGroup The window group that the message was sent to. |
|
157 * @param aMessageUid The message UID. |
|
158 * @param aMessageParameters The message parameters. |
|
159 * @return Indicates whether the message was handled or not handled by the function. |
|
160 */ |
|
161 MCoeMessageObserver::TMessageResponse HandleMessageL( |
|
162 TUint32 aClientHandleOfTargetWindowGroup, |
|
163 TUid aMessageUid, |
|
164 const TDesC8& aMessageParameters ); |
|
165 |
|
166 /** |
|
167 * From MEikMenuObserver (CEikAppUi). |
|
168 * Handles dynamic menu pane initialization. |
|
169 * |
|
170 * @since S60 v5.0 |
|
171 * @param aResourceId Resource ID of the menu pane. |
|
172 * @param aMenuPane The menu pane itself. |
|
173 */ |
|
174 void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ); |
|
175 |
|
176 // from base class MHnControllerInterface |
|
177 |
|
178 /** |
|
179 * From MHnControllerInterface. |
|
180 * Notifies UI to start a refresh after content change. |
|
181 * |
|
182 * @since S60 v5.0 |
|
183 * @param aRefreshType Type of refresh. |
|
184 */ |
|
185 void NotifyUiRefreshL( const THnUiRefreshType aRefreshType ); |
|
186 |
|
187 // from base class MHnSuiteObserver |
|
188 |
|
189 /** |
|
190 * From MHnSuiteObserver. |
|
191 * Trigger appropriate action on suite model. |
|
192 * |
|
193 * @since S60 v5.0 |
|
194 * @param aCustomSuiteEvent Event to perform. |
|
195 * @param aModel Suite model where aCustomSuiteEvent should be envoked. |
|
196 */ |
|
197 void HandleSuiteEventL( THnCustomSuiteEvent aCustomSuiteEvent, |
|
198 CHnSuiteModel* aModel ); |
|
199 |
|
200 // from base class MEikListBoxObserver |
|
201 |
|
202 /** |
|
203 * From MEikListBoxObserver. |
|
204 * Handles list box events. |
|
205 * |
|
206 * This pure virtual function is invoked by CEikListBox to |
|
207 * notify the observer of list box events. |
|
208 * |
|
209 * @since S60 v5.0 |
|
210 * @param aListBox The originating list box. |
|
211 * @param aEventType A code for the event. Further information |
|
212 * may be obtained by accessing the list box itself. |
|
213 */ |
|
214 void HandleListBoxEventL( CEikListBox* aListBox, |
|
215 MEikListBoxObserver::TListBoxEvent aEventType ); |
|
216 |
|
217 // from base class MMmLongTapObserver |
|
218 |
|
219 /** |
|
220 * From MMmLongTapObserver. |
|
221 * Handles long tap event reported by widget container. |
|
222 * |
|
223 * @since S60 v5.0 |
|
224 * @param aPenEventLocation The relative to screen pen event location. |
|
225 */ |
|
226 void HandleLongTapEventL( const TPoint& aPenEventLocation ); |
|
227 |
|
228 // from base class MMmKeyEventObserver |
|
229 |
|
230 /** |
|
231 * From MMmKeyEventObserver. |
|
232 * Handles key press events. |
|
233 * |
|
234 * @since S60 v5.0 |
|
235 * @param aKeyEvent Key event. |
|
236 * @param aType Event type. |
|
237 */ |
|
238 TKeyResponse HandleKeyPressedL( const TKeyEvent &aKeyEvent, |
|
239 TEventCode aType ); |
|
240 |
|
241 // from base class MMmDragAndDropObserver |
|
242 |
|
243 /** |
|
244 * From MMmDragAndDropObserver. |
|
245 * Handles the start of dragging of an item. |
|
246 * |
|
247 * @since S60 v5.0 |
|
248 * @param aModelItemIndex Index of the dragged item. |
|
249 */ |
|
250 void HandleDragStartL( TInt aModelItemIndex ); |
|
251 |
|
252 /** |
|
253 * From MMmDragAndDropObserver. |
|
254 * Handles the event of dragging an item over a different one. |
|
255 * Used to change presentation of folder icons to indicate drop into action. |
|
256 * |
|
257 * @since S60 v5.0 |
|
258 * @param aModelItemIndex Index of the item. |
|
259 */ |
|
260 void HandleDragOverL( TInt aModelItemIndex ); |
|
261 |
|
262 /** |
|
263 * From MMmDragAndDropObserver. |
|
264 * Handles the stop of dragging of an item. |
|
265 * |
|
266 * @since S60 v5.0 |
|
267 * @param aModelItemIndex Index of the dragged item. |
|
268 */ |
|
269 void HandleDragStopL( TInt aModelItemIndex ); |
|
270 |
|
271 /** |
|
272 * From MMmDragAndDropObserver. |
|
273 * Handles update of dragged item index. |
|
274 * |
|
275 * @since S60 v5.0 |
|
276 * @param aModelItemIndex New dragged item index. |
|
277 */ |
|
278 void HandleDraggedIndexUpdatedL( TInt aModelItemIndex ); |
|
279 |
|
280 // from base class MAknToolbarObserver |
|
281 |
|
282 /** |
|
283 * From MAknToolbarObserver. |
|
284 * Handles toolbar events for a certain toolbar item. |
|
285 * |
|
286 * @since S60 v5.0 |
|
287 * @param aCommand The command ID of some toolbar item. |
|
288 */ |
|
289 void OfferToolbarEventL( TInt aCommand ); |
|
290 |
|
291 // from base class MHnControllerInterface |
|
292 /** |
|
293 * From MHnControllerInterface. |
|
294 * Execute extension manager action. |
|
295 * |
|
296 * @since S60 v5.0 |
|
297 * @param aUid UID of the ECom plugin's. |
|
298 * @param aCommand Command which has to be executed on the plugin. |
|
299 * Request to the Service. |
|
300 * @param aEventParamList List of the event parameters needed to |
|
301 * execute action. Extention Manager is its owner. |
|
302 * @return Number representing error code. |
|
303 */ |
|
304 TInt ExecuteExtensionActionL( const TUid aUid , const TDesC& aCommand, |
|
305 CLiwGenericParamList* aEventParamList ); |
|
306 |
|
307 /** |
|
308 * Reloads cascade menu map. |
|
309 */ |
|
310 void ReloadCascadeMenuMapL(); |
|
311 |
|
312 /** |
|
313 * Called by the skin server when skin content is changed and the |
|
314 * connected client wants to be informed. |
|
315 * |
|
316 * @since 2.0 |
|
317 */ |
|
318 void SkinContentChanged(); |
|
319 |
|
320 /** |
|
321 * Called by the skin server to indicate that the current skin |
|
322 * configuration has changed. |
|
323 * |
|
324 * @param aReason Reason code. |
|
325 * |
|
326 * @since 2.5 |
|
327 */ |
|
328 void SkinConfigurationChanged( |
|
329 const TAknsSkinStatusConfigurationChangeReason aReason ); |
|
330 |
|
331 /** |
|
332 * Called by the skin server to indicate that the available |
|
333 * skin packages have changed. |
|
334 * |
|
335 * @param aReason Reason code. |
|
336 * |
|
337 * @since 2.5 |
|
338 */ |
|
339 void SkinPackageChanged( |
|
340 const TAknsSkinStatusPackageChangeReason aReason ); |
|
341 |
|
342 private: |
|
343 |
|
344 /** |
|
345 * Enum defining possible exit types for ExitMenuL method. |
|
346 * |
|
347 * @since S60 v5.0 |
|
348 */ |
|
349 enum TExitType |
|
350 { |
|
351 EExitReally, |
|
352 EExitToIdle, |
|
353 EExitToPhone |
|
354 }; |
|
355 |
|
356 /** |
|
357 * Enum defining possible exit types for ExitMenuL method. |
|
358 * |
|
359 * @since S60 v5.0 |
|
360 */ |
|
361 enum TExitKeyType |
|
362 { |
|
363 EExitKeyApplication, |
|
364 EExitKeyRed |
|
365 }; |
|
366 |
|
367 /** |
|
368 * Defiens edit mode state. |
|
369 * |
|
370 * @since S60 v5.0 |
|
371 */ |
|
372 enum TEditModeStatus |
|
373 { |
|
374 ENoEditMode, |
|
375 ETransitionToEditMode, |
|
376 EEditMode, |
|
377 ETransitionFromEditMode, |
|
378 EFastTransitionFromEditMode |
|
379 }; |
|
380 |
|
381 /** |
|
382 * Indicates if edit mode is on. |
|
383 * |
|
384 * @since S60 v5.0 |
|
385 * @return Returns edit mode status. |
|
386 */ |
|
387 TBool IsEditMode(); |
|
388 |
|
389 /** |
|
390 * Adjusts highlight when entering or leaving edit mode. |
|
391 * |
|
392 * @since S60 v5.0 |
|
393 * @param aOriginalHighlight Highlight that would normally be set |
|
394 * @return A modified value of highlight |
|
395 */ |
|
396 TInt AdjustEditModeHighlightL( TInt aOriginalHighlight ); |
|
397 |
|
398 /** |
|
399 * Manages the container lookup. |
|
400 * |
|
401 * @since S60 v5.0 |
|
402 * @return Pointer to the container to be loaded, of NULL |
|
403 * if a new container should be created. |
|
404 */ |
|
405 CMmWidgetContainer* GetAppropriateContainerToLoadL(); |
|
406 |
|
407 /** |
|
408 * Submits an asynchronous service request to show user a message |
|
409 * when Matrix Menu is out of memory. |
|
410 * |
|
411 * @since S60 v5.0 |
|
412 */ |
|
413 void HandleOutOfMemoryL(); |
|
414 |
|
415 /** |
|
416 * Resets MM App UI to the initial state (most of the fields). |
|
417 * |
|
418 * @since S60 v5.0 |
|
419 */ |
|
420 void ResetToInitialStateL(); |
|
421 |
|
422 /** |
|
423 * Refreshes menu pane if needed |
|
424 */ |
|
425 void HideMenuPaneIfVisibleL(); |
|
426 |
|
427 // from base class CEikAppUi |
|
428 |
|
429 /** |
|
430 * From CEikAppUi. |
|
431 * Takes care of command handling. |
|
432 * |
|
433 * @since S60 v5.0 |
|
434 * @param aCommand Command to be handled. |
|
435 */ |
|
436 void HandleCommandL( TInt aCommand ); |
|
437 |
|
438 /** |
|
439 * From CEikAppUi. |
|
440 * Handles Window Server events. |
|
441 * |
|
442 * @since S60 v5.0 |
|
443 * @param aEvent Event to be handled. |
|
444 * @param aDestination Destination control. |
|
445 */ |
|
446 void HandleWsEventL( const TWsEvent& aEvent, CCoeControl* aDestination ); |
|
447 |
|
448 /** |
|
449 * Indicates if root (main) view is displayed. |
|
450 * |
|
451 * @since S60 v5.0 |
|
452 * @return ETrue if root displayed, EFalse otherwise. |
|
453 */ |
|
454 TBool IsRootdisplayedL(); |
|
455 |
|
456 /** |
|
457 * Handles pen down events for an item. |
|
458 * |
|
459 * @since S60 v5.0 |
|
460 * @param aIndex Item index. |
|
461 */ |
|
462 void HandleHighlightItemPenDownL( TInt aIndex ); |
|
463 |
|
464 /** |
|
465 * Handles single click event on widget item. |
|
466 * |
|
467 * @since S60 v5.0 |
|
468 * @param aIndex Clicked item index. |
|
469 */ |
|
470 void HandleHighlightItemSingleClickedL( TInt aIndex ); |
|
471 |
|
472 /** |
|
473 * Handles drag event. |
|
474 * |
|
475 * @since S60 v5.0 |
|
476 */ |
|
477 void HandleEventDraggingActionedL(); |
|
478 |
|
479 /** |
|
480 * Handles click (select) events for an item. |
|
481 * |
|
482 * @since S60 v5.0 |
|
483 * @param aIndex Item index. |
|
484 */ |
|
485 void HandleHighlightItemDoubleClickedL( TInt aIndex ); |
|
486 |
|
487 /** |
|
488 * Handles suite model initialized event. |
|
489 * |
|
490 * @param aModel Suite model that has been initialized. |
|
491 * @since S60 v5.0 |
|
492 */ |
|
493 void HandleSuiteModelInitializedL( CHnSuiteModel* aModel ); |
|
494 |
|
495 /** |
|
496 * Handles suite update events. |
|
497 * |
|
498 * @since S60 v5.0 |
|
499 */ |
|
500 void UpdateL(); |
|
501 |
|
502 /** |
|
503 * Handles suite remove events. |
|
504 * |
|
505 * @since S60 v5.0 |
|
506 */ |
|
507 void RemoveL(); |
|
508 |
|
509 /** |
|
510 * Handles suite insert events. |
|
511 * |
|
512 * @since S60 v5.0 |
|
513 */ |
|
514 void InsertL(); |
|
515 |
|
516 /** |
|
517 * Handles the "Back" softkey event. |
|
518 * |
|
519 * @since S60 v5.0 |
|
520 */ |
|
521 void HandleBackCommandL(); |
|
522 |
|
523 /** |
|
524 * Refreshes toolbar. |
|
525 * |
|
526 * @since S60 v5.0 |
|
527 */ |
|
528 void RefreshToolbarL(); |
|
529 |
|
530 /** |
|
531 * Updates app's presentation to show desired suite content. |
|
532 * |
|
533 * @since S60 v5.0 |
|
534 */ |
|
535 void ShowSuiteL(); |
|
536 |
|
537 /** |
|
538 * Creates new container for suite model. |
|
539 * |
|
540 * @since S60 v5.0 |
|
541 * @param aSuiteModel Suite model to load. |
|
542 * @param aContainerToLoad Target pointer for the new container. |
|
543 * @return ETrue if operation is succesful, EFalse otherwise |
|
544 */ |
|
545 TBool CreateNewContainerL( CHnSuiteModel* aSuiteModel, |
|
546 CMmWidgetContainer*& aContainerToLoad ); |
|
547 |
|
548 /** |
|
549 * Forwards the passed event code to Hierarchy Navigator for handling. |
|
550 * |
|
551 * @since S60 v5.0 |
|
552 * @param aEvent Event code. |
|
553 */ |
|
554 void ForwardEventToHNL( TInt aEvent ); |
|
555 |
|
556 /** |
|
557 * Forwards the passed event code to Hierarchy Navigator for handling |
|
558 * regarding the current suite's item referred to by itemid. |
|
559 * |
|
560 * @since S60 v5.0 |
|
561 * @param aEvent Event code. |
|
562 * @param aItemId Item ID. |
|
563 * @param aEventParams Additional parameters. |
|
564 */ |
|
565 void ForwardEventToHNL( TInt aEvent, TInt aItemId, |
|
566 CLiwGenericParamList* aEventParams = NULL ); |
|
567 |
|
568 /** |
|
569 * Sets the Status Pane and CBA to indicate the current open suite. |
|
570 * |
|
571 * @param aReset Indicates if status pane should be reset. |
|
572 * @since S60 v5.0 |
|
573 */ |
|
574 void RefreshUiPanesL( TBool aReset = EFalse ); |
|
575 |
|
576 /** |
|
577 * Checks recieved messages and forwards to HN. |
|
578 * |
|
579 * @since S60 v5.0 |
|
580 * @param aMessage The message. |
|
581 */ |
|
582 void HandleMessageL( const TDesC8& aMessage ); |
|
583 |
|
584 /** |
|
585 * Gets the resource ID of the first free cascade menu pane container. |
|
586 * Resource containers are defined in nsui.rss under |
|
587 * r_main_menu_pane_cascade_* tags. |
|
588 * |
|
589 * @since @since S60 v5.0 |
|
590 * @return The ID of the first available cascade manu pane resource |
|
591 * container, or KErrNotFound if none available. |
|
592 */ |
|
593 TInt GetNextCascadeMenuResourceId(); |
|
594 |
|
595 /** |
|
596 * Handles the update of current shown container. |
|
597 * |
|
598 * @since S60 v5.0 |
|
599 * @param aWidgetContainer The widget container to be shown. |
|
600 */ |
|
601 void HandlePresentationChangeL( CMmWidgetContainer* aWidgetContainer ); |
|
602 |
|
603 /** |
|
604 * Handles the switching of visible containers. |
|
605 * |
|
606 * @since S60 v5.0 |
|
607 * @param aWidgetContainer The widget to switch to. |
|
608 */ |
|
609 void HandleWidgetChangeRefreshL( CMmWidgetContainer* aWidgetContainer ); |
|
610 |
|
611 /** |
|
612 * Handles the refresh if no widget change occured. |
|
613 * Just model on the stack changed. |
|
614 * |
|
615 * @since S60 v5.0 |
|
616 */ |
|
617 void HandleNoWidgetChangeRefreshL(); |
|
618 |
|
619 /** |
|
620 * Shows or hides toolbar depending on context. |
|
621 * |
|
622 * @since S60 v5.0 |
|
623 */ |
|
624 void HandleToolbarVisibilityL(); |
|
625 |
|
626 /** |
|
627 * Updates the toolbar content. |
|
628 * |
|
629 * @since S60 v5.0 |
|
630 */ |
|
631 void UpdateToolbarL(); |
|
632 |
|
633 /** |
|
634 * Sets the Edit Mode. |
|
635 * |
|
636 * @since S60 v5.0 |
|
637 * @param aIsEditMode ETrue if edit mode needs to be turned on. |
|
638 */ |
|
639 void SetEditModeL( TBool aIsEditMode ); |
|
640 |
|
641 /** |
|
642 * Returns TAT/Kastor effect rectangle. |
|
643 * |
|
644 * @since S60 v5.0 |
|
645 * @param aItemModel Model of the selected item. |
|
646 * @param aItemId Item ID. |
|
647 * @return Screen rect of the selected item. |
|
648 */ |
|
649 TRect GetKastorRectL( CHnItemModel* aItemModel, TInt aItemId ); |
|
650 |
|
651 /** |
|
652 * Returns TAT/Kastor effect depends on selected item. |
|
653 * |
|
654 * @since S60 v5.0 |
|
655 * @param aItemModel Model of the selected item. |
|
656 * @return Effect id depends on item type and status. |
|
657 */ |
|
658 TInt GetKastorEffectL( CHnItemModel* aItemModel ); |
|
659 |
|
660 /** |
|
661 * Handles exiting Matrix. |
|
662 * |
|
663 * @since S60 v5.0 |
|
664 * @param aExitType type of exit. |
|
665 */ |
|
666 void ExitMatrix( TExitType aExitType ); |
|
667 |
|
668 /** |
|
669 * Cleans up before exiting Matrix. |
|
670 * Stops edit mode and resets to root. |
|
671 * |
|
672 * @param aExitKey Red key or application key. |
|
673 * @since S60 v5.0 |
|
674 */ |
|
675 void CleanupForExitL( TExitKeyType aExitKey ); |
|
676 |
|
677 /** |
|
678 * Manages bringing homescreen and relevant apps to foreground. |
|
679 * |
|
680 * @since S60 v5.0 |
|
681 * @param aExitType type of exit. |
|
682 */ |
|
683 void ShowHomescreenL( TExitType aExitType ); |
|
684 |
|
685 /** |
|
686 * Places the homescreen window underneath the menu window. |
|
687 * |
|
688 * This method puts the homescreen window just below the matrix menu |
|
689 * window (assuming that matrix menu is running in the foreground) so |
|
690 * that if matrix gets closed and disappears from the screen, then |
|
691 * homescreen will be visible immediately. If it is impossible to do |
|
692 * so (for any reason), this method will call ShowHomescreenL. |
|
693 * |
|
694 * @since S60 v5.0 |
|
695 */ |
|
696 void PrepareHomescreenForMatrixExitL(); |
|
697 |
|
698 /** |
|
699 * Opens the desired application. |
|
700 * Used in exiting Matrix. |
|
701 * |
|
702 * @since S60 v5.0 |
|
703 * @param aUid UID of the app to open. |
|
704 */ |
|
705 void OpenAppL( const TUid aUid ); |
|
706 |
|
707 /** |
|
708 * Loads default root suite |
|
709 * |
|
710 * @since S60 v5.0 |
|
711 */ |
|
712 void InitializeL(); |
|
713 |
|
714 /** |
|
715 * Refreshes Cba according to current context. |
|
716 * |
|
717 * @since S60 v5.0 |
|
718 */ |
|
719 void RefreshCbaL(); |
|
720 |
|
721 /** |
|
722 * MSK text. |
|
723 * |
|
724 * @since S60 v5.0 |
|
725 */ |
|
726 void SetMiddleSoftKeyL(); |
|
727 |
|
728 /** |
|
729 * Starts fullscreen. |
|
730 * @param aKastorEffect Id of the TAT/Kastor effect. |
|
731 * |
|
732 * @since S60 v5.0 |
|
733 */ |
|
734 void StartLayoutSwitchFullScreen( TInt aKastorEffect |
|
735 = AknTransEffect::ELayoutSwitchStart); |
|
736 |
|
737 /** |
|
738 * Ends fullscreen |
|
739 * |
|
740 * @since S60 v5.0 |
|
741 */ |
|
742 void EndFullScreen(); |
|
743 |
|
744 // From MMActionRequest |
|
745 |
|
746 /** |
|
747 * Enables to issue a request to Hn engine. |
|
748 * |
|
749 * @since S60 v5.0 |
|
750 * @param aParam Input Parameters. |
|
751 * @param aOutput Target list for output. |
|
752 */ |
|
753 void HandleRequestL( const CLiwGenericParamList& aParam, |
|
754 CLiwGenericParamList* aOutput = NULL ); |
|
755 |
|
756 /** |
|
757 * Resets map of widget containers. |
|
758 * |
|
759 * @since S60 v5.0 |
|
760 */ |
|
761 void ResetContainerMap(); |
|
762 |
|
763 /** |
|
764 * Resets map of widget container to root. |
|
765 * |
|
766 * @since S60 v5.0 |
|
767 */ |
|
768 void ResetContainerMapToRootL(); |
|
769 |
|
770 /** |
|
771 * Resets view to root. |
|
772 * |
|
773 * @return ETrue if view was not displaying root suite already, EFalse otherwise |
|
774 */ |
|
775 TBool ResetToRootL(); |
|
776 |
|
777 /** |
|
778 * Refreshes icons after skin changing |
|
779 */ |
|
780 void RefreshIconsL(); |
|
781 |
|
782 /** |
|
783 * Forward event to hierarchy navigator. |
|
784 * |
|
785 * @param aOffset Highlight offset. |
|
786 */ |
|
787 void HandleHighlightOffsetL( TInt aOffset ); |
|
788 |
|
789 /** |
|
790 * Replaces ETransitionFromEditMode or EFastTransitionFromEditMode to ENoEditMode |
|
791 */ |
|
792 void ClearTransitionFromEditModeFlag(); |
|
793 /** |
|
794 * Method inherited from CEikAppUi to handle |
|
795 * out of memory problem. |
|
796 * |
|
797 * @param aError KErrNoMemory is handled. |
|
798 * @param aExtErr Not used. |
|
799 * @param aErrorText Not used. |
|
800 * @param aContextText Not used. |
|
801 * @return EErrorNotHandled in order to display proper information. |
|
802 */ |
|
803 TErrorHandlerResponse HandleError( TInt aError, |
|
804 const SExtendedError &aExtErr, |
|
805 TDes &aErrorText, |
|
806 TDes &aContextText ); |
|
807 |
|
808 /** |
|
809 * Update widget data for number of items changed. |
|
810 * |
|
811 * @param aChange type of change. |
|
812 */ |
|
813 void HandleNumberOfItemsChangedL( TItemsChangeType aChange ); |
|
814 |
|
815 /** |
|
816 * Sets the highlighted item in gui objects accordingly to what |
|
817 * is stored in the model. The exact result of calling this |
|
818 * method depends on @c iMakeHightlightedItemFullyVisible |
|
819 * flag. |
|
820 */ |
|
821 void ApplyHighlightFromModelL(); |
|
822 |
|
823 /** |
|
824 * Called when EFocusGained message is received by menu. |
|
825 * Should be called only from HandleWsEvent. |
|
826 */ |
|
827 void HandleFocusGainedL(); |
|
828 |
|
829 /** |
|
830 * Called when application is sent to foreground. |
|
831 * Should be called only from HandleWsEvent. |
|
832 */ |
|
833 void HandleFullOrPartialForegroundGainedL(); |
|
834 |
|
835 /** |
|
836 * Called when application is sent to background. |
|
837 * Should be called only from HandleWsEvent. |
|
838 */ |
|
839 void HandleFullOrPartialForegroundLostL(); |
|
840 |
|
841 /** |
|
842 * Called when EFocusLost message is received by menu. |
|
843 * Should be called only from HandleWsEvent. |
|
844 */ |
|
845 void HandleFocusLostL(); |
|
846 |
|
847 private: // Data |
|
848 |
|
849 /** |
|
850 * Grid's Container Widget. |
|
851 * Own. |
|
852 */ |
|
853 //CMmWidgetContainer* iGridContainer; |
|
854 |
|
855 /** |
|
856 * List's Container Widget. |
|
857 * Own. |
|
858 */ |
|
859 //CMmWidgetContainer* iListboxContainer; |
|
860 |
|
861 /** |
|
862 * Current visible Widget. |
|
863 * Not own. |
|
864 */ |
|
865 CMmWidgetContainer* iCurrentContainer; |
|
866 |
|
867 /** |
|
868 * Hash map containig widget containers, with corresponding |
|
869 * suite id. |
|
870 */ |
|
871 RHashMap< TInt, CMmWidgetContainer* > iContainerMap; |
|
872 |
|
873 /** |
|
874 * Array of container pointers, whose deletion should |
|
875 * be delayed. |
|
876 */ |
|
877 RPointerArray< CMmWidgetContainer > iGarbage; |
|
878 |
|
879 /** |
|
880 * Current suite model |
|
881 * Not own. |
|
882 */ |
|
883 CHnSuiteModel* iCurrentSuiteModel; |
|
884 |
|
885 /** |
|
886 * Hierarchy Navigator |
|
887 * Own. |
|
888 */ |
|
889 CHnInterface* iHNInterface; |
|
890 |
|
891 /** |
|
892 * Hash map for dynamic initialization of cascade menu panes. |
|
893 * Contains item iterator pointers indexed with cascade pane resource IDs. |
|
894 * MHnMdMenuItemIterator items not owned. |
|
895 */ |
|
896 RHashMap<TInt, MHnMenuItemModelIterator*> iCascadeMenuMap; |
|
897 |
|
898 /** |
|
899 * Indicates the edit mode status. |
|
900 */ |
|
901 TEditModeStatus iEditModeStatus; |
|
902 |
|
903 /** |
|
904 * Pointer to application's custom toolbar. |
|
905 * Own. |
|
906 */ |
|
907 CAknToolbar* iToolbar; |
|
908 |
|
909 /** |
|
910 * Index of dragged item. |
|
911 */ |
|
912 TInt iItemDragged; |
|
913 |
|
914 /** |
|
915 * Model ID of the dragged item. |
|
916 */ |
|
917 TInt iIdDragged; |
|
918 |
|
919 /** |
|
920 * Locks select events for highlight based scrolling. |
|
921 */ |
|
922 TBool iKeyClickLocked; |
|
923 |
|
924 /** |
|
925 * Indicates if TAT/Kastor effect is started. |
|
926 */ |
|
927 TBool iIsKastorEffectStarted; |
|
928 |
|
929 /** |
|
930 * Extension manager. |
|
931 * Own. |
|
932 */ |
|
933 CMMExtensionManager* iMmExtManager; |
|
934 |
|
935 /** |
|
936 * Screen state. |
|
937 */ |
|
938 TBool iScreenOn; |
|
939 |
|
940 /** |
|
941 * Skin change needed |
|
942 */ |
|
943 TBool iSkinChangeNeeded; |
|
944 |
|
945 /** |
|
946 * Template library. |
|
947 */ |
|
948 CMmTemplateLibrary* iTemplateLibrary; |
|
949 |
|
950 /** |
|
951 * Skin server session. |
|
952 */ |
|
953 RAknsSrvSession iSkinSrvSession; |
|
954 |
|
955 /** |
|
956 * Skin change in progress |
|
957 */ |
|
958 TBool iSkinChangeInProgress; |
|
959 |
|
960 /** |
|
961 * Widget container that contains only an empty listbox. |
|
962 * It is displayed only when there is no other container that |
|
963 * could be displayed. It is needed to avoid ugly flicker |
|
964 * effects where homescreen becomes visible for a fraction of |
|
965 * second. |
|
966 */ |
|
967 CMmWidgetContainer* iDummyContainer; |
|
968 |
|
969 /** |
|
970 * A template library for iDummyContainer; |
|
971 */ |
|
972 CMmTemplateLibrary* iDummyTemplateLib; |
|
973 |
|
974 /** |
|
975 * Out-of-memory condition handler. |
|
976 */ |
|
977 CMmNoMemory* iOutOfMemoryHandler; |
|
978 |
|
979 /** |
|
980 * This flag is intended for indicating that the highlithted item must |
|
981 * be fully visible. It is only used in two cases: |
|
982 * 1. When an item has been drag-and-dropped into a folder (the item |
|
983 * moved into the folder must be fully visible when the target suite |
|
984 * is displayed). |
|
985 * 2. When turning on edit mode (the item highlighted must be fully |
|
986 * visible once edit mode is turned on). |
|
987 */ |
|
988 TBool iMakeHightlightedItemFullyVisible; |
|
989 |
|
990 /** |
|
991 * An low priority active object used as a helper to detect frequent and |
|
992 * quick appkey pressing. |
|
993 * Owns. |
|
994 */ |
|
995 CMmAppkeyHandler* iAppkeyHandler; |
|
996 |
|
997 /** |
|
998 * ETrue if Matrix menu has focus i.e. it is in foreground and is not eclipsed |
|
999 * by any popup note that is not originating from Matrix menu. |
|
1000 */ |
|
1001 TBool iHasFocus; |
|
1002 |
|
1003 /** |
|
1004 * Own. |
|
1005 * Popup menu displayed after long tap. |
|
1006 */ |
|
1007 CAknStylusPopUpMenu* iPopupMenu; |
|
1008 |
|
1009 }; |
|
1010 |
|
1011 #endif // C_MMAPPUI_H |
|
1012 |
|
1013 // End of File |
|
1014 |
|