#include <mw/eikmobs.h>
class MEikAutoMenuObserver : public MEikMenuObserver |
Public Member Functions | |
---|---|
virtual IMPORT_C TBool | CheckHotKeyNotDimmedL(TInt) |
virtual IMPORT_C CCoeControl * | CreateCustomCommandControlL(TInt) |
virtual IMPORT_C void | DynInitMenuBarL(TInt, CEikMenuBar *) |
virtual IMPORT_C void | DynInitMenuPaneL(TInt, CEikMenuPane *) |
virtual IMPORT_C void | HandleAttemptDimmedSelectionL(TInt) |
virtual IMPORT_C void | HandleSideBarMenuL(TInt, const TPoint &, TInt, const CEikHotKeyTable *) |
pure virtual TKeyResponse | OfferHotKeyL(const TKeyEvent &, TEventCode) |
virtual IMPORT_C void | OfferKeyToAppL(const TKeyEvent &, TEventCode) |
virtual IMPORT_C void | RestoreMenuL(CCoeControl *, TInt, TMenuType) |
virtual IMPORT_C void | SetEmphasis(CCoeControl *, TBool) |
Protected Member Functions | |
---|---|
MEikAutoMenuObserver() |
Inherited Enumerations | |
---|---|
MEikMenuObserver:TMenuType |
Inherited Functions | |
---|---|
MEikCommandObserver::MEikCommandObserver() | |
MEikCommandObserver::ProcessCommandL(TInt) | |
MEikMenuObserver::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.
Reimplemented from MEikMenuObserver::CheckHotKeyNotDimmedL(TInt)
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.
Parameter | Description |
---|---|
aCommandId | The command corresponding to the selected hotkey. |
Returns: ETrue if the command should be passed to the application. This is the default. EFalse if the command should not be passed to the application.
IMPORT_C CCoeControl * | CreateCustomCommandControlL | ( | TInt | aControlType | ) | [virtual] |
Reimplemented from MEikMenuObserver::CreateCustomCommandControlL(TInt)
This functions simpy wraps MEikCommandObserver::CreateCustomCommandControlL(TInt aControlType)
See also: MEikCommandObserver::CreateCustomCommandControlL(TInt aControlType)
Parameter | Description |
---|---|
aControlType | A custom control ID. |
IMPORT_C void | DynInitMenuBarL | ( | TInt | aResourceId, |
CEikMenuBar * | aMenuBar | |||
) | [virtual] |
Reimplemented from MEikMenuObserver::DynInitMenuBarL(TInt,CEikMenuBar *)
As DynInitMenuPaneL(), but for menu bars.
Parameter | Description |
---|---|
aMenuBar | The in-memory representation of the menu bar. |
IMPORT_C void | DynInitMenuPaneL | ( | TInt | aResourceId, |
CEikMenuPane * | aMenuPane | |||
) | [virtual] |
Reimplemented from MEikMenuObserver::DynInitMenuPaneL(TInt,CEikMenuPane *)
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.
Parameter | Description |
---|---|
aMenuPane | The in-memory representation of the menu pane. |
IMPORT_C void | HandleAttemptDimmedSelectionL | ( | TInt | aCommandId | ) | [virtual] |
Reimplemented from MEikMenuObserver::HandleAttemptDimmedSelectionL(TInt)
Responds to a user's attempt to select a dimmed item by displaying a message (CEikonEnv::InfoMsg()) to indicate the item is unavailable.
Parameter | Description |
---|---|
aCommandId | Command ID for the menu item. |
IMPORT_C void | HandleSideBarMenuL | ( | TInt | aResourceId, |
const TPoint & | aPos, | |||
TInt | aModifiers, | |||
const CEikHotKeyTable * | aTable | |||
) | [virtual] |
Reimplemented from MEikMenuObserver::HandleSideBarMenuL(TInt,const TPoint &,TInt,const CEikHotKeyTable *)
This function is invoked by CEikMenuBar's input handling functions.
It may be overridden to handle displaying menus launched from the side bar.
Parameter | Description |
---|---|
aResourceId | Resource ID identifying the menu to launch. |
aPos | Position of the menu's reference point. For sidebar menus, this is the top-right corner. |
aModifiers | Key modifiers held when the menu was invoked. |
aTable | The menu bar's hotkey items. |
TKeyResponse | OfferHotKeyL | ( | const TKeyEvent & | aKeyEvent, |
TEventCode | aType | |||
) | [pure virtual] |
Offers the specified hot key to the auto menu title.
Implement this function if you expect to handle any events from an auto menu.
Parameter | Description |
---|---|
aKeyEvent | The key event. |
aType | The type of key event. |
Returns: The auto menu title's response.
IMPORT_C void | OfferKeyToAppL | ( | const TKeyEvent & | aKeyEvent, |
TEventCode | aType | |||
) | [virtual] |
Reimplemented from MEikMenuObserver::OfferKeyToAppL(const TKeyEvent &,TEventCode)
Called if a key which is not used by the menu is pressed while the observer's menu is displaying.
Parameter | Description |
---|---|
aKeyEvent | The key event the menu is offering to the app. |
aType | Event code type. |
IMPORT_C void | RestoreMenuL | ( | CCoeControl * | aMenuControl, |
TInt | aResourceId, | |||
TMenuType | aType | |||
) | [virtual] |
Reimplemented from MEikMenuObserver::RestoreMenuL(CCoeControl *,TInt,TMenuType)
Restores the menu window aMenuWindow.
Parameter | Description |
---|---|
aMenuControl | The menu window to be restored. |
aResourceId | The menu's ID. |
aType | The type of menu being restored. |
IMPORT_C void | SetEmphasis | ( | CCoeControl * | aMenuControl, |
TBool | aEmphasis | |||
) | [virtual] |
Reimplemented from MEikMenuObserver::SetEmphasis(CCoeControl *,TBool)
Sets the specified control's emphasis.
Parameter | Description |
---|---|
aMenuControl | The control for which emphasis is set. |
aEmphasis | If ETrue the menu is emphasised. If EFalse the menu is not emphasised. |