williamr@2: // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@2: // All rights reserved. williamr@2: // This component and the accompanying materials are made available williamr@2: // 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 williamr@2: // which accompanies this distribution, and is available williamr@2: // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". williamr@2: // williamr@2: // Initial Contributors: williamr@2: // Nokia Corporation - initial contribution. williamr@2: // williamr@2: // Contributors: williamr@2: // williamr@2: // Description: williamr@2: // williamr@2: williamr@2: #ifndef __EIKCMOBS_H__ williamr@2: #define __EIKCMOBS_H__ williamr@2: williamr@2: #include williamr@2: williamr@2: class CCoeControl; williamr@2: williamr@2: /** Command observers respond to user commands, and have the secondary function williamr@2: of creating custom controls on request for classes such as CEikToolbar, or williamr@2: user-defined classes. williamr@2: williamr@2: An implementation of the pure virtual function ProcessCommandL() must be provided williamr@2: for each concrete class derived from MEikCommandObserver. CreateCustomCommandControlL() williamr@2: may also be re-implemented. williamr@2: williamr@2: @publishedAll williamr@2: @released */ williamr@2: class MEikCommandObserver williamr@2: { williamr@2: public: williamr@2: /** Processes user commands. williamr@2: williamr@2: Derived classes must provide an implementation of this function which responds williamr@2: to user commands appropriately based on a user-defined ID for the command. williamr@2: williamr@2: @param aCommandId ID of the command to respond to. */ williamr@2: virtual void ProcessCommandL(TInt aCommandId)=0; williamr@2: /** Glue for creating custom controls. williamr@2: williamr@2: This function can be called to create custom controls on request from their williamr@2: control ID. Custom controls are user-supplied control classes. williamr@2: williamr@2: Given the ID of a custom control, this function should return a pointer to williamr@2: a newly-instantiated and fully constructed control. If the ID is unrecognised, williamr@2: NULL should be returned. The control returned will be owned by the caller. williamr@2: williamr@2: @param aControlType A custom control ID. williamr@2: @return By default, NULL. */ williamr@2: IMPORT_C virtual CCoeControl* CreateCustomCommandControlL(TInt aControlType); williamr@2: protected: williamr@2: IMPORT_C MEikCommandObserver(); williamr@2: private: williamr@2: IMPORT_C virtual void MEikCommandObserver_Reserved1(); williamr@2: IMPORT_C virtual void MEikCommandObserver_Reserved2(); williamr@2: private: williamr@2: TInt iMEikCommandObserver_Reserved1; williamr@2: }; williamr@2: williamr@2: #endif // __EIKCMOBS_H__