MEikCommandObserver Class Reference

#include <mw/eikcmobs.h>

class MEikCommandObserver
Public Member Functions
virtual IMPORT_C CCoeControl *CreateCustomCommandControlL(TInt)
pure virtual voidProcessCommandL(TInt)
Protected Member Functions
MEikCommandObserver()

Detailed Description

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 classes.

An implementation of the pure virtual function ProcessCommandL() must be provided for each concrete class derived from MEikCommandObserver. CreateCustomCommandControlL() may also be re-implemented.

Constructor & Destructor Documentation

MEikCommandObserver ( )

IMPORT_CMEikCommandObserver()[protected]

Constructor for MEikCommandObserver

Member Function Documentation

CreateCustomCommandControlL ( TInt )

IMPORT_C CCoeControl *CreateCustomCommandControlL(TIntaControlType)[virtual]

Glue for creating custom controls.

This function can be called to create custom controls on request from their control ID. Custom controls are user-supplied control classes.

Given the ID of a custom control, this function should return a pointer to a newly-instantiated and fully constructed control. If the ID is unrecognised, NULL should be returned. The control returned will be owned by the caller.

Parameters
aControlTypeA custom control ID.
Return Value
By default, NULL.

ProcessCommandL ( TInt )

voidProcessCommandL(TIntaCommandId)[pure virtual]

Processes user commands.

Derived classes must provide an implementation of this function which responds to user commands appropriately based on a user-defined ID for the command.

Parameters
aCommandIdID of the command to respond to.