|
1 /* |
|
2 * Copyright (c) 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 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: Base class for Hg based video list implementations.* |
|
15 */ |
|
16 |
|
17 |
|
18 |
|
19 |
|
20 #ifndef VCXHGMYVIDEOSLISTBASE_H |
|
21 #define VCXHGMYVIDEOSLISTBASE_H |
|
22 |
|
23 // INCLUDE FILES |
|
24 #include <e32def.h> |
|
25 #include <e32base.h> |
|
26 #include <eikmenup.h> |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 class CVcxHgMyVideosModel; |
|
30 class CVcxHgMyVideosMainView; |
|
31 class CHgScroller; |
|
32 |
|
33 // CLASS DECLARATION |
|
34 |
|
35 /** |
|
36 * Base class for video list implementations. |
|
37 * |
|
38 * @lib vcxhgmyvideos.lib |
|
39 */ |
|
40 NONSHARABLE_CLASS( CVcxHgMyVideosListBase ) : public CBase |
|
41 { |
|
42 public: |
|
43 |
|
44 /** |
|
45 * Destructor. |
|
46 */ |
|
47 virtual ~CVcxHgMyVideosListBase(); |
|
48 |
|
49 /** |
|
50 * Activate. |
|
51 * |
|
52 * @param aIndex Index of parent list item to activate. |
|
53 */ |
|
54 void DoListActivateL( TInt aIndex = KErrNotFound ); |
|
55 |
|
56 /** |
|
57 * Deactivate. |
|
58 */ |
|
59 void DoListDeactivate(); |
|
60 |
|
61 /** |
|
62 * Update control layout. |
|
63 * |
|
64 * @param aRect New rectangle. |
|
65 */ |
|
66 void UpdateLayout( TRect& aRect ); |
|
67 |
|
68 /** |
|
69 * Gets list highlight. |
|
70 * |
|
71 * @return Highlight. |
|
72 */ |
|
73 TInt Highlight(); |
|
74 |
|
75 /** |
|
76 * Set empty list text for list control. |
|
77 * |
|
78 * @param aResourceId Resource id |
|
79 */ |
|
80 void SetEmptyListTextByResourceL( TInt aResourceId ); |
|
81 |
|
82 /** |
|
83 * Set title text for view. |
|
84 * |
|
85 * @param aResourceId Resource id |
|
86 */ |
|
87 void SetTitleTextByResourceL( TInt aResourceId ); |
|
88 |
|
89 /** |
|
90 * Handles dynamic initialisation of menu items specific to video list. |
|
91 * |
|
92 * @param aResourceId Resource ID of menu to be activated. |
|
93 * @param aMenuPane Pointer to menu pane. |
|
94 */ |
|
95 void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ); |
|
96 |
|
97 public: |
|
98 |
|
99 /** |
|
100 * Set empty list text for list control. Deriving class must implement. |
|
101 */ |
|
102 virtual void SetEmptyListTextL() = 0; |
|
103 |
|
104 /** |
|
105 * Set title text for view. Deriving class must implement. |
|
106 * |
|
107 * @param aIndex Index of parent list item (title based on parent). |
|
108 */ |
|
109 virtual void SetTitleTextL( TInt aIndex ) = 0; |
|
110 |
|
111 protected: |
|
112 |
|
113 /** |
|
114 * Default constructor |
|
115 * |
|
116 * @param aModel Component model |
|
117 * @param aView Component view |
|
118 * @param aScroller Hg list control |
|
119 */ |
|
120 CVcxHgMyVideosListBase( CVcxHgMyVideosModel& iModel, |
|
121 CVcxHgMyVideosMainView& aView, |
|
122 CHgScroller& aScroller ); |
|
123 |
|
124 /** |
|
125 * 2nd phase constructor. |
|
126 */ |
|
127 void ConstructL(); |
|
128 |
|
129 protected: |
|
130 |
|
131 /** |
|
132 * Reference to component model. |
|
133 * Not Own. |
|
134 */ |
|
135 CVcxHgMyVideosModel& iModel; |
|
136 |
|
137 /** |
|
138 * Reference to component view. |
|
139 * Not own. |
|
140 */ |
|
141 CVcxHgMyVideosMainView& iView; |
|
142 |
|
143 /** |
|
144 * Hg list component. |
|
145 * Own. |
|
146 */ |
|
147 CHgScroller* iScroller; |
|
148 }; |
|
149 |
|
150 #endif // VCXHGMYVIDEOSLISTBASE_H |