1 eikmenub.h |
1 /* |
|
2 * Copyright (c) 1997-1999 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 "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #if !defined(__EIKMENUB_H__) |
|
20 #define __EIKMENUB_H__ |
|
21 |
|
22 #if !defined(__EIKDEF_H__) |
|
23 #include <eikdef.h> |
|
24 #endif |
|
25 |
|
26 #if !defined(__EIKBCTRL_H__) |
|
27 #include <eikbctrl.h> |
|
28 #endif |
|
29 |
|
30 #if !defined(__EIKMENUP_H__) |
|
31 #include <eikmenup.h> |
|
32 #endif |
|
33 |
|
34 #include <eikbtgpc.h> |
|
35 #include <eikcmobs.h> |
|
36 #include <aknintermediate.h> |
|
37 |
|
38 class CEikHotKeyTable; |
|
39 class CEikMenuBarExtension; |
|
40 |
|
41 |
|
42 /** |
|
43 * The CEikMenuBarTitle class encapsulates the data needed to define a menu bar title and |
|
44 * provides some of the functionality required to display the title. |
|
45 * |
|
46 * @since ER5U |
|
47 */ |
|
48 class CEikMenuBarTitle : public CBase |
|
49 { |
|
50 public: |
|
51 /** |
|
52 * Defines a menu bar. See also @c MEikMenuObserver::DynInitMenuPaneL(). |
|
53 * See also @c MENU_TITLE for details of the resource interface to menu |
|
54 * items. |
|
55 */ |
|
56 struct SData |
|
57 { |
|
58 enum { |
|
59 /** Nominal legth of the text. */ |
|
60 ENominalTextLength=40 |
|
61 }; |
|
62 /** |
|
63 * The resource ID from which the menu pane is constructed. |
|
64 */ |
|
65 TInt iMenuPaneResourceId; |
|
66 /** |
|
67 * The text to display on the menu pane. |
|
68 */ |
|
69 TBuf<ENominalTextLength> iText; // less than this actually stored |
|
70 }; |
|
71 public: |
|
72 /** |
|
73 * C++ default constructor. |
|
74 */ |
|
75 IMPORT_C CEikMenuBarTitle(); |
|
76 /** |
|
77 * Destructor. |
|
78 */ |
|
79 IMPORT_C ~CEikMenuBarTitle(); |
|
80 /** |
|
81 * Sets the title icon. |
|
82 * |
|
83 * @param aIcon The icon to set. |
|
84 */ |
|
85 IMPORT_C void SetIcon(CGulIcon* aIcon); |
|
86 |
|
87 /** |
|
88 * Sets whether the bitmap and mask are owned externally or not. |
|
89 * |
|
90 * @param aOwnedExternally @c ETrue if bitmaps are set as externally owned. |
|
91 * @c EFalse if bitmaps are set as not being externally owned. |
|
92 */ |
|
93 IMPORT_C void SetBitmapsOwnedExternally(TBool aOwnedExternally); |
|
94 |
|
95 /** |
|
96 * Draws the title icon to the graphics context @c aGc, inside the rect @c |
|
97 * aRect with an offset from the left side of the rectangle of size @c |
|
98 * aLeftMargin. |
|
99 * |
|
100 * @param aGc Window graphic context. |
|
101 * @param aRect Rectangle area. |
|
102 * @param aLeftMargin Left margin. |
|
103 */ |
|
104 IMPORT_C void DrawIcon(CWindowGc& aGc, TRect aRect, TInt aLeftMargin) const; |
|
105 |
|
106 /** |
|
107 * Constructs a new icon for the title, taking ownership of the picture |
|
108 * bitmap and the mask bitmap unless they are externally owned. |
|
109 * |
|
110 * @param aBitmap Bitmap. |
|
111 * @param aMask Mask of the bitmap. |
|
112 */ |
|
113 IMPORT_C void CreateIconL(CFbsBitmap* aBitmap, CFbsBitmap* aMask); |
|
114 |
|
115 /** |
|
116 * Sets the bitmap for the icon. Transfers |
|
117 * ownership unless the bitmaps are owned externally. |
|
118 * |
|
119 * @param aBitmap Bitmap |
|
120 */ |
|
121 IMPORT_C void SetIconBitmapL(CFbsBitmap* aBitmap); |
|
122 |
|
123 /** |
|
124 * Sets the bitmap mask for the icon. Transfers ownership |
|
125 * unless the bitmaps are owned externally. |
|
126 * |
|
127 * @param aMask Mask of a bitmap. |
|
128 */ |
|
129 IMPORT_C void SetIconMaskL(CFbsBitmap* aMask); |
|
130 |
|
131 /** |
|
132 * Gets a pointer to the title icon’s bitmap. Does not imply transfer of |
|
133 * ownership. |
|
134 * |
|
135 * @return Pointer to the title icon’s bitmap. |
|
136 */ |
|
137 IMPORT_C CFbsBitmap* IconBitmap() const; |
|
138 |
|
139 /** |
|
140 * Gets a pointer to the title icon’s bitmap mask. Does not imply transfer |
|
141 * of ownership. |
|
142 * |
|
143 * @return Pointer to the title icon’s bitmap mask. |
|
144 */ |
|
145 IMPORT_C CFbsBitmap* IconMask() const; |
|
146 |
|
147 public: // other functions |
|
148 |
|
149 /** |
|
150 * Gets the value of the extra left margin for the title text which will |
|
151 * take into account the width of the title icon. |
|
152 * |
|
153 * @return Value of extra left margin. |
|
154 */ |
|
155 TInt ExtraLeftMargin() const; |
|
156 |
|
157 /** |
|
158 * Adjusts the value of the title text baseline offset @c aBaseLine to take |
|
159 * into account any size of the title icon. |
|
160 * |
|
161 * @param[in,out] aBaseLine Gets result of baseline. |
|
162 * @param[in,out] aTitleHeight Gets result of height. |
|
163 */ |
|
164 void CalculateBaseLine(TInt& aBaseLine, TInt& aTitleHeight); |
|
165 |
|
166 public: |
|
167 |
|
168 /** The title’s position on the menu bar. */ |
|
169 TInt iPos; |
|
170 |
|
171 /** The title’s width. */ |
|
172 TInt iWidth; |
|
173 |
|
174 /** The menu bar title text. */ |
|
175 SData iData; |
|
176 |
|
177 /** Flags used internally by the menu bar title. */ |
|
178 TInt iTitleFlags; |
|
179 |
|
180 private: |
|
181 CGulIcon* iIcon; |
|
182 }; |
|
183 |
|
184 /** |
|
185 * Menu bars are constructed from @c MENU_BAR resources and issue application |
|
186 * commands which should be handled by overriding @c |
|
187 * CEikAppUi::HandleCommandL(). |
|
188 */ |
|
189 class CEikMenuBar : public CEikBorderedControl, |
|
190 public MEikCommandObserver, |
|
191 public MAknIntermediateState |
|
192 { |
|
193 |
|
194 public: |
|
195 |
|
196 /** |
|
197 * Declares an object type for a class, in order to allow the object |
|
198 * provider mechanism to locate and provide objects from the class. |
|
199 */ |
|
200 DECLARE_TYPE_ID(0x101F4106) |
|
201 |
|
202 /** Specifies the menu item within the menu pane. */ |
|
203 struct SCursor |
|
204 { |
|
205 /** Index of a title in the menu bar. */ |
|
206 TInt iMenuPaneIndex; |
|
207 |
|
208 /** Index of an item in a menu pane. */ |
|
209 TInt iMenuItemIndex; |
|
210 }; |
|
211 |
|
212 /** */ |
|
213 struct SPosition |
|
214 { |
|
215 /** */ |
|
216 TInt iMenuId; |
|
217 |
|
218 /** */ |
|
219 SCursor iMenuCursorPos; |
|
220 }; |
|
221 |
|
222 enum TMenuType { |
|
223 /** |
|
224 * Options menu launched from the Options softkey. |
|
225 * This is the default value. |
|
226 */ |
|
227 EMenuOptions = 0, |
|
228 |
|
229 /** |
|
230 * Context sensitive menu that is launched from selection key |
|
231 * when the application supports it. |
|
232 */ |
|
233 EMenuContext = 1, |
|
234 |
|
235 /** |
|
236 * Edit menu containing editing specific items. |
|
237 */ |
|
238 EMenuEdit = 2, |
|
239 |
|
240 /** |
|
241 * Options menu launched from the Options softkey. Task swapper item |
|
242 * is not shown. |
|
243 */ |
|
244 EMenuOptionsNoTaskSwapper = 3 |
|
245 }; |
|
246 |
|
247 friend class CEikMenuPaneTitle; |
|
248 |
|
249 private: |
|
250 |
|
251 enum {ENothingSelected=-1}; |
|
252 |
|
253 public: |
|
254 |
|
255 /** |
|
256 * Destructor. |
|
257 */ |
|
258 IMPORT_C ~CEikMenuBar(); |
|
259 |
|
260 /** |
|
261 * C++ default constructor. |
|
262 */ |
|
263 IMPORT_C CEikMenuBar(); |
|
264 |
|
265 public: // framework |
|
266 |
|
267 /** |
|
268 * From @c CCoeControl |
|
269 * |
|
270 * Handles key events offered to the menu by the control environment and |
|
271 * provides an appropriate implementation of |
|
272 * @c CCoeControl::OfferKeyEventL(). |
|
273 * |
|
274 * @param aKeyEvent The key event. |
|
275 * @param aType The type of key event: @c EEventKey, @c EEventKeyUp or @c |
|
276 * EEventKeyDown. |
|
277 * |
|
278 * @return Indicates whether or not the key event was used by this control. |
|
279 */ |
|
280 IMPORT_C TKeyResponse OfferKeyEventL(const TKeyEvent& aKeyEvent, |
|
281 TEventCode aType); |
|
282 |
|
283 /** |
|
284 * From @c CCoeControl |
|
285 * |
|
286 * Handles pointer events. This function gets called whenever a pointer |
|
287 * event occurs in the control, i.e. when the pointer is within the |
|
288 * control's extent, or when the control has grabbed the pointer. The |
|
289 * control should implement this function to handle pointer events. |
|
290 * |
|
291 * Note: events of type @c EButton1Down are processed before @c |
|
292 * HandlePointerEventL() is called, in order to transfer keyboard focus to |
|
293 * the control in which the @c EButton1Down event occurred. |
|
294 * |
|
295 * If overriding @c HandlePointerEventL(), the implementation must include |
|
296 * a base call to @c CCoeControl's @c HandlePointerEventL(). |
|
297 * |
|
298 * @param aPointerEvent The pointer event. |
|
299 */ |
|
300 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent); |
|
301 |
|
302 /** |
|
303 * From @c CCoeControl |
|
304 * |
|
305 * Not implemented. |
|
306 * |
|
307 * @param Not used. |
|
308 */ |
|
309 IMPORT_C void Draw(const TRect& aRect) const; |
|
310 |
|
311 private: |
|
312 |
|
313 /** |
|
314 * From CAknControl |
|
315 */ |
|
316 IMPORT_C void* ExtensionInterface( TUid aInterface ); |
|
317 |
|
318 private: // from MCoeInputObserver |
|
319 |
|
320 IMPORT_C TCoeInputCapabilities InputCapabilities() const; |
|
321 |
|
322 public: |
|
323 |
|
324 /** |
|
325 * This class enables construction, and destruction of an array of |
|
326 * information about menu bar titles. |
|
327 */ |
|
328 class CTitleArray : public CArrayPtrFlat<CEikMenuBarTitle> |
|
329 { |
|
330 |
|
331 public: |
|
332 |
|
333 /** |
|
334 * Destructor. |
|
335 */ |
|
336 IMPORT_C ~CTitleArray(); |
|
337 |
|
338 /** |
|
339 * C++ default constructor. |
|
340 */ |
|
341 IMPORT_C CTitleArray(); |
|
342 |
|
343 /** |
|
344 * Adds the menu bar title @c aMenuTitle to the end of the array owned |
|
345 * by the menu bar and transfers ownership. |
|
346 * |
|
347 * @param aMenuTitle Append object to flat array. |
|
348 */ |
|
349 IMPORT_C void AddTitleL(CEikMenuBarTitle* aMenuTitle); |
|
350 |
|
351 /** |
|
352 * Deletes selected index into array. |
|
353 * |
|
354 * @param aResource Array index that will be delete. |
|
355 */ |
|
356 void DeleteResource(TInt aResource); |
|
357 }; |
|
358 |
|
359 public: // new functions |
|
360 |
|
361 /** |
|
362 * Second phase constructor for a menu bar. |
|
363 * |
|
364 * @param aMenuObserver The menu's observer. |
|
365 * @param aHotKeyResourceId The ID of the resource, of type HOTKEY from |
|
366 * which the hotkey table is created. This is optional. By default |
|
367 * it's nil. |
|
368 * @param aMenuTitleResourceId The ID of the resource, of type @c MENU_BAR |
|
369 * from which the menu title array is created. This is optional. By |
|
370 * default it's nil. |
|
371 */ |
|
372 |
|
373 IMPORT_C void ConstructL(MEikMenuObserver* aMenuObserver, |
|
374 TInt aHotKeyResourceId=0, |
|
375 TInt aMenuTitleResourceId=0); |
|
376 |
|
377 /** |
|
378 * Second phase constructor for a menu bar which builds the menu bar from |
|
379 * the given resource file. |
|
380 * |
|
381 * @param aReader The resource reader. |
|
382 */ |
|
383 IMPORT_C void ConstructFromResourceL(TResourceReader& aReader); |
|
384 |
|
385 /** |
|
386 * Not implemented |
|
387 * |
|
388 * @param aHotKeyResourceId Not used. |
|
389 * @param aMenuTitleResourceId Not used. |
|
390 * @param aDisplayNow Not used. |
|
391 */ |
|
392 IMPORT_C void ChangeMenuBarL(TInt aHotKeyResourceId=0, |
|
393 TInt aMenuTitleResourceId=0, |
|
394 TInt aDisplayNow=ETrue); |
|
395 |
|
396 /** |
|
397 * Not implemented! |
|
398 * |
|
399 * @param aHotKeyTable Not used. |
|
400 * @return NULL. |
|
401 */ |
|
402 IMPORT_C CEikHotKeyTable* SetHotKeyTable(CEikHotKeyTable* aHotKeyTable); |
|
403 |
|
404 /** |
|
405 * Sets the menu’s resource ID. |
|
406 * |
|
407 * @param aMenuTitleResourceId The ID of the resource to use. |
|
408 */ |
|
409 IMPORT_C void SetMenuTitleResourceId(TInt aMenuTitleResourceId); |
|
410 |
|
411 /** |
|
412 * |
|
413 * |
|
414 * @param aMenuTitleResourceId |
|
415 */ |
|
416 IMPORT_C void SetContextMenuTitleResourceId(TInt aMenuTitleResourceId); |
|
417 |
|
418 /** |
|
419 * Not implemented. |
|
420 * |
|
421 * @param aTitleArray Not used. |
|
422 */ |
|
423 IMPORT_C void SetMenuTitleArray(CTitleArray* aTitleArray); |
|
424 |
|
425 /** |
|
426 * Not implemented. |
|
427 * |
|
428 * @param aOwnedExternally Not used. |
|
429 */ |
|
430 IMPORT_C void SetTitleArrayOwnedExternally(TBool aOwnedExternally); |
|
431 |
|
432 /** |
|
433 * Sets the cursor to the specifed menu pane and menu item. |
|
434 * |
|
435 * @param aCursor The menu pane and menu item to which the cursor is set. |
|
436 * @return A @c SCursor structure holding the menu item within the menu |
|
437 * pane. |
|
438 */ |
|
439 IMPORT_C SCursor SetMenuCursor(const SCursor& aCursor); |
|
440 |
|
441 /** |
|
442 * Stops displaying the menu bar. |
|
443 * |
|
444 * This function causes the menu bar to disappear from the screen until it |
|
445 * is invoked again by the user. In most circumstances this is done by the |
|
446 * @c Uikon framework, so an application program will not normally need to |
|
447 * use this function. |
|
448 */ |
|
449 IMPORT_C void StopDisplayingMenuBar(); |
|
450 |
|
451 /** |
|
452 * Displays the menu bar. |
|
453 * |
|
454 * If the menu is not already displayed, this function displays the menu |
|
455 * bar and allows the user to make a selection. In most circumstances this |
|
456 * is done by the @c Uikon framework, so an application program will not |
|
457 * normally need to use this function. |
|
458 */ |
|
459 IMPORT_C void TryDisplayMenuBarL(); |
|
460 IMPORT_C void TryDisplayContextMenuBarL(); |
|
461 /** |
|
462 * If the menu is not already displayed, this function displays the menu |
|
463 * bar without fep menu and allows the user to make a selection. In most |
|
464 * circumstances this is done by the @c Uikon framework, so an application |
|
465 * program will not normally need to use this function. |
|
466 */ |
|
467 IMPORT_C void TryDisplayMenuBarWithoutFepMenusL(); |
|
468 |
|
469 /** |
|
470 * Not implemented. |
|
471 * |
|
472 * @param aNewSelectedTitle Not used |
|
473 * @param aNewSelectedItem Not used. |
|
474 */ |
|
475 IMPORT_C void MoveHighlightToL(TInt aNewSelectedTitle, |
|
476 TInt aNewSelectedItem=0); |
|
477 |
|
478 /** |
|
479 * Not implemented. |
|
480 * |
|
481 * @param aItem Not used. |
|
482 */ |
|
483 IMPORT_C void DrawItem(TInt aItem) const; |
|
484 |
|
485 /** |
|
486 * Gets a pointer to the menu’s hot key table. |
|
487 */ |
|
488 CEikHotKeyTable* HotKeyTable() const { return(iHotKeyTable); } |
|
489 |
|
490 /** |
|
491 * Gets the index of the menu pane selected by the cursor. |
|
492 * |
|
493 * @return The index of the selected menu pane. |
|
494 */ |
|
495 IMPORT_C TInt SelectedTitle(); |
|
496 |
|
497 /** |
|
498 * Gets the index of the menu item selected by the cursor. |
|
499 * |
|
500 * @return The index of the selected menu item. |
|
501 */ |
|
502 IMPORT_C TInt SelectedItem(); |
|
503 |
|
504 /** |
|
505 * Searches for the menu item that corresponds to the specified command. |
|
506 * |
|
507 * @param aCommandId The ID to search for. |
|
508 * @param aPaneindex Menu pane index. |
|
509 * @param aItemindex Menu item index. |
|
510 */ |
|
511 IMPORT_C virtual void FindCommandIdInResourceL(TInt aCommandId, |
|
512 TInt& aPaneindex, |
|
513 TInt& aItemindex); |
|
514 |
|
515 /** |
|
516 * Gets a menu pane resource. |
|
517 * |
|
518 * @return The pointer to @c CEikMenuPane object containing a menu pane |
|
519 * resource. |
|
520 */ |
|
521 IMPORT_C CEikMenuPane* MenuPane(); |
|
522 |
|
523 /** |
|
524 * If the menu bar is visible, removes the menu bar height from the top of |
|
525 * @c aRect and returns the new rectangle in a new value of @c aRect. |
|
526 * |
|
527 * @param[in,out] aRect A rectangle that on return is reduced in height by |
|
528 * the height of the menu bar. |
|
529 */ |
|
530 IMPORT_C void ReduceRect(TRect& aRect) const; |
|
531 |
|
532 /** |
|
533 * Gets array of information about the menu bar titles. |
|
534 * |
|
535 * @return Pointer to @c CTitleArray object containing array of information |
|
536 * about menu bar titles. |
|
537 */ |
|
538 IMPORT_C CTitleArray* TitleArray(); |
|
539 |
|
540 /** |
|
541 * Sets menu observer interface. |
|
542 * |
|
543 * @param aEditMenuObserver Menu observer interface. |
|
544 */ |
|
545 IMPORT_C void SetEditMenuObserver(MEikMenuObserver* aEditMenuObserver); |
|
546 |
|
547 /** |
|
548 * Sets the menu observer interface to @c NULL. |
|
549 * |
|
550 * @param aEditMenuObserver Menu observer interface that will be set to @c |
|
551 * NULL. |
|
552 */ |
|
553 IMPORT_C void RemoveEditMenuObserver(MEikMenuObserver* aEditMenuObserver); |
|
554 |
|
555 /** |
|
556 * Allows the client to determine if the menubar instance is displayed. |
|
557 * |
|
558 * @return @c Etrue if displayed and @c EFalse if not. |
|
559 */ |
|
560 IMPORT_C TBool IsDisplayed(); |
|
561 |
|
562 /** |
|
563 * Sets type of the menu. Menu can be for example Options menu launched from |
|
564 * Options softkey or context sensitive menu launched from the selection key. |
|
565 * By default the launched menu is options menu. |
|
566 * @since S60 3.1 |
|
567 * @param aMenuType One of values of CEikMenuBar::TMenuType enumeration. |
|
568 */ |
|
569 IMPORT_C void SetMenuType(TMenuType aMenuType); |
|
570 |
|
571 private: // from MAknIntermediateState |
|
572 |
|
573 void CloseState(); |
|
574 |
|
575 public: // from CCoeControl |
|
576 |
|
577 /** |
|
578 * From @c CCoeControl. |
|
579 * |
|
580 * Gets the list of logical colours used to draw the control. |
|
581 * |
|
582 * The list includes an explanation of how each colour is used. By default, |
|
583 * this function has an empty implementation. |
|
584 * |
|
585 * @since 5.1 SDK. |
|
586 * @param aColorUseList The colour list. |
|
587 */ |
|
588 IMPORT_C virtual void GetColorUseListL( |
|
589 CArrayFix<TCoeColorUse>& aColorUseList) const; |
|
590 |
|
591 /** |
|
592 * From @c CCoeControl. |
|
593 * |
|
594 * Handles a change to the control's resources. |
|
595 * |
|
596 * The types of resources handled are those which are shared across the |
|
597 * environment, e.g. colours or fonts. |
|
598 * |
|
599 * @since 5.1 SDK. |
|
600 * @param aType A message UID value. The most common is @c |
|
601 * KEikMessageColorSchemeChange which controls get when the colour |
|
602 * scheme is changed. Other examples include: @c |
|
603 * KEikMessageFadeAllWindows, @c KEikMessageUnfadeWindows, @c |
|
604 * KEikMessageZoomChange, @c KEikMessageVirtualCursorStateChange, @c |
|
605 * KEikMessageCapsLock, @c KEikMessagePrepareForSave. |
|
606 */ |
|
607 IMPORT_C virtual void HandleResourceChange(TInt aType); |
|
608 |
|
609 private: // from CCoeControl |
|
610 IMPORT_C void Reserved_1(); |
|
611 IMPORT_C void Reserved_2(); |
|
612 // from MEikCommandObserver |
|
613 void ProcessCommandL(TInt aCommandId); |
|
614 private: // from MObjectProvider |
|
615 TTypeUid::Ptr MopSupplyObject(TTypeUid aId); |
|
616 private: |
|
617 void StartDisplayingMenuBarL(); |
|
618 void HideMenuPane(); |
|
619 void SaveCurrentMenuPositionL(); |
|
620 void SetCursorPositionFromArray(); |
|
621 TBool MenuHasItems() const; |
|
622 void SetMenuHasItems(); |
|
623 TBool MenuHasPane() const; |
|
624 void SetMenuHasPane(); |
|
625 TBool TitleArrayOwnedExternally() const; |
|
626 void ResetTitleArray(); |
|
627 void CreateTitleArrayL(); |
|
628 void SetMenuPaneFlag(TInt aFlag); |
|
629 void AddFEPMenuL(); |
|
630 void AddMenuIfNotPresentL(TInt aResourceId); |
|
631 void UpdateTitleTextBaseline(); |
|
632 private: |
|
633 enum TEikMenuFlags {ETitleArrayOwnedExternally=0x01,EMenuHasItems=0x02,EMenuHasPane=0x04,EBackgroundFaded=0x08, ESoundsInstalled=0x10}; |
|
634 CEikButtonGroupContainer* iMenuCba; |
|
635 MEikMenuObserver* iMenuObserver; |
|
636 MEikMenuObserver* iEditMenuObserver; |
|
637 MEikMenuObserver* iActiveEditMenuObserver; |
|
638 CEikMenuPane* iMenuPane; |
|
639 CEikHotKeyTable* iHotKeyTable; |
|
640 SCursor iCursor; |
|
641 TInt iMenuTitleResourceId; |
|
642 TInt iMenuPaneResourceId; |
|
643 TInt iMenuHotKeyResourceId; |
|
644 TInt iSelectedTitle; |
|
645 TInt iBaseLine; |
|
646 TInt iMenuTitleLeftSpace; |
|
647 TInt iMenuFlags; |
|
648 CTitleArray* iTitleArray; |
|
649 CArrayFixFlat<SPosition>* iPastMenuPosArray; |
|
650 TBool iPreventFepMenu; |
|
651 friend class CEikMenuBarExtension; |
|
652 CEikMenuBarExtension* iExt; |
|
653 }; |
|
654 |
|
655 /** |
|
656 * This class is not intended to be used by application programmers. |
|
657 */ |
|
658 class CEikMenuPaneTitle : public CEikBorderedControl |
|
659 { |
|
660 |
|
661 public: |
|
662 |
|
663 /** |
|
664 * Default C++ constructor |
|
665 */ |
|
666 IMPORT_C CEikMenuPaneTitle(CEikMenuBar* aMenuBar); |
|
667 |
|
668 /** |
|
669 * Second phase constructor for a menu bar. By default Symbian 2nd phase |
|
670 * constructor is private. |
|
671 */ |
|
672 IMPORT_C void ConstructL(); |
|
673 |
|
674 /** |
|
675 * Not implemented |
|
676 * |
|
677 * @param aSelectedTitle Not used. |
|
678 */ |
|
679 IMPORT_C void SetSelectedTitle(TInt aSelectedTitle); |
|
680 |
|
681 /** |
|
682 * Not implemented |
|
683 * |
|
684 * @param aRect Not used. |
|
685 */ |
|
686 IMPORT_C void Draw(const TRect& aRect) const; |
|
687 |
|
688 /** |
|
689 * Gets the menu pane title’s margins. |
|
690 * |
|
691 * @return The menu pane title’s margins. |
|
692 */ |
|
693 IMPORT_C TMargins Margins() const; |
|
694 |
|
695 /** |
|
696 * Not implemented |
|
697 */ |
|
698 IMPORT_C void Close(); |
|
699 |
|
700 public:// framework |
|
701 |
|
702 /** |
|
703 * Not implemented. |
|
704 * |
|
705 * @param aPointerEvent Not used. |
|
706 */ |
|
707 IMPORT_C void HandlePointerEventL(const TPointerEvent& aPointerEvent); |
|
708 |
|
709 /** |
|
710 * From @c CCoeControl. |
|
711 * |
|
712 * Gets the list of logical colours used to draw the control. |
|
713 * |
|
714 * The list includes an explanation of how each colour is used. By default, |
|
715 * this function has an empty implementation. |
|
716 * |
|
717 * Since 5.1 SDK. |
|
718 * |
|
719 * @param aColorUseList The colour list. |
|
720 */ |
|
721 IMPORT_C virtual void GetColorUseListL(CArrayFix<TCoeColorUse>& aColorUseList) const; // not available before Release 005u |
|
722 |
|
723 /** |
|
724 * Not implemented |
|
725 * |
|
726 * @param aType Not used. |
|
727 */ |
|
728 IMPORT_C virtual void HandleResourceChange(TInt aType); // not available before Release 005u |
|
729 |
|
730 private: |
|
731 /** |
|
732 * From CAknControl |
|
733 */ |
|
734 IMPORT_C void* ExtensionInterface( TUid aInterface ); |
|
735 private: |
|
736 CEikMenuBar* const iMenuBar; |
|
737 TInt iSelectedTitle; |
|
738 }; |
|
739 |
|
740 #endif |