|
1 /* |
|
2 * Copyright (c) 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: |
|
15 * Declares main container view for Widget Manager application. |
|
16 * |
|
17 */ |
|
18 |
|
19 #ifndef WMMAINCONTAINERVIEW_H |
|
20 #define WMMAINCONTAINERVIEW_H |
|
21 |
|
22 #include <aknview.h> |
|
23 |
|
24 class CWmMainContainer; |
|
25 class CWmSpBgCleaner; |
|
26 class CWmPlugin; |
|
27 |
|
28 /** |
|
29 * Avkon view class for WmMainContainerView. It is register with the view server |
|
30 * by the AppUi. It owns the container control. |
|
31 * @class CWmMainContainerView WmMainContainerView.h |
|
32 */ |
|
33 NONSHARABLE_CLASS( CWmMainContainerView ) : public CAknView |
|
34 { |
|
35 |
|
36 public: // constructors and destructor |
|
37 /** |
|
38 * Two-phased constructor. |
|
39 * |
|
40 * @param aWmPlugin wm plugin |
|
41 */ |
|
42 static CWmMainContainerView* NewL( CWmPlugin& aWmPlugin ); |
|
43 |
|
44 /** |
|
45 * Two-phased constructor. |
|
46 * |
|
47 * @param aWmPlugin wm plugin |
|
48 */ |
|
49 static CWmMainContainerView* NewLC( CWmPlugin& aWmPlugin ); |
|
50 |
|
51 /** Destructor */ |
|
52 virtual ~CWmMainContainerView(); |
|
53 |
|
54 |
|
55 public: // from base class CAknView |
|
56 /** |
|
57 * Returns views id, intended for overriding by sub classes. |
|
58 * |
|
59 * @see CAknView::Id |
|
60 */ |
|
61 TUid Id() const; |
|
62 |
|
63 /** |
|
64 * Command handling function intended for overriding by sub classes. |
|
65 * |
|
66 * @see CAknView::HandleCommandL |
|
67 */ |
|
68 void HandleCommandL( TInt aCommand ); |
|
69 |
|
70 public: |
|
71 /** |
|
72 * Creates CWmMainContainer |
|
73 */ |
|
74 CWmMainContainer* CreateContainerL(); |
|
75 |
|
76 /** |
|
77 * View deactivation function intended for overriding by sub classes. |
|
78 * |
|
79 * @see CAknView::DoActivateL |
|
80 */ |
|
81 void DoDeactivate(); |
|
82 |
|
83 public: // from MeikMenuObserver |
|
84 |
|
85 /** |
|
86 * Foreground event handling function. |
|
87 * @param aForeground Indicates the required focus state of the control. |
|
88 */ |
|
89 void HandleForegroundEventL( TBool aForeground ); |
|
90 |
|
91 private: |
|
92 CWmMainContainerView( CWmPlugin& aWmPlugin ); |
|
93 void ConstructL(); |
|
94 |
|
95 protected: // from base class CAknView |
|
96 /** |
|
97 * Avkon view architecture system. |
|
98 * |
|
99 * @see CAknView::DoActivateL |
|
100 */ |
|
101 void DoActivateL( |
|
102 const TVwsViewId& aPrevViewId, |
|
103 TUid aCustomMessageId, |
|
104 const TDesC8& aCustomMessage ); |
|
105 |
|
106 protected: // From MEikMenuObserver |
|
107 /* |
|
108 * Menu observer interface. |
|
109 * |
|
110 * @see MEikMenuObserver::DynInitMenuPaneL |
|
111 */ |
|
112 void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane); |
|
113 |
|
114 private: |
|
115 |
|
116 /** menu commands */ |
|
117 TBool HandleOpenMenuItemSelectedL(); |
|
118 TBool HandleAddMenuItemSelectedL(); |
|
119 TBool HandleLaunchMenuItemSelectedL(); |
|
120 TBool HandleSearchMenuItemSelectedL(); |
|
121 TBool HandleSortAlphaMenuItemSelectedL(); |
|
122 TBool HandleUninstallMenuItemSelectedL(); |
|
123 TBool HandleHelpMenuItemSelectedL(); |
|
124 TBool HandleDetailsMenuItemSelectedL(); |
|
125 TBool HandleDeactivateFindPaneL(); |
|
126 /** setup title in status pane */ |
|
127 void SetTitleL(); |
|
128 |
|
129 private: |
|
130 /** |
|
131 * the container |
|
132 */ |
|
133 CWmMainContainer* iWmMainContainer; |
|
134 |
|
135 /** |
|
136 * Statuspane background cleaner |
|
137 */ |
|
138 CWmSpBgCleaner* iWmSpBgCleaner; |
|
139 |
|
140 /** |
|
141 * the plugin root (not owned) |
|
142 */ |
|
143 CWmPlugin& iWmPlugin; |
|
144 |
|
145 }; |
|
146 |
|
147 #endif // WMMAINCONTAINERVIEW_H |