#include <mw/eikmenub.h>
class CEikMenuBar : public CEikBorderedControl |
Public Member Enumerations | |
---|---|
enum | anonymous { ETypeId } |
enum | TMenuType { EMenuOptions, EMenuContext, EMenuEdit, EMenuOptionsNoTaskSwapper } |
Inherited Attributes | |
---|---|
CCoeControl::iCoeEnv | |
CCoeControl::iContext | |
CCoeControl::iPosition | |
CCoeControl::iSize | |
CEikBorderedControl::iBorder |
Inherited Enumerations | |
---|---|
CCoeControl:TZoomType |
Menu bars are constructed from MENU_BAR resources and issue application commands which should be handled by overriding CEikAppUi::HandleCommandL().
IMPORT_C void | ConstructFromResourceL | ( | TResourceReader & | aReader | ) | [virtual] |
Reimplemented from CCoeControl::ConstructFromResourceL(TResourceReader &)
Second phase constructor for a menu bar which builds the menu bar from the given resource file.
Parameter | Description |
---|---|
aReader | The resource reader. |
IMPORT_C void | ConstructL | ( | MEikMenuObserver * | aMenuObserver, |
TInt | aHotKeyResourceId = 0, | |||
TInt | aMenuTitleResourceId = 0 | |||
) |
Second phase constructor for a menu bar.
Parameter | Description |
---|---|
aMenuObserver | The menu's observer. |
aHotKeyResourceId | The ID of the resource, of type HOTKEY from which the hotkey table is created. This is optional. By default it's nil. |
aMenuTitleResourceId | The ID of the resource, of type MENU_BAR from which the menu title array is created. This is optional. By default it's nil. |
IMPORT_C void | Draw | ( | const TRect & | aRect | ) | const [virtual] |
Reimplemented from CEikBorderedControl::Draw(const TRect &)const
From CCoeControl
Not implemented.
IMPORT_C void | GetColorUseListL | ( | CArrayFix< TCoeColorUse > & | aColorUseList | ) | const [virtual] |
Reimplemented from CEikBorderedControl::GetColorUseListL(CArrayFix< TCoeColorUse > &)const
From CCoeControl.
Gets the list of logical colours used to draw the control.
The list includes an explanation of how each colour is used. By default, this function has an empty implementation.
Parameter | Description |
---|---|
aColorUseList | The colour list. |
IMPORT_C CEikMenuBar::TMenuType | GetMenuType | ( | ) | const |
Gets type of the menu.
Returns: the type defined in CEikMenuBar::TMenuType of menu.
IMPORT_C void | HandlePointerEventL | ( | const TPointerEvent & | aPointerEvent | ) | [virtual] |
Reimplemented from CEikBorderedControl::HandlePointerEventL(const TPointerEvent &)
From CCoeControl
Handles pointer events. This function gets called whenever a pointer event occurs in the control, i.e. when the pointer is within the control's extent, or when the control has grabbed the pointer. The control should implement this function to handle pointer events.
Note: events of type EButton1Down are processed before HandlePointerEventL() is called, in order to transfer keyboard focus to the control in which the EButton1Down event occurred.
If overriding HandlePointerEventL(), the implementation must include a base call to CCoeControl's HandlePointerEventL().
Parameter | Description |
---|---|
aPointerEvent | The pointer event. |
IMPORT_C void | HandleResourceChange | ( | TInt | aType | ) | [virtual] |
Reimplemented from CEikBorderedControl::HandleResourceChange(TInt)
From CCoeControl.
Handles a change to the control's resources.
The types of resources handled are those which are shared across the environment, e.g. colours or fonts.
Parameter | Description |
---|---|
aType | A message UID value. The most common is KEikMessageColorSchemeChange which controls get when the colour scheme is changed. Other examples include: KEikMessageFadeAllWindows, KEikMessageUnfadeWindows, KEikMessageZoomChange, KEikMessageVirtualCursorStateChange, KEikMessageCapsLock, KEikMessagePrepareForSave. |
CEikHotKeyTable * | HotKeyTable | ( | ) | const [inline] |
Gets a pointer to the menu s hot key table.
IMPORT_C TBool | IsDisplayed | ( | ) |
Allows the client to determine if the menubar instance is displayed.
Returns: Etrue if displayed and EFalse if not.
IMPORT_C TBool | ItemSpecificCommandsEnabled | ( | ) | const |
Returns ETrue when item specific commands are enabled in menu bar (main pane collection has a highlight) and EFalse when they are disabled (main pane collection does not have a highlight).
Returns: ETrue when item specific commands are enabled.
IMPORT_C CEikMenuPane * | MenuPane | ( | ) |
Gets a menu pane resource.
Returns: The pointer to CEikMenuPane object containing a menu pane resource.
IMPORT_C TKeyResponse | OfferKeyEventL | ( | const TKeyEvent & | aKeyEvent, |
TEventCode | aType | |||
) | [virtual] |
Reimplemented from CCoeControl::OfferKeyEventL(const TKeyEvent &,TEventCode)
From CCoeControl
Handles key events offered to the menu by the control environment and provides an appropriate implementation of CCoeControl::OfferKeyEventL().
Parameter | Description |
---|---|
aKeyEvent | The key event. |
aType | The type of key event: EEventKey, EEventKeyUp or EEventKeyDown. |
Returns: Indicates whether or not the key event was used by this control.
CEikMenuPane * | PopulateItemActionMenuL | ( | CAknItemActionMenu & | aItemActionMenu | ) |
Populates item action menu.
IMPORT_C void | ReduceRect | ( | TRect & | aRect | ) | const |
If the menu bar is visible, removes the menu bar height from the top of aRect and returns the new rectangle in a new value of aRect.
Parameter | Description |
---|---|
aRect | A rectangle that on return is reduced in height by the height of the menu bar. |
IMPORT_C void | RemoveEditMenuObserver | ( | MEikMenuObserver * | aEditMenuObserver | ) |
Sets the menu observer interface to NULL.
Parameter | Description |
---|---|
aEditMenuObserver | Menu observer interface that will be set to NULL. |
IMPORT_C TInt | SelectedItem | ( | ) |
Gets the index of the menu item selected by the cursor.
Returns: The index of the selected menu item.
IMPORT_C TInt | SelectedTitle | ( | ) |
Gets the index of the menu pane selected by the cursor.
Returns: The index of the selected menu pane.
IMPORT_C void | SetContextMenuTitleResourceId | ( | TInt | aMenuTitleResourceId | ) |
IMPORT_C void | SetEditMenuObserver | ( | MEikMenuObserver * | aEditMenuObserver | ) |
Sets menu observer interface.
Parameter | Description |
---|---|
aEditMenuObserver | Menu observer interface. |
IMPORT_C CEikHotKeyTable * | SetHotKeyTable | ( | CEikHotKeyTable * | aHotKeyTable | ) |
Not implemented!
Parameter | Description |
---|---|
aHotKeyTable | Not used. |
Returns: NULL.
void | SetItemActionMenu | ( | CAknItemActionMenu * | aItemActionMenu | ) |
Sets item action menu instance to menu bar.
IMPORT_C void | SetMenuTitleArray | ( | CTitleArray * | aTitleArray | ) |
Not implemented.
Parameter | Description |
---|---|
aTitleArray | Not used. |
IMPORT_C void | SetMenuTitleResourceId | ( | TInt | aMenuTitleResourceId | ) |
Sets the menu s resource ID.
Parameter | Description |
---|---|
aMenuTitleResourceId | The ID of the resource to use. |
IMPORT_C void | SetMenuType | ( | TMenuType | aMenuType | ) |
Parameter | Description |
---|---|
aMenuType | One of values of CEikMenuBar::TMenuType enumeration. |
IMPORT_C void | SetTitleArrayOwnedExternally | ( | TBool | aOwnedExternally | ) |
Not implemented.
Parameter | Description |
---|---|
aOwnedExternally | Not used. |
IMPORT_C void | StopDisplayingMenuBar | ( | ) |
Stops displaying the menu bar.
This function causes the menu bar to disappear from the screen until it is invoked again by the user. In most circumstances this is done by the Uikon framework, so an application program will not normally need to use this function.
IMPORT_C CTitleArray * | TitleArray | ( | ) |
Gets array of information about the menu bar titles.
Returns: Pointer to CTitleArray object containing array of information about menu bar titles.
IMPORT_C void | TryDisplayMenuBarL | ( | ) |
Displays the menu bar.
If the menu is not already displayed, this function displays the menu bar and allows the user to make a selection. In most circumstances this is done by the Uikon framework, so an application program will not normally need to use this function.
IMPORT_C void | TryDisplayMenuBarWithoutFepMenusL | ( | ) |
If the menu is not already displayed, this function displays the menu bar without fep menu and allows the user to make a selection. In most circumstances this is done by the Uikon framework, so an application program will not normally need to use this function.