|
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 "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: Definition for MediaServant document class |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef __MSBASECONTAINER_H__ |
|
21 #define __MSBASECONTAINER_H__ |
|
22 |
|
23 // INCLUDES |
|
24 #include <coecntrl.h> |
|
25 #include <aknsfld.h> |
|
26 |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 class CEikListBox; |
|
30 class CEikTextListBox; |
|
31 class CEikColumnListBox; |
|
32 class CEikFormattedCellListBox; |
|
33 class CTextListBoxModel; |
|
34 class CAknIconArray; |
|
35 |
|
36 // CLASS DECLARATION |
|
37 |
|
38 /** |
|
39 * CMSBaseContainer container control class. |
|
40 * @since S60 5.1 |
|
41 */ |
|
42 NONSHARABLE_CLASS( CMSBaseContainer ): public CCoeControl |
|
43 { |
|
44 |
|
45 public: |
|
46 |
|
47 /** |
|
48 * CMSBaseContainer default constructor. |
|
49 */ |
|
50 CMSBaseContainer(); |
|
51 |
|
52 /** |
|
53 * ~CMSBaseContainer |
|
54 * Destructor. |
|
55 */ |
|
56 virtual ~CMSBaseContainer(); |
|
57 |
|
58 /** |
|
59 * Shows note |
|
60 * @since S60 3.1 |
|
61 * @param aResource, text to be shown |
|
62 * @param aError, error code |
|
63 * @return None |
|
64 */ |
|
65 void ShowNoteL ( TInt aResource, TInt aError ); |
|
66 |
|
67 /** |
|
68 * Sets default context pane icon |
|
69 * @since S60 3.1 |
|
70 * @param None |
|
71 * @return None |
|
72 */ |
|
73 void SetDefaultContextPaneIconL(); |
|
74 |
|
75 protected: |
|
76 |
|
77 /** |
|
78 * SetListBoxFromResourceL |
|
79 * Sets listbox from resource using ConstructFromResourceL() of |
|
80 * CEikColumnListBox class. |
|
81 * @since S60 3.1 |
|
82 * @param aListBox Pointer of listbox. |
|
83 * @param aResourceId Resource ID of listbox. |
|
84 * @return None |
|
85 */ |
|
86 void SetListBoxFromResourceL( |
|
87 CEikColumnListBox* aListBox, |
|
88 const TInt aResourceId ); |
|
89 |
|
90 /** |
|
91 * SetListBoxFromResourceL |
|
92 * Sets listbox from resource using ConstructFromResourceL() of |
|
93 * CEikFormattedCellListBox class. |
|
94 * @since S60 3.1 |
|
95 * @param aListBox Pointer of listbox. |
|
96 * @param aResourceId Resource ID of listbox. |
|
97 * @return None |
|
98 */ |
|
99 void SetListBoxFromResourceL( |
|
100 CEikFormattedCellListBox* aListBox, |
|
101 const TInt aResourceId ); |
|
102 |
|
103 /** |
|
104 * CreateScrollbarL |
|
105 * Creates scrollbar. |
|
106 * @since S60 3.1 |
|
107 * @param aListBox Pointer of created listbox. |
|
108 * @return None |
|
109 */ |
|
110 void CreateScrollbarL( CEikListBox* aListBox ); |
|
111 |
|
112 /** |
|
113 * CreateFindBoxL |
|
114 * Creates FindBox and returns it's pointer. |
|
115 * @since S60 3.1 |
|
116 * @param aListBox Pointer of listbox. |
|
117 * @param aModel Pointer of model. |
|
118 * @param aStyle Style of FindBox. |
|
119 * @return Pointer of CAknSearchField. |
|
120 */ |
|
121 CAknSearchField* CreateFindBoxL( |
|
122 CEikListBox* aListBox, |
|
123 CTextListBoxModel* aModel, |
|
124 CAknSearchField::TSearchFieldStyle aStyle ); |
|
125 |
|
126 /** |
|
127 * Appends item to listbox array |
|
128 * @since S60 3.1 |
|
129 * @param aListBox, pointer of listbox |
|
130 * @param aModel, listbox model |
|
131 * @param aIcon, icon index with "\t" |
|
132 * @param aID, skinned icon id |
|
133 * @param aBitmapId, bitmap id |
|
134 * @param aMaskId, bitmap mask id |
|
135 * @return None |
|
136 */ |
|
137 void AppendItemToListBoxArrayL( CEikListBox* aListBox, |
|
138 CTextListBoxModel* aModel, |
|
139 TInt aIconIndex, |
|
140 TDesC& aPrimaryText, |
|
141 TDesC& aSecondaryText ); |
|
142 |
|
143 /** |
|
144 * Appends item to listbox array |
|
145 * @since S60 3.1 |
|
146 * @param aListBox, pointer of listbox |
|
147 * @param aModel, listbox model |
|
148 * @param aIconIndex, icon index |
|
149 * @param aItemText, text to be displayed |
|
150 * @return None |
|
151 */ |
|
152 void AppendItemToListBoxArrayL( CEikListBox* aListBox, |
|
153 CTextListBoxModel* aModel, |
|
154 TInt aIconIndex, |
|
155 TDesC& aItemText ); |
|
156 |
|
157 /** |
|
158 * Loads a possibly skinned icon and adds it to icon array |
|
159 * @since S60 3.1 |
|
160 * @param aArray, array of icons |
|
161 * @param aSkin, skin instance |
|
162 * @param aMbmFile, reference to icon file |
|
163 * @param aID, skinned icon id |
|
164 * @param aBitmapId, bitmap id |
|
165 * @param aMaskId, bitmap mask id |
|
166 * @return None |
|
167 */ |
|
168 void AppendIconToArrayL(CAknIconArray* aArray, |
|
169 MAknsSkinInstance* aSkin, |
|
170 const TDesC& aMbmFile, |
|
171 const TAknsItemID& aID, |
|
172 TInt aBitmapId, |
|
173 TInt aMaskId); |
|
174 |
|
175 /** |
|
176 * Sets context pane icon |
|
177 * @since S60 3.1 |
|
178 * @param aIconBitmap, bitmap |
|
179 * @param aIconmask, bitmap mask |
|
180 * @return None |
|
181 */ |
|
182 void SetContextPaneIconL( const CFbsBitmap* aIconBitmap, |
|
183 const CFbsBitmap* aIconMask ); |
|
184 |
|
185 private: |
|
186 |
|
187 /** |
|
188 * control environment |
|
189 */ |
|
190 CCoeEnv* iCoeEnv; |
|
191 }; |
|
192 |
|
193 #endif // __MSBASECONTAINER_H__ |
|
194 |
|
195 // End of File |