|
1 /* |
|
2 * Copyright (c) 2002 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 the License "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: Declares view for GSVideoPlugin application.* |
|
15 */ |
|
16 |
|
17 |
|
18 // Version : %version: 3 % |
|
19 |
|
20 |
|
21 |
|
22 #ifndef GSMEDIAPLAYERSTREAMINGVIEW_H |
|
23 #define GSMEDIAPLAYERSTREAMINGVIEW_H |
|
24 |
|
25 // INCLUDES |
|
26 #include <aknview.h> |
|
27 #include <eiklbo.h> |
|
28 #include <gstabbedview.h> |
|
29 |
|
30 // CLASS DECLARATION |
|
31 class CMPSettingsModelForROP; |
|
32 class CMPSettingsBaseContainer; |
|
33 class MGSTabbedView; |
|
34 class CGSTabHelper; |
|
35 |
|
36 /** |
|
37 * CGSMediaPlayerStreamingView class. |
|
38 * |
|
39 * @since 3.1 |
|
40 */ |
|
41 class CGSMediaPlayerStreamingView : public CAknView, |
|
42 public MEikListBoxObserver, |
|
43 public MGSTabbedView |
|
44 { |
|
45 public: // Constructors and destructor |
|
46 |
|
47 enum KGSViewPanicCodes |
|
48 { |
|
49 EGSViewPanicNullPtr = 1 |
|
50 }; |
|
51 |
|
52 /** |
|
53 * Two-phased constructor. |
|
54 */ |
|
55 static CGSMediaPlayerStreamingView* NewLC(CMPSettingsModelForROP* aModel, CArrayPtrFlat<MGSTabbedView>* aTabViewArray ); |
|
56 |
|
57 /** |
|
58 * Destructor. |
|
59 */ |
|
60 virtual ~CGSMediaPlayerStreamingView(); |
|
61 |
|
62 /** |
|
63 * Handle screen size change. |
|
64 * @since 3.1 |
|
65 */ |
|
66 void HandleClientRectChange(); |
|
67 |
|
68 /** |
|
69 * Creates new icon for tab. Ownership is transferred to client. |
|
70 * @since 3.1 |
|
71 */ |
|
72 CGulIcon* CreateTabIconL(); |
|
73 |
|
74 /** |
|
75 * This function is used to set the current item in the listbox. |
|
76 * @since 2.0 |
|
77 * @param aIndex Current item. |
|
78 */ |
|
79 void SetCurrentItem(TInt aIndex); |
|
80 |
|
81 private: // Functions from base classes |
|
82 /** |
|
83 * From CAknView returns UID of view |
|
84 * @return TUid uid of the view |
|
85 */ |
|
86 TUid Id() const; |
|
87 |
|
88 /** |
|
89 * From CAknView Handle commands |
|
90 * @param aCommand command to be handled |
|
91 */ |
|
92 void HandleCommandL( TInt aCommand ); |
|
93 |
|
94 /** |
|
95 * From CAknView Activate this view |
|
96 * @param aPrevViewId |
|
97 * @param aCustomMessageId |
|
98 * @param aCustomMessage |
|
99 */ |
|
100 void DoActivateL( const TVwsViewId& aPrevViewId, |
|
101 TUid aCustomMessageId, |
|
102 const TDesC8& aCustomMessage ); |
|
103 |
|
104 /** |
|
105 * From CAknView Deactivate this view |
|
106 */ |
|
107 void DoDeactivate(); |
|
108 |
|
109 /** |
|
110 * From MEikMenuObserver Dynamically customize menu items |
|
111 * @param aResourceId Menu pane resource ID |
|
112 * @param aMenuPane Menu pane pointer |
|
113 */ |
|
114 void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ); |
|
115 |
|
116 /** |
|
117 * Creates new container. |
|
118 * @since 3.1 |
|
119 */ |
|
120 void NewContainerL(); |
|
121 |
|
122 /** |
|
123 * Get CMPSettingsBaseContainer's container. |
|
124 * @since 3.1 |
|
125 */ |
|
126 CMPSettingsBaseContainer* Container(); |
|
127 |
|
128 /** |
|
129 * Creates new container. |
|
130 * @since 3.1 |
|
131 */ |
|
132 void CreateContainerL(); |
|
133 |
|
134 protected: // from MEikListBoxObserver |
|
135 |
|
136 /** |
|
137 * Handles listbox events. |
|
138 * @param aListBox Listbox where the event occurred. |
|
139 * @param aEventType Event type. |
|
140 */ |
|
141 void HandleListBoxEventL(CEikListBox* aListBox, |
|
142 TListBoxEvent aEventType); |
|
143 |
|
144 /** |
|
145 * Called at the end of DoActivateL. |
|
146 * @since 2.0 |
|
147 */ |
|
148 void DynInitContainerL(); |
|
149 |
|
150 private: |
|
151 /** |
|
152 * C++ default constructor. |
|
153 */ |
|
154 CGSMediaPlayerStreamingView(CMPSettingsModelForROP* aModel, CArrayPtrFlat<MGSTabbedView>* aTabViewArray); |
|
155 |
|
156 /** |
|
157 * Symbian OS 2nd phase constructor. |
|
158 * @since 2.1 |
|
159 */ |
|
160 void ConstructL( CArrayPtrFlat<MGSTabbedView>* aTabViewArray ); |
|
161 |
|
162 private: // New |
|
163 |
|
164 /** |
|
165 * Handles listbox selection. |
|
166 */ |
|
167 virtual void HandleListBoxSelectionL(); |
|
168 |
|
169 private: // Data |
|
170 |
|
171 CMPSettingsModelForROP* iModel; |
|
172 CMPSettingsBaseContainer* iContainer; // owned |
|
173 CGSTabHelper* iTabHelper; // owned |
|
174 |
|
175 TInt iCurrentItem; |
|
176 TInt iTopItemIndex; |
|
177 }; |
|
178 |
|
179 #endif //GSMEDIAPLAYERSTREAMINGVIEW_H |
|
180 |
|
181 // End of File |