Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <EIKMOBS.H>
Link against: eikcore.lib

Class MEikAutoMenuObserver

class MEikAutoMenuObserver : public MEikMenuObserver;

Description

Provides additional functionality to an auto menu title, in the form of an MEikAutoMenuObserver::OfferHotKeyL(const TKeyEvent &,TEventCode) 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.

Derivation

Members

Defined in MEikAutoMenuObserver:

Inherited from MEikCommandObserver:

Inherited from MEikMenuObserver:


Construction and destruction


MEikAutoMenuObserver()

protected: IMPORT_C MEikAutoMenuObserver();

Description

[Top]


Member functions


OfferHotKeyL(const TKeyEvent &,TEventCode)

virtual TKeyResponse OfferHotKeyL(const TKeyEvent &aKeyEvent, TEventCode aType)=0;

Description

Offers the specified hot key to the auto menu title.

Implement this function if you expect to handle any events from an auto menu.

Parameters

const TKeyEvent &aKeyEvent

The key event.

TEventCode aType

The type of key event.

Return value

TKeyResponse

The auto menu title's response.


SetEmphasis(CCoeControl *,TBool)

IMPORT_C virtual void SetEmphasis(CCoeControl *aMenuControl, TBool aEmphasis);

Description

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.


HandleAttemptDimmedSelectionL(TInt)

IMPORT_C virtual void HandleAttemptDimmedSelectionL(TInt aCommandId);

Description

Responds to a user's attempt to select a dimmed item by displaying a message (CEikonEnv::InfoMsg(const TDesC &)) to indicate the item is unavailable.

Parameters

TInt aCommandId

Command ID for the menu item.


CheckHotKeyNotDimmedL(TInt)

IMPORT_C virtual TBool CheckHotKeyNotDimmedL(TInt aCommandId);

Description

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.

Return value

TBool

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.


RestoreMenuL(CCoeControl *,TInt,TMenuType)

IMPORT_C virtual void RestoreMenuL(CCoeControl *aMenuControl, TInt aResourceId, TMenuType aType);

Description

Restores the menu window aMenuWindow.

Parameters

CCoeControl *aMenuControl

TInt aResourceId

MEikMenuObserver::TMenuType aType


DynInitMenuPaneL(TInt,CEikMenuPane *)

IMPORT_C virtual void DynInitMenuPaneL(TInt aResourceId, CEikMenuPane *aMenuPane);

Description

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.


DynInitMenuBarL(TInt,CEikMenuBar *)

IMPORT_C virtual void DynInitMenuBarL(TInt aResourceId, CEikMenuBar *aMenuBar);

Description

As MEikAutoMenuObserver::DynInitMenuPaneL(TInt,CEikMenuPane *), but for menu bars.

Parameters

TInt aResourceId

CEikMenuBar *aMenuBar

The in-memory representation of the menu bar.


HandleSideBarMenuL(TInt,const TPoint &,TInt,const CEikHotKeyTable *)

IMPORT_C virtual void HandleSideBarMenuL(TInt aResourceId, const TPoint &aPos, TInt aModifiers, const CEikHotKeyTable *aTable);

Description

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.


OfferKeyToAppL(const TKeyEvent &,TEventCode)

IMPORT_C virtual void OfferKeyToAppL(const TKeyEvent &aKeyEvent, TEventCode aType);

Description

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.


CreateCustomCommandControlL(TInt)

IMPORT_C virtual CCoeControl* CreateCustomCommandControlL(TInt aControlType);

Description

This functions simpy wraps MEikCommandObserver::CreateCustomCommandControlL(TInt)

Parameters

TInt aControlType

A custom control ID.

Return value

CCoeControl *

See also:


Reserved_1_MenuObserver()

private: IMPORT_C virtual void Reserved_1_MenuObserver();

Description


Reserved_2_MenuObserver()

private: IMPORT_C virtual void Reserved_2_MenuObserver();

Description


MEikCommandObserver_Reserved1()

private: IMPORT_C virtual void MEikCommandObserver_Reserved1();

Description

Reserved for Future use


MEikCommandObserver_Reserved2()

private: IMPORT_C virtual void MEikCommandObserver_Reserved2();

Description

Reserved for Future use