epoc32/include/eikcmobs.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
permissions -rw-r--r--
Final list of Symbian^2 public API header files
     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".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 #ifndef __EIKCMOBS_H__
    17 #define __EIKCMOBS_H__
    18 
    19 #include <e32def.h>
    20 
    21 class CCoeControl;
    22 
    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 
    25 user-defined classes.
    26 
    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. 
    30 
    31 @publishedAll 
    32 @released */
    33 class MEikCommandObserver
    34 	{
    35 public:
    36 	/** Processes user commands.
    37 	
    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.
    40 	
    41 	@param aCommandId ID of the command to respond to. */
    42 	virtual void ProcessCommandL(TInt aCommandId)=0;
    43 	/** Glue for creating custom controls.
    44 	
    45 	This function can be called to create custom controls on request from their 
    46 	control ID. Custom controls are user-supplied control classes.
    47 	
    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.
    51 	
    52 	@param aControlType A custom control ID. 
    53 	@return By default, NULL. */
    54 	IMPORT_C virtual CCoeControl* CreateCustomCommandControlL(TInt aControlType);
    55 protected:
    56 	IMPORT_C MEikCommandObserver();
    57 private:
    58 	IMPORT_C virtual void MEikCommandObserver_Reserved1();
    59 	IMPORT_C virtual void MEikCommandObserver_Reserved2();
    60 private:
    61 	TInt iMEikCommandObserver_Reserved1;
    62 	};
    63 
    64 #endif	// __EIKCMOBS_H__