|
|
|||
Location:
QikTaskMenu.h
Link against: qikcore.lib
class CQikTaskMenu : public CBase, private MEikMenuObserver, public MQikCommandListOwner, public MQikCommandHandler, public MCoeFocusObserver;
A control that contains a collection of Tasks.
The class CQikTaskMenu is a control that contains a collection of Tasks. A Task is a configured DNL that launches another application or view. A Task can also launch a specified viewer with a given file and file syntax.
When the Task Menu is launched, the Tasks are displayed in a Menu Pane. When the user selects an item from the menu, the associated Task is executed and the Task Menu is closed. The Task Menu is not a regular control that is visible in the UI. The control is simply a piece of logic which uses the Menu Pane control to fulfill its purposes. The Task Menu is constructed using two resource structs, one for the commands used in the Menu Pane and one for the tasks associated with the commands. The commands in the Task Menu are specified in the same way as in CEikMenuPane, using QIK_COMMAND in the resource definition. Interaction with the Menu Pane is, however, different. The Task Menu handles the commands and launches the Tasks internally, though others may still observe the commands.
The following functionality can be used by the application developer: -Define the tasks that can be carried out, -Define the menu items to be displayed, -Add menu items, -Set the menu observer.
MCoeFocusObserver - Interface providing notification if any control gains or loses focus or is destroyedMQikCommandHandler - Interface for classes responsible of executing commandsMQikCommandListOwner - Interface for classes adding commandsMEikCommandObserver - Command observers respond to user commands, and have the secondary function of creating custom controls on request for classes such as CEikToolbar, or user-defined classesMEikMenuObserver - Menu observer interfaceCBase - Base class for all classes to be instantiated on the heapCQikTaskMenu - A control that contains a collection of TasksDefined in CQikTaskMenu:
AddMenuItemL(), HandleChangeInFocus(), HandleCommandL(), HandleDestructionOfFocusedItem(), LaunchMenuL(), LaunchTaskL(), MapCommandHandler(), NewL(), SetCommandDimmed(), SetInfoDimmedL(), SetMenuObserver(), SetTagL(), ~CQikTaskMenu()
Inherited from CBase:
Delete(),
Extension_(),
operator new()
Inherited from MEikCommandObserver:
ProcessCommandL()
Inherited from MEikMenuObserver:
CheckHotKeyNotDimmedL(),
CreateCustomCommandControlL(),
DynInitMenuBarL(),
DynInitMenuPaneL(),
EMenuBar,
EMenuPane,
HandleAttemptDimmedSelectionL(),
HandleSideBarMenuL(),
OfferKeyToAppL(),
RestoreMenuL(),
SetEmphasis(),
TMenuType
QIK_TASK_MENU_ENTRYQIK_COMMANDCQikTaskEntrystatic IMPORT_C CQikTaskMenu *NewL(TInt aCommandListId, TInt aTaskArrayId);
Stores aCommandListId, it is needed when the popup is displayed. Creates the TaskArray from aTaskArrayResId.
|
|
IMPORT_C void LaunchTaskL(const TDesC &aTaskBuf=KNullDesC);
If only one option is defined in the resource file, the task is launched instantly, otherwise the popup is displayed so the user can select one of the choices.
Be careful with the format of the aDnlPack, it is defined by the external interface for a specific application. For the parsers, we are only interested in the tagged potion of text so it does not matter that, for instance, the phoneparser uses the phone apps external interface when it creates a DNL for to messaging for creating an SMS.
|
IMPORT_C TInt AddMenuItemL(TInt aResourceId);
Adds a menu item to the menu pane. The owner can listen for menu commands using the MQikTaskMenuObserver.
|
|
IMPORT_C void SetMenuObserver(MQikTaskMenuObserver *aMenuObserver);
Sets the menu observer.
|
virtual void HandleDestructionOfFocusedItem();
If a focused item is deleted we assume that we don't need to delete our commands because the MQikCommandModelOwner(view/dialog) has been deleted.
IMPORT_C void LaunchMenuL(TDesC &aTaskBuf);
Checks if ui config mode is touch screen or not If touch screen, launch menu pane
|
virtual void HandleCommandL(CQikCommand &aCommand);
HandleCommandL from MQikCommandHandler Only forwards the command to ProcessCommandL
|
virtual MQikCommandHandler *MapCommandHandler(CQikCommand &);
Gets the QikCommandHandler Returns the correct QikCommandHandler, in this case this.
|
|
IMPORT_C void SetTagL(const TDesC &aTaskBuf);
Sets the tag that is used when DLN'ing to another app.
|
IMPORT_C void SetCommandDimmed(TInt aCommandId, TBool aDimmed=ETrue);
Sets the command with command id aCommandId to be aDimmed.
|
IMPORT_C void SetInfoDimmedL(TInt aCommandId, const TDesC &aInfo);
Sets the text for the command with id aCommandId that should be shown if the command is invoked when dimmed.
|