|
1 /* |
|
2 * Copyright (c) 2008-2009 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: Grid view implementation |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef C_GLXGRIDLVIEWIMP_H |
|
19 #define C_GLXGRIDLVIEWIMP_H |
|
20 |
|
21 // INCLUDES |
|
22 #include <eikspmod.h> |
|
23 #include <eikclb.h> |
|
24 |
|
25 #include <glxuistd.h> |
|
26 #include <mglxvisuallistobserver.h> // for NGlxListDefs::TFocusChangeType |
|
27 |
|
28 // INCLUDES |
|
29 #include "glxgridview.h" |
|
30 #include "glxgridviewcontainer.h" |
|
31 |
|
32 // FORWARD DECLARATIONS |
|
33 class CGlxActiveMediaListRegistry; |
|
34 class MGlxMediaListFactory; |
|
35 class CGlxDefaultAttributeContext; |
|
36 |
|
37 // CLASS DECLARATION |
|
38 /** |
|
39 * MPX collection view. |
|
40 * |
|
41 * @lib glxgridview.lib |
|
42 * @since S60 v3.0 |
|
43 */ |
|
44 NONSHARABLE_CLASS(CGlxGridViewImp) : public CGlxGridView |
|
45 ,public MGlxGridEventObserver |
|
46 { |
|
47 public: |
|
48 /** |
|
49 * Two-phased constructor. |
|
50 * |
|
51 * @since 3.0 |
|
52 * @return Pointer to newly created object. |
|
53 */ |
|
54 static CGlxGridViewImp* NewL(MGlxMediaListFactory* aMediaListFactory, |
|
55 const TGridViewResourceIds& aResourceIds, |
|
56 TInt aViewUID, |
|
57 const TDesC& aTitle); |
|
58 |
|
59 /** |
|
60 * Two-phased constructor. |
|
61 * |
|
62 * @since 3.0 |
|
63 * @return Pointer to newly created object. |
|
64 */ |
|
65 static CGlxGridViewImp* NewLC(MGlxMediaListFactory* aMediaListFactory, |
|
66 const TGridViewResourceIds& aResourceIds, |
|
67 TInt aViewUID, |
|
68 const TDesC& aTitle); |
|
69 |
|
70 /** |
|
71 * Destructor. |
|
72 */ |
|
73 virtual ~CGlxGridViewImp(); |
|
74 |
|
75 public: // From CGlxViewBase |
|
76 TBool HandleViewCommandL(TInt aCommand); |
|
77 |
|
78 public: // From CGlxMediaListViewBase |
|
79 void DoMLViewActivateL(const TVwsViewId& aPrevViewId, TUid aCustomMessageId, |
|
80 const TDesC8& aCustomMessage); |
|
81 |
|
82 void DoMLViewDeactivate(); |
|
83 |
|
84 public: // from MGlxGridEventObserver |
|
85 void HandleGridEventsL(TInt aCmd); |
|
86 void HandleLatchToolbar(); |
|
87 |
|
88 private:// from base class CAknView |
|
89 TUid Id() const; |
|
90 |
|
91 void HandleForegroundEventL(TBool aForeground); |
|
92 |
|
93 private: |
|
94 /** |
|
95 * C++ default constructor. |
|
96 */ |
|
97 CGlxGridViewImp(const TGridViewResourceIds& aResourceIds, TInt aViewUID); |
|
98 |
|
99 /** |
|
100 * By default Symbian 2nd phase constructor is private. |
|
101 */ |
|
102 void ConstructL(MGlxMediaListFactory* aMediaListFactory, |
|
103 const TDesC& aTitle); |
|
104 |
|
105 void DestroyGridWidget(); |
|
106 |
|
107 private:// Data |
|
108 |
|
109 TGridViewResourceIds iResourceIds; |
|
110 /// UID of the plugin creating the Grid view |
|
111 TInt iViewUID; |
|
112 |
|
113 /// Active media list registry stores the pointer to the active media list |
|
114 /// Allows UPnP to know when list has changed |
|
115 CGlxActiveMediaListRegistry* iActiveMediaListRegistry; |
|
116 |
|
117 /// Previous navigation |
|
118 NGlxListDefs::TFocusChangeType iPreviousFocusChangeType; |
|
119 |
|
120 // save title text |
|
121 HBufC* iTitletext; |
|
122 |
|
123 //Create control |
|
124 CGlxGridViewContainer* iGlxGridViewContainer; |
|
125 }; |
|
126 |
|
127 #endif // C_GLXGRIDLVIEWIMP_H |
|
128 |
|
129 // End of File |