MEikAutoMenuObserver Class Reference
class MEikAutoMenuObserver : public MEikMenuObserver |
Provides additional functionality to an auto menu title, in the form of an OfferHotKeyL() method, which is not required in the normal MEikMenuObserver.
Auto menu titles are used to ensure that some menu panes appear in every menu constructed for an application.
Public Member Functions |
---|
IMPORT_C TBool | CheckHotKeyNotDimmedL(TInt) |
IMPORT_C CCoeControl * | CreateCustomCommandControlL(TInt) |
IMPORT_C void | DynInitMenuBarL(TInt, CEikMenuBar *) |
IMPORT_C void | DynInitMenuPaneL(TInt, CEikMenuPane *) |
IMPORT_C void | HandleAttemptDimmedSelectionL(TInt) |
IMPORT_C void | HandleSideBarMenuL(TInt, const TPoint &, TInt, const CEikHotKeyTable *) |
TKeyResponse
| OfferHotKeyL(const TKeyEvent &, TEventCode) |
IMPORT_C void | OfferKeyToAppL(const TKeyEvent &, TEventCode) |
IMPORT_C void | RestoreMenuL(CCoeControl *, TInt, TMenuType) |
IMPORT_C void | SetEmphasis(CCoeControl *, TBool) |
Constructor & Destructor Documentation
MEikAutoMenuObserver()
IMPORT_C | MEikAutoMenuObserver | ( | ) | [protected] |
Member Functions Documentation
CheckHotKeyNotDimmedL(TInt)
IMPORT_C TBool | CheckHotKeyNotDimmedL | ( | TInt | aCommandId | ) | [virtual] |
Determines whether a command should be passed to the application.
Applications can choose whether to respond to a hotkey event that corresponds to a dimmed item. This function is called when a recognised key press is offered to a menu bar or a menu pane to determine whether to send the corresponding command.
Parameters
TInt aCommandId | The command corresponding to the selected hotkey. |
CreateCustomCommandControlL(TInt)
IMPORT_C CCoeControl * | CreateCustomCommandControlL | ( | TInt | aControlType | ) | [virtual] |
Parameters
TInt aControlType | A custom control ID. |
DynInitMenuBarL(TInt, CEikMenuBar *)
IMPORT_C void | DynInitMenuBarL | ( | TInt | aResourceId, |
| CEikMenuBar * | aMenuBar |
| ) | [virtual] |
Parameters
TInt aResourceId | |
CEikMenuBar * aMenuBar | The in-memory representation of the menu bar. |
DynInitMenuPaneL(TInt, CEikMenuPane *)
IMPORT_C void | DynInitMenuPaneL | ( | TInt | aResourceId, |
| CEikMenuPane * | aMenuPane |
| ) | [virtual] |
Dynamically initialises a menu pane.
The Uikon framework calls this function, if it is implemented in a menu's observer, immediately before the menu pane is activated.
Typically this function should inquire the value of application data, and initialise menu items accordingly. This includes dimming menu items, changing their text, setting the state of checked items and radio buttons and dynamically adding items to a menu.
Parameters
TInt aResourceId | |
CEikMenuPane * aMenuPane | The in-memory representation of the menu pane. |
HandleAttemptDimmedSelectionL(TInt)
IMPORT_C void | HandleAttemptDimmedSelectionL | ( | TInt | aCommandId | ) | [virtual] |
Responds to a user's attempt to select a dimmed item by displaying a message (CEikonEnv::InfoMsg()) to indicate the item is unavailable.
Parameters
TInt aCommandId | Command ID for the menu item. |
HandleSideBarMenuL(TInt, const TPoint &, TInt, const CEikHotKeyTable *)
IMPORT_C void | HandleSideBarMenuL | ( | TInt | aResourceId, |
| const TPoint & | aPos, |
| TInt | aModifiers, |
| const CEikHotKeyTable * | aTable |
| ) | [virtual] |
This function is invoked by CEikMenuBar's input handling functions.
It may be overridden to handle displaying menus launched from the side bar.
Parameters
TInt aResourceId | Resource ID identifying the menu to launch. |
const TPoint & aPos | Position of the menu's reference point. For sidebar menus, this is the top-right corner. |
TInt aModifiers | Key modifiers held when the menu was invoked. |
const CEikHotKeyTable * aTable | The menu bar's hotkey items. |
MEikCommandObserver_Reserved1()
IMPORT_C void | MEikCommandObserver_Reserved1 | ( | ) | [private, virtual] |
MEikCommandObserver_Reserved2()
IMPORT_C void | MEikCommandObserver_Reserved2 | ( | ) | [private, virtual] |
OfferHotKeyL(const TKeyEvent &, TEventCode)
Offers the specified hot key to the auto menu title.
Implement this function if you expect to handle any events from an auto menu.
OfferKeyToAppL(const TKeyEvent &, TEventCode)
Called if a key which is not used by the menu is pressed while the observer's menu is displaying.
Parameters
const TKeyEvent & aKeyEvent | The key event the menu is offering to the app. |
TEventCode aType | Event code type. |
Reserved_1_MenuObserver()
IMPORT_C void | Reserved_1_MenuObserver | ( | ) | [private, virtual] |
Reserved_2_MenuObserver()
IMPORT_C void | Reserved_2_MenuObserver | ( | ) | [private, virtual] |
RestoreMenuL(CCoeControl *, TInt, TMenuType)
Restores the menu window aMenuWindow.
Parameters
CCoeControl * aMenuControl | The menu window to be restored. |
TInt aResourceId | The menu's ID. |
TMenuType aType | The type of menu being restored. |
SetEmphasis(CCoeControl *, TBool)
Sets the specified control's emphasis.
Parameters
CCoeControl * aMenuControl | The control for which emphasis is set. |
TBool aEmphasis | If ETrue the menu is emphasised. If EFalse the menu is not emphasised. |
Member Data Documentation
TInt
iMEikAutoMenuObserver_Spare1
TInt
| iMEikAutoMenuObserver_Spare1 | [private] |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.