34
|
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.21 % << 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 |
/**
|
|
343 |
* From MMmDragAndDropObserver.
|
|
344 |
* Method is invoked on the observer, when the move item event is needed.
|
|
345 |
*
|
|
346 |
* @since S60 v5.0
|
|
347 |
* @param aRecipientId Index of item on which the move event invokes.
|
|
348 |
* @param aEventParameters Event parameters.
|
|
349 |
*/
|
|
350 |
void HandleTriggerMoveItemL( const TInt aRecipientId,
|
|
351 |
CLiwGenericParamList* aEventParameters );
|
|
352 |
|
|
353 |
private:
|
|
354 |
|
|
355 |
/**
|
|
356 |
* Enum defining possible exit types for ExitMenuL method.
|
|
357 |
*
|
|
358 |
* @since S60 v5.0
|
|
359 |
*/
|
|
360 |
enum TExitType
|
|
361 |
{
|
|
362 |
EExitReally,
|
|
363 |
EExitToIdle,
|
|
364 |
EExitToPhone
|
|
365 |
};
|
|
366 |
|
|
367 |
/**
|
|
368 |
* Enum defining possible exit types for ExitMenuL method.
|
|
369 |
*
|
|
370 |
* @since S60 v5.0
|
|
371 |
*/
|
|
372 |
enum TExitKeyType
|
|
373 |
{
|
|
374 |
EExitKeyApplication,
|
|
375 |
EExitKeyRed
|
|
376 |
};
|
|
377 |
|
|
378 |
/**
|
|
379 |
* Defiens edit mode state.
|
|
380 |
*
|
|
381 |
* @since S60 v5.0
|
|
382 |
*/
|
|
383 |
enum TEditModeStatus
|
|
384 |
{
|
|
385 |
ENoEditMode,
|
|
386 |
ETransitionToEditMode,
|
|
387 |
EEditMode,
|
|
388 |
ETransitionFromEditMode,
|
|
389 |
EFastTransitionFromEditMode
|
|
390 |
};
|
|
391 |
|
|
392 |
/**
|
|
393 |
* Indicates if edit mode is on.
|
|
394 |
*
|
|
395 |
* @since S60 v5.0
|
|
396 |
* @return Returns edit mode status.
|
|
397 |
*/
|
|
398 |
TBool IsEditMode();
|
|
399 |
|
|
400 |
/**
|
|
401 |
* Adjusts highlight when entering or leaving edit mode.
|
|
402 |
*
|
|
403 |
* @since S60 v5.0
|
|
404 |
* @param aOriginalHighlight Highlight that would normally be set
|
|
405 |
* @return A modified value of highlight
|
|
406 |
*/
|
|
407 |
TInt AdjustEditModeHighlightL( TInt aOriginalHighlight );
|
|
408 |
|
|
409 |
/**
|
|
410 |
* Manages the container lookup.
|
|
411 |
*
|
|
412 |
* @since S60 v5.0
|
|
413 |
* @return Pointer to the container to be loaded, of NULL
|
|
414 |
* if a new container should be created.
|
|
415 |
*/
|
|
416 |
CMmWidgetContainer* GetAppropriateContainerToLoadL();
|
|
417 |
|
|
418 |
/**
|
|
419 |
* Submits an asynchronous service request to show user a message
|
|
420 |
* when Matrix Menu is out of memory.
|
|
421 |
*
|
|
422 |
* @since S60 v5.0
|
|
423 |
*/
|
|
424 |
void HandleOutOfMemoryL();
|
|
425 |
|
|
426 |
/**
|
|
427 |
* Resets MM App UI to the initial state (most of the fields).
|
|
428 |
*
|
|
429 |
* @since S60 v5.0
|
|
430 |
*/
|
|
431 |
void ResetToInitialStateL();
|
|
432 |
|
|
433 |
/**
|
|
434 |
* Refreshes menu pane if needed
|
|
435 |
*/
|
|
436 |
void HideMenuPaneIfVisibleL();
|
|
437 |
|
|
438 |
// from base class CEikAppUi
|
|
439 |
|
|
440 |
/**
|
|
441 |
* From CEikAppUi.
|
|
442 |
* Takes care of command handling.
|
|
443 |
*
|
|
444 |
* @since S60 v5.0
|
|
445 |
* @param aCommand Command to be handled.
|
|
446 |
*/
|
|
447 |
void HandleCommandL( TInt aCommand );
|
|
448 |
|
|
449 |
/**
|
|
450 |
* From CEikAppUi.
|
|
451 |
* Handles Window Server events.
|
|
452 |
*
|
|
453 |
* @since S60 v5.0
|
|
454 |
* @param aEvent Event to be handled.
|
|
455 |
* @param aDestination Destination control.
|
|
456 |
*/
|
|
457 |
void HandleWsEventL( const TWsEvent& aEvent, CCoeControl* aDestination );
|
|
458 |
|
|
459 |
/**
|
|
460 |
* Indicates if root (main) view is displayed.
|
|
461 |
*
|
|
462 |
* @since S60 v5.0
|
|
463 |
* @return ETrue if root displayed, EFalse otherwise.
|
|
464 |
*/
|
|
465 |
TBool IsRootdisplayedL();
|
|
466 |
|
|
467 |
/**
|
|
468 |
* Handles pen down events for an item.
|
|
469 |
*
|
|
470 |
* @since S60 v5.0
|
|
471 |
* @param aIndex Item index.
|
|
472 |
*/
|
|
473 |
void HandleHighlightItemPenDownL( TInt aIndex );
|
|
474 |
|
|
475 |
/**
|
|
476 |
* Handles single click event on widget item.
|
|
477 |
*
|
|
478 |
* @since S60 v5.0
|
|
479 |
* @param aIndex Clicked item index.
|
|
480 |
*/
|
|
481 |
void HandleHighlightItemSingleClickedL( TInt aIndex );
|
|
482 |
|
|
483 |
/**
|
|
484 |
* Handles drag event.
|
|
485 |
*
|
|
486 |
* @since S60 v5.0
|
|
487 |
*/
|
|
488 |
void HandleEventDraggingActionedL();
|
|
489 |
|
|
490 |
/**
|
|
491 |
* Handles click (select) events for an item.
|
|
492 |
*
|
|
493 |
* @since S60 v5.0
|
|
494 |
* @param aIndex Item index.
|
|
495 |
*/
|
|
496 |
void HandleHighlightItemDoubleClickedL( TInt aIndex );
|
|
497 |
|
|
498 |
/**
|
|
499 |
* Handles suite model initialized event.
|
|
500 |
*
|
|
501 |
* @param aModel Suite model that has been initialized.
|
|
502 |
* @since S60 v5.0
|
|
503 |
*/
|
|
504 |
void HandleSuiteModelInitializedL( CHnSuiteModel* aModel );
|
|
505 |
|
|
506 |
/**
|
|
507 |
* Handles suite update events.
|
|
508 |
*
|
|
509 |
* @since S60 v5.0
|
|
510 |
*/
|
|
511 |
void UpdateL();
|
|
512 |
|
|
513 |
/**
|
|
514 |
* Handles suite remove events.
|
|
515 |
*
|
|
516 |
* @since S60 v5.0
|
|
517 |
*/
|
|
518 |
void RemoveL();
|
|
519 |
|
|
520 |
/**
|
|
521 |
* Handles suite insert events.
|
|
522 |
*
|
|
523 |
* @since S60 v5.0
|
|
524 |
*/
|
|
525 |
void InsertL();
|
|
526 |
|
|
527 |
/**
|
|
528 |
* Handles the "Back" softkey event.
|
|
529 |
*
|
|
530 |
* @since S60 v5.0
|
|
531 |
*/
|
|
532 |
void HandleBackCommandL();
|
|
533 |
|
|
534 |
/**
|
|
535 |
* Refreshes toolbar.
|
|
536 |
*
|
|
537 |
* @since S60 v5.0
|
|
538 |
*/
|
|
539 |
void RefreshToolbarL();
|
|
540 |
|
|
541 |
/**
|
|
542 |
* Updates app's presentation to show desired suite content.
|
|
543 |
*
|
|
544 |
* @since S60 v5.0
|
|
545 |
*/
|
|
546 |
void ShowSuiteL();
|
|
547 |
|
|
548 |
/**
|
|
549 |
* Creates new container for suite model.
|
|
550 |
*
|
|
551 |
* @since S60 v5.0
|
|
552 |
* @param aSuiteModel Suite model to load.
|
|
553 |
* @param aContainerToLoad Target pointer for the new container.
|
|
554 |
* @return ETrue if operation is succesful, EFalse otherwise
|
|
555 |
*/
|
|
556 |
TBool CreateNewContainerL( CHnSuiteModel* aSuiteModel,
|
|
557 |
CMmWidgetContainer*& aContainerToLoad );
|
|
558 |
|
|
559 |
/**
|
|
560 |
* Forwards the passed event code to Hierarchy Navigator for handling.
|
|
561 |
*
|
|
562 |
* @since S60 v5.0
|
|
563 |
* @param aEvent Event code.
|
|
564 |
*/
|
|
565 |
void ForwardEventToHNL( TInt aEvent );
|
|
566 |
|
|
567 |
/**
|
|
568 |
* Forwards the passed event code to Hierarchy Navigator for handling
|
|
569 |
* regarding the current suite's item referred to by itemid.
|
|
570 |
*
|
|
571 |
* @since S60 v5.0
|
|
572 |
* @param aEvent Event code.
|
|
573 |
* @param aItemId Item ID.
|
|
574 |
* @param aEventParams Additional parameters.
|
|
575 |
*/
|
|
576 |
void ForwardEventToHNL( TInt aEvent, TInt aItemId,
|
|
577 |
CLiwGenericParamList* aEventParams = NULL );
|
|
578 |
|
|
579 |
/**
|
|
580 |
* Sets the Status Pane and CBA to indicate the current open suite.
|
|
581 |
*
|
|
582 |
* @param aReset Indicates if status pane should be reset.
|
|
583 |
* @since S60 v5.0
|
|
584 |
*/
|
|
585 |
void RefreshUiPanesL( TBool aReset = EFalse );
|
|
586 |
|
|
587 |
/**
|
|
588 |
* Checks recieved messages and forwards to HN.
|
|
589 |
*
|
|
590 |
* @since S60 v5.0
|
|
591 |
* @param aMessage The message.
|
|
592 |
*/
|
|
593 |
void HandleMessageL( const TDesC8& aMessage );
|
|
594 |
|
|
595 |
/**
|
|
596 |
* Gets the resource ID of the first free cascade menu pane container.
|
|
597 |
* Resource containers are defined in nsui.rss under
|
|
598 |
* r_main_menu_pane_cascade_* tags.
|
|
599 |
*
|
|
600 |
* @since @since S60 v5.0
|
|
601 |
* @return The ID of the first available cascade manu pane resource
|
|
602 |
* container, or KErrNotFound if none available.
|
|
603 |
*/
|
|
604 |
TInt GetNextCascadeMenuResourceId();
|
|
605 |
|
|
606 |
/**
|
|
607 |
* Handles the update of current shown container.
|
|
608 |
*
|
|
609 |
* @since S60 v5.0
|
|
610 |
* @param aWidgetContainer The widget container to be shown.
|
|
611 |
*/
|
|
612 |
void HandlePresentationChangeL( CMmWidgetContainer* aWidgetContainer );
|
|
613 |
|
|
614 |
/**
|
|
615 |
* Handles the switching of visible containers.
|
|
616 |
*
|
|
617 |
* @since S60 v5.0
|
|
618 |
* @param aWidgetContainer The widget to switch to.
|
|
619 |
*/
|
|
620 |
void HandleWidgetChangeRefreshL( CMmWidgetContainer* aWidgetContainer );
|
|
621 |
|
|
622 |
/**
|
|
623 |
* Handles the refresh if no widget change occured.
|
|
624 |
* Just model on the stack changed.
|
|
625 |
*
|
|
626 |
* @since S60 v5.0
|
|
627 |
*/
|
|
628 |
void HandleNoWidgetChangeRefreshL();
|
|
629 |
|
|
630 |
/**
|
|
631 |
* Shows or hides toolbar depending on context.
|
|
632 |
*
|
|
633 |
* @since S60 v5.0
|
|
634 |
*/
|
|
635 |
void HandleToolbarVisibilityL();
|
|
636 |
|
|
637 |
/**
|
|
638 |
* Updates the toolbar content.
|
|
639 |
*
|
|
640 |
* @since S60 v5.0
|
|
641 |
*/
|
|
642 |
void UpdateToolbarL();
|
|
643 |
|
|
644 |
/**
|
|
645 |
* Sets the Edit Mode.
|
|
646 |
*
|
|
647 |
* @since S60 v5.0
|
|
648 |
* @param aIsEditMode ETrue if edit mode needs to be turned on.
|
|
649 |
*/
|
|
650 |
void SetEditModeL( TBool aIsEditMode );
|
|
651 |
|
|
652 |
/**
|
|
653 |
* Returns TAT/Kastor effect rectangle.
|
|
654 |
*
|
|
655 |
* @since S60 v5.0
|
|
656 |
* @param aItemModel Model of the selected item.
|
|
657 |
* @param aItemId Item ID.
|
|
658 |
* @return Screen rect of the selected item.
|
|
659 |
*/
|
|
660 |
TRect GetKastorRectL( CHnItemModel* aItemModel, TInt aItemId );
|
|
661 |
|
|
662 |
/**
|
|
663 |
* Returns TAT/Kastor effect depends on selected item.
|
|
664 |
*
|
|
665 |
* @since S60 v5.0
|
|
666 |
* @param aItemModel Model of the selected item.
|
|
667 |
* @return Effect id depends on item type and status.
|
|
668 |
*/
|
|
669 |
TInt GetKastorEffectL( CHnItemModel* aItemModel );
|
|
670 |
|
|
671 |
/**
|
|
672 |
* Handles exiting Matrix.
|
|
673 |
*
|
|
674 |
* @since S60 v5.0
|
|
675 |
* @param aExitType type of exit.
|
|
676 |
*/
|
|
677 |
void ExitMatrix( TExitType aExitType );
|
|
678 |
|
|
679 |
/**
|
|
680 |
* Cleans up before exiting Matrix.
|
|
681 |
* Stops edit mode and resets to root.
|
|
682 |
*
|
|
683 |
* @param aExitKey Red key or application key.
|
|
684 |
* @since S60 v5.0
|
|
685 |
*/
|
|
686 |
void CleanupForExitL( TExitKeyType aExitKey );
|
|
687 |
|
|
688 |
/**
|
|
689 |
* Manages bringing homescreen and relevant apps to foreground.
|
|
690 |
*
|
|
691 |
* @since S60 v5.0
|
|
692 |
* @param aExitType type of exit.
|
|
693 |
*/
|
|
694 |
void ShowHomescreenL( TExitType aExitType );
|
|
695 |
|
|
696 |
/**
|
|
697 |
* Places the homescreen window underneath the menu window.
|
|
698 |
*
|
|
699 |
* This method puts the homescreen window just below the matrix menu
|
|
700 |
* window (assuming that matrix menu is running in the foreground) so
|
|
701 |
* that if matrix gets closed and disappears from the screen, then
|
|
702 |
* homescreen will be visible immediately. If it is impossible to do
|
|
703 |
* so (for any reason), this method will call ShowHomescreenL.
|
|
704 |
*
|
|
705 |
* @since S60 v5.0
|
|
706 |
*/
|
|
707 |
void PrepareHomescreenForMatrixExitL();
|
|
708 |
|
|
709 |
/**
|
|
710 |
* Opens the desired application.
|
|
711 |
* Used in exiting Matrix.
|
|
712 |
*
|
|
713 |
* @since S60 v5.0
|
|
714 |
* @param aUid UID of the app to open.
|
|
715 |
*/
|
|
716 |
void OpenAppL( const TUid aUid );
|
|
717 |
|
|
718 |
/**
|
|
719 |
* Loads default root suite
|
|
720 |
*
|
|
721 |
* @since S60 v5.0
|
|
722 |
*/
|
|
723 |
void InitializeL();
|
|
724 |
|
|
725 |
/**
|
|
726 |
* Refreshes Cba according to current context.
|
|
727 |
*
|
|
728 |
* @since S60 v5.0
|
|
729 |
*/
|
|
730 |
void RefreshCbaL();
|
|
731 |
|
|
732 |
/**
|
|
733 |
* MSK text.
|
|
734 |
*
|
|
735 |
* @since S60 v5.0
|
|
736 |
*/
|
|
737 |
void SetMiddleSoftKeyL();
|
|
738 |
|
|
739 |
/**
|
|
740 |
* Starts fullscreen.
|
|
741 |
* @param aKastorEffect Id of the TAT/Kastor effect.
|
|
742 |
*
|
|
743 |
* @since S60 v5.0
|
|
744 |
*/
|
|
745 |
void StartLayoutSwitchFullScreen( TInt aKastorEffect
|
|
746 |
= AknTransEffect::ELayoutSwitchStart);
|
|
747 |
|
|
748 |
/**
|
|
749 |
* Ends fullscreen
|
|
750 |
*
|
|
751 |
* @since S60 v5.0
|
|
752 |
*/
|
|
753 |
void EndFullScreen();
|
|
754 |
|
|
755 |
// From MMActionRequest
|
|
756 |
|
|
757 |
/**
|
|
758 |
* Enables to issue a request to Hn engine.
|
|
759 |
*
|
|
760 |
* @since S60 v5.0
|
|
761 |
* @param aParam Input Parameters.
|
|
762 |
* @param aOutput Target list for output.
|
|
763 |
*/
|
|
764 |
void HandleRequestL( const CLiwGenericParamList& aParam,
|
|
765 |
CLiwGenericParamList* aOutput = NULL );
|
|
766 |
|
|
767 |
/**
|
|
768 |
* Resets map of widget containers.
|
|
769 |
*
|
|
770 |
* @since S60 v5.0
|
|
771 |
*/
|
|
772 |
void ResetContainerMap();
|
|
773 |
|
|
774 |
/**
|
|
775 |
* Resets map of widget container to root.
|
|
776 |
*
|
|
777 |
* @since S60 v5.0
|
|
778 |
*/
|
|
779 |
void ResetContainerMapToRootL();
|
|
780 |
|
|
781 |
/**
|
|
782 |
* Resets view to root.
|
|
783 |
*
|
|
784 |
* @return ETrue if view was not displaying root suite already, EFalse otherwise
|
|
785 |
*/
|
|
786 |
TBool ResetToRootL();
|
|
787 |
|
|
788 |
/**
|
|
789 |
* Refreshes icons after skin changing
|
|
790 |
*/
|
|
791 |
void RefreshIconsL();
|
|
792 |
|
|
793 |
/**
|
|
794 |
* Forward event to hierarchy navigator.
|
|
795 |
*
|
|
796 |
* @param aOffset Highlight offset.
|
|
797 |
*/
|
|
798 |
void HandleHighlightOffsetL( TInt aOffset );
|
|
799 |
|
|
800 |
/**
|
|
801 |
* Replaces ETransitionFromEditMode or EFastTransitionFromEditMode to ENoEditMode
|
|
802 |
*/
|
|
803 |
void ClearTransitionFromEditModeFlag();
|
|
804 |
/**
|
|
805 |
* Method inherited from CEikAppUi to handle
|
|
806 |
* out of memory problem.
|
|
807 |
*
|
|
808 |
* @param aError KErrNoMemory is handled.
|
|
809 |
* @param aExtErr Not used.
|
|
810 |
* @param aErrorText Not used.
|
|
811 |
* @param aContextText Not used.
|
|
812 |
* @return EErrorNotHandled in order to display proper information.
|
|
813 |
*/
|
|
814 |
TErrorHandlerResponse HandleError( TInt aError,
|
|
815 |
const SExtendedError &aExtErr,
|
|
816 |
TDes &aErrorText,
|
|
817 |
TDes &aContextText );
|
|
818 |
|
|
819 |
/**
|
|
820 |
* Update widget data for number of items changed.
|
|
821 |
*
|
|
822 |
* @param aChange type of change.
|
|
823 |
*/
|
|
824 |
void HandleNumberOfItemsChangedL( TItemsChangeType aChange );
|
|
825 |
|
|
826 |
/**
|
|
827 |
* Sets the highlighted item in gui objects accordingly to what
|
|
828 |
* is stored in the model. The exact result of calling this
|
|
829 |
* method depends on @c iMakeHightlightedItemFullyVisible
|
|
830 |
* flag.
|
|
831 |
*/
|
|
832 |
void ApplyHighlightFromModelL();
|
|
833 |
|
|
834 |
/**
|
|
835 |
* Called when EFocusGained message is received by menu.
|
|
836 |
* Should be called only from HandleWsEvent.
|
|
837 |
*/
|
|
838 |
void HandleFocusGainedL();
|
|
839 |
|
|
840 |
/**
|
|
841 |
* Called when application is sent to foreground.
|
|
842 |
* Should be called only from HandleWsEvent.
|
|
843 |
*/
|
|
844 |
void HandleFullOrPartialForegroundGainedL();
|
|
845 |
|
|
846 |
/**
|
|
847 |
* Called when application is sent to background.
|
|
848 |
* Should be called only from HandleWsEvent.
|
|
849 |
*/
|
|
850 |
void HandleFullOrPartialForegroundLostL();
|
|
851 |
|
|
852 |
/**
|
|
853 |
* Called when EFocusLost message is received by menu.
|
|
854 |
* Should be called only from HandleWsEvent.
|
|
855 |
*/
|
|
856 |
void HandleFocusLostL();
|
|
857 |
|
|
858 |
private: // Data
|
|
859 |
|
|
860 |
/**
|
|
861 |
* Grid's Container Widget.
|
|
862 |
* Own.
|
|
863 |
*/
|
|
864 |
//CMmWidgetContainer* iGridContainer;
|
|
865 |
|
|
866 |
/**
|
|
867 |
* List's Container Widget.
|
|
868 |
* Own.
|
|
869 |
*/
|
|
870 |
//CMmWidgetContainer* iListboxContainer;
|
|
871 |
|
|
872 |
/**
|
|
873 |
* Current visible Widget.
|
|
874 |
* Not own.
|
|
875 |
*/
|
|
876 |
CMmWidgetContainer* iCurrentContainer;
|
|
877 |
|
|
878 |
/**
|
|
879 |
* Hash map containig widget containers, with corresponding
|
|
880 |
* suite id.
|
|
881 |
*/
|
|
882 |
RHashMap< TInt, CMmWidgetContainer* > iContainerMap;
|
|
883 |
|
|
884 |
/**
|
|
885 |
* Array of container pointers, whose deletion should
|
|
886 |
* be delayed.
|
|
887 |
*/
|
|
888 |
RPointerArray< CMmWidgetContainer > iGarbage;
|
|
889 |
|
|
890 |
/**
|
|
891 |
* Current suite model
|
|
892 |
* Not own.
|
|
893 |
*/
|
|
894 |
CHnSuiteModel* iCurrentSuiteModel;
|
|
895 |
|
|
896 |
/**
|
|
897 |
* Hierarchy Navigator
|
|
898 |
* Own.
|
|
899 |
*/
|
|
900 |
CHnInterface* iHNInterface;
|
|
901 |
|
|
902 |
/**
|
|
903 |
* Hash map for dynamic initialization of cascade menu panes.
|
|
904 |
* Contains item iterator pointers indexed with cascade pane resource IDs.
|
|
905 |
* MHnMdMenuItemIterator items not owned.
|
|
906 |
*/
|
|
907 |
RHashMap<TInt, MHnMenuItemModelIterator*> iCascadeMenuMap;
|
|
908 |
|
|
909 |
/**
|
|
910 |
* Indicates the edit mode status.
|
|
911 |
*/
|
|
912 |
TEditModeStatus iEditModeStatus;
|
|
913 |
|
|
914 |
/**
|
|
915 |
* Pointer to application's custom toolbar.
|
|
916 |
* Own.
|
|
917 |
*/
|
|
918 |
CAknToolbar* iToolbar;
|
|
919 |
|
|
920 |
/**
|
|
921 |
* Index of dragged item.
|
|
922 |
*/
|
|
923 |
TInt iItemDragged;
|
|
924 |
|
|
925 |
/**
|
|
926 |
* Model ID of the dragged item.
|
|
927 |
*/
|
|
928 |
TInt iIdDragged;
|
|
929 |
|
|
930 |
/**
|
|
931 |
* Locks select events for highlight based scrolling.
|
|
932 |
*/
|
|
933 |
TBool iKeyClickLocked;
|
|
934 |
|
|
935 |
/**
|
|
936 |
* Indicates if TAT/Kastor effect is started.
|
|
937 |
*/
|
|
938 |
TBool iIsKastorEffectStarted;
|
|
939 |
|
|
940 |
/**
|
|
941 |
* Extension manager.
|
|
942 |
* Own.
|
|
943 |
*/
|
|
944 |
CMMExtensionManager* iMmExtManager;
|
|
945 |
|
|
946 |
/**
|
|
947 |
* Screen state.
|
|
948 |
*/
|
|
949 |
TBool iScreenOn;
|
|
950 |
|
|
951 |
/**
|
|
952 |
* Skin change needed
|
|
953 |
*/
|
|
954 |
TBool iSkinChangeNeeded;
|
|
955 |
|
|
956 |
/**
|
|
957 |
* Template library.
|
|
958 |
*/
|
|
959 |
CMmTemplateLibrary* iTemplateLibrary;
|
|
960 |
|
|
961 |
/**
|
|
962 |
* Skin server session.
|
|
963 |
*/
|
|
964 |
RAknsSrvSession iSkinSrvSession;
|
|
965 |
|
|
966 |
/**
|
|
967 |
* Skin change in progress
|
|
968 |
*/
|
|
969 |
TBool iSkinChangeInProgress;
|
|
970 |
|
|
971 |
/**
|
|
972 |
* Widget container that contains only an empty listbox.
|
|
973 |
* It is displayed only when there is no other container that
|
|
974 |
* could be displayed. It is needed to avoid ugly flicker
|
|
975 |
* effects where homescreen becomes visible for a fraction of
|
|
976 |
* second.
|
|
977 |
*/
|
|
978 |
CMmWidgetContainer* iDummyContainer;
|
|
979 |
|
|
980 |
/**
|
|
981 |
* A template library for iDummyContainer;
|
|
982 |
*/
|
|
983 |
CMmTemplateLibrary* iDummyTemplateLib;
|
|
984 |
|
|
985 |
/**
|
|
986 |
* Out-of-memory condition handler.
|
|
987 |
*/
|
|
988 |
CMmNoMemory* iOutOfMemoryHandler;
|
|
989 |
|
|
990 |
/**
|
|
991 |
* This flag is intended for indicating that the highlithted item must
|
|
992 |
* be fully visible. It is only used in two cases:
|
|
993 |
* 1. When an item has been drag-and-dropped into a folder (the item
|
|
994 |
* moved into the folder must be fully visible when the target suite
|
|
995 |
* is displayed).
|
|
996 |
* 2. When turning on edit mode (the item highlighted must be fully
|
|
997 |
* visible once edit mode is turned on).
|
|
998 |
*/
|
|
999 |
TBool iMakeHightlightedItemFullyVisible;
|
|
1000 |
|
|
1001 |
/**
|
|
1002 |
* An low priority active object used as a helper to detect frequent and
|
|
1003 |
* quick appkey pressing.
|
|
1004 |
* Owns.
|
|
1005 |
*/
|
|
1006 |
CMmAppkeyHandler* iAppkeyHandler;
|
|
1007 |
|
|
1008 |
/**
|
|
1009 |
* ETrue if Matrix menu has focus i.e. it is in foreground and is not eclipsed
|
|
1010 |
* by any popup note that is not originating from Matrix menu.
|
|
1011 |
*/
|
|
1012 |
TBool iHasFocus;
|
|
1013 |
|
|
1014 |
/**
|
|
1015 |
* ETrue if Matrix is hidden from TS which is used on startup.
|
|
1016 |
*/
|
|
1017 |
TBool isHiddenFromFS;
|
|
1018 |
|
|
1019 |
/**
|
|
1020 |
* Own.
|
|
1021 |
* Popup menu displayed after long tap.
|
|
1022 |
*/
|
|
1023 |
CAknStylusPopUpMenu* iPopupMenu;
|
|
1024 |
|
|
1025 |
};
|
|
1026 |
|
|
1027 |
#endif // C_MMAPPUI_H
|
|
1028 |
|
|
1029 |
// End of File
|
|
1030 |
|