epoc32/include/eikcmobs.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
     1.1 --- a/epoc32/include/eikcmobs.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/eikcmobs.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,64 @@
     1.4 -eikcmobs.h
     1.5 +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.6 +// All rights reserved.
     1.7 +// This component and the accompanying materials are made available
     1.8 +// 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
     1.9 +// which accompanies this distribution, and is available
    1.10 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.11 +//
    1.12 +// Initial Contributors:
    1.13 +// Nokia Corporation - initial contribution.
    1.14 +//
    1.15 +// Contributors:
    1.16 +//
    1.17 +// Description:
    1.18 +//
    1.19 +
    1.20 +#ifndef __EIKCMOBS_H__
    1.21 +#define __EIKCMOBS_H__
    1.22 +
    1.23 +#include <e32def.h>
    1.24 +
    1.25 +class CCoeControl;
    1.26 +
    1.27 +/** Command observers respond to user commands, and have the secondary function 
    1.28 +of creating custom controls on request for classes such as CEikToolbar, or 
    1.29 +user-defined classes.
    1.30 +
    1.31 +An implementation of the pure virtual function ProcessCommandL() must be provided 
    1.32 +for each concrete class derived from MEikCommandObserver. CreateCustomCommandControlL() 
    1.33 +may also be re-implemented. 
    1.34 +
    1.35 +@publishedAll 
    1.36 +@released */
    1.37 +class MEikCommandObserver
    1.38 +	{
    1.39 +public:
    1.40 +	/** Processes user commands.
    1.41 +	
    1.42 +	Derived classes must provide an implementation of this function which responds 
    1.43 +	to user commands appropriately based on a user-defined ID for the command.
    1.44 +	
    1.45 +	@param aCommandId ID of the command to respond to. */
    1.46 +	virtual void ProcessCommandL(TInt aCommandId)=0;
    1.47 +	/** Glue for creating custom controls.
    1.48 +	
    1.49 +	This function can be called to create custom controls on request from their 
    1.50 +	control ID. Custom controls are user-supplied control classes.
    1.51 +	
    1.52 +	Given the ID of a custom control, this function should return a pointer to 
    1.53 +	a newly-instantiated and fully constructed control. If the ID is unrecognised, 
    1.54 +	NULL should be returned. The control returned will be owned by the caller.
    1.55 +	
    1.56 +	@param aControlType A custom control ID. 
    1.57 +	@return By default, NULL. */
    1.58 +	IMPORT_C virtual CCoeControl* CreateCustomCommandControlL(TInt aControlType);
    1.59 +protected:
    1.60 +	IMPORT_C MEikCommandObserver();
    1.61 +private:
    1.62 +	IMPORT_C virtual void MEikCommandObserver_Reserved1();
    1.63 +	IMPORT_C virtual void MEikCommandObserver_Reserved2();
    1.64 +private:
    1.65 +	TInt iMEikCommandObserver_Reserved1;
    1.66 +	};
    1.67 +
    1.68 +#endif	// __EIKCMOBS_H__