1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #ifndef __EIKCMOBS_H__
17 #define __EIKCMOBS_H__
23 /** Command observers respond to user commands, and have the secondary function
24 of creating custom controls on request for classes such as CEikToolbar, or
27 An implementation of the pure virtual function ProcessCommandL() must be provided
28 for each concrete class derived from MEikCommandObserver. CreateCustomCommandControlL()
29 may also be re-implemented.
33 class MEikCommandObserver
36 /** Processes user commands.
38 Derived classes must provide an implementation of this function which responds
39 to user commands appropriately based on a user-defined ID for the command.
41 @param aCommandId ID of the command to respond to. */
42 virtual void ProcessCommandL(TInt aCommandId)=0;
43 /** Glue for creating custom controls.
45 This function can be called to create custom controls on request from their
46 control ID. Custom controls are user-supplied control classes.
48 Given the ID of a custom control, this function should return a pointer to
49 a newly-instantiated and fully constructed control. If the ID is unrecognised,
50 NULL should be returned. The control returned will be owned by the caller.
52 @param aControlType A custom control ID.
53 @return By default, NULL. */
54 IMPORT_C virtual CCoeControl* CreateCustomCommandControlL(TInt aControlType);
56 IMPORT_C MEikCommandObserver();
58 IMPORT_C virtual void MEikCommandObserver_Reserved1();
59 IMPORT_C virtual void MEikCommandObserver_Reserved2();
61 TInt iMEikCommandObserver_Reserved1;
64 #endif // __EIKCMOBS_H__