23 class MAknCollection; |
23 class MAknCollection; |
24 class MAknCollectionObserver; |
24 class MAknCollectionObserver; |
25 class CAknItemActionMenuRegisterArray; |
25 class CAknItemActionMenuRegisterArray; |
26 class CAknItemActionMenu; |
26 class CAknItemActionMenu; |
27 class MObjectProvider; |
27 class MObjectProvider; |
28 class CAknView; |
|
29 |
28 |
30 /** |
29 /** |
31 * Item action menu register. |
30 * Item action menu register. |
32 * |
31 * |
33 * @lib eikcoctl |
32 * @lib eikcoctl |
66 */ |
65 */ |
67 IMPORT_C static void SetOverridingMenuBarOwnerL( |
66 IMPORT_C static void SetOverridingMenuBarOwnerL( |
68 MObjectProvider* aMenuBarOwner, TUint aFlags = 0 ); |
67 MObjectProvider* aMenuBarOwner, TUint aFlags = 0 ); |
69 |
68 |
70 /** |
69 /** |
71 * Sets the current constructing menubar owner to NULL if it matches to |
|
72 * aMenuBarOwner. Otherwise constructing menubar owner is not modified. |
|
73 * |
|
74 * @internal |
|
75 * @param aMenuBarOwner Pointer to constructing menubar owner. |
|
76 */ |
|
77 IMPORT_C static void RemoveConstructingMenuBarOwner( |
|
78 MObjectProvider* aMenuBarOwner ); |
|
79 |
|
80 /** |
|
81 * Registers a collection. |
70 * Registers a collection. |
82 * |
71 * |
83 * @internal |
72 * @internal |
84 * @param aCollection Collection to be registered. |
73 * @param aCollection Collection to be registered. |
85 * @param aMenuBarOwner Owner of the menubar that collection will be |
|
86 * registered with. |
|
87 * @return Item action menu the collection was registered to. |
74 * @return Item action menu the collection was registered to. |
88 */ |
75 */ |
89 static CAknItemActionMenu* RegisterCollectionL( |
76 static CAknItemActionMenu* RegisterCollectionL( |
90 MAknCollection& aCollection, MObjectProvider* aMenuBarOwner ); |
77 MAknCollection& aCollection ); |
91 |
78 |
92 /** |
79 /** |
93 * Registers item action menu to aMenuBar. |
80 * Registers item action menu to aMenuBar. |
94 * |
81 * |
95 * @internal |
82 * @internal |
173 |
160 |
174 /** |
161 /** |
175 * Registers collection. |
162 * Registers collection. |
176 * |
163 * |
177 * @param aCollection State to be registered. |
164 * @param aCollection State to be registered. |
178 * @param aMenuBarOwner Owner of the menubar that collection will be |
|
179 * registered with. |
|
180 * @return Item action menu the collection was registered to. |
165 * @return Item action menu the collection was registered to. |
181 */ |
166 */ |
182 CAknItemActionMenu* DoRegisterCollectionL( |
167 CAknItemActionMenu* DoRegisterCollectionL( |
183 MAknCollection& aCollection, MObjectProvider* aMenuBarOwner ); |
168 MAknCollection& aCollection ); |
184 |
169 |
185 /** |
170 /** |
186 * Registers item action menu to aMenuBar. |
171 * Registers item action menu to aMenuBar. |
187 * |
172 * |
188 * @param aMenuBar Calling menu bar. |
173 * @param aMenuBar Calling menu bar. |
252 * Returns the pointer to overriding object menu bar. |
237 * Returns the pointer to overriding object menu bar. |
253 * |
238 * |
254 * @return Overriding object menu bar. |
239 * @return Overriding object menu bar. |
255 */ |
240 */ |
256 CEikMenuBar* OverridingObjectMenuBar(); |
241 CEikMenuBar* OverridingObjectMenuBar(); |
257 |
|
258 /** |
|
259 * Returns pointer to component that owns the current view. This is either |
|
260 * application UI, active view or a dialog. This component is the one that |
|
261 * owns the possible menubar. |
|
262 * |
|
263 * @return Current view owner. |
|
264 */ |
|
265 MObjectProvider* Owner() const; |
|
266 |
|
267 /** |
|
268 * Returns pointer to currently active view. |
|
269 * |
|
270 * @param aAppUi Application UI. |
|
271 * @return Active view or NULL. |
|
272 */ |
|
273 CAknView* View( CAknAppUi* aAppUi ) const; |
|
274 |
|
275 /** |
|
276 * Returns pointer to current application UI. |
|
277 * |
|
278 * @return Application UI or NULL. |
|
279 */ |
|
280 static CAknAppUi* AppUI(); |
|
281 |
|
282 |
242 |
283 /** |
243 /** |
284 * Registers collection to item action menu. |
244 * Registers collection to item action menu. |
285 * Creates and sets item action menu to menu bar |
245 * Creates and sets item action menu to menu bar |
286 * if one is not found. If menu bar is not found, item action menu |
246 * if one is not found. If menu bar is not found, item action menu |
298 * Provides pointer to the current menu bar. |
258 * Provides pointer to the current menu bar. |
299 * |
259 * |
300 * @internal |
260 * @internal |
301 * @return Pointer to menu bar. |
261 * @return Pointer to menu bar. |
302 */ |
262 */ |
303 CEikMenuBar* FindCurrentMenuBar(); |
263 CEikMenuBar* FindCurrentMenuBarL(); |
304 |
264 |
305 /** |
265 /** |
306 * Adds register entry. |
266 * Adds register entry. |
307 * |
267 * |
308 * @param aMenuBar Menu bar. |
268 * @param aMenuBar Menu bar. |
310 */ |
270 */ |
311 void AddRegisterEntryL( |
271 void AddRegisterEntryL( |
312 CEikMenuBar& aMenuBar, CAknItemActionMenu& aItemActionMenu ); |
272 CEikMenuBar& aMenuBar, CAknItemActionMenu& aItemActionMenu ); |
313 |
273 |
314 /** |
274 /** |
315 * Adds observers that have the same owner and aItemAction to the menu. |
275 * Adds observers with aMenuBar to item action menu. |
316 * |
276 * |
|
277 * @param aMenuBar Menu bar. |
317 * @param aItemActionMenu Item action menu. |
278 * @param aItemActionMenu Item action menu. |
318 */ |
279 */ |
319 void AddObserversToItemActionMenuL( CAknItemActionMenu& aItemActionMenu ); |
280 void AddObserversToItemActionMenuL( |
|
281 CEikMenuBar* aMenuBar, CAknItemActionMenu& aItemActionMenu ); |
320 |
282 |
321 /** |
283 /** |
322 * Creates register instance. |
284 * Creates register instance. |
323 * |
285 * |
324 * @return Item action menu register instance. |
286 * @return Item action menu register instance. |
325 */ |
287 */ |
326 static AknItemActionMenuRegister* CreateInstanceL(); |
288 static AknItemActionMenuRegister* CreateInstanceL(); |
327 |
|
328 /** |
|
329 * Sets the current constructing menubar owner to NULL if it matches to |
|
330 * aMenuBarOwner. Otherwise constructing menubar owner is not modified. |
|
331 * |
|
332 * @internal |
|
333 * @param aMenuBarOwner Pointer to constructing menubar owner. |
|
334 */ |
|
335 void DoRemoveConstructingMenuBarOwner( |
|
336 MObjectProvider* aMenuBarOwner ); |
|
337 |
|
338 private: // data |
289 private: // data |
339 |
290 |
340 /** |
291 /** |
341 * Data class for unregistered menus. |
292 * Data class for unregistered menus. |
342 * |
293 * |