epoc32/include/eikamnt.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 __EIKAMNT_H__
    17 #define __EIKAMNT_H__
    18 
    19 #include <e32base.h>
    20 
    21 class CGulIcon;
    22 class MEikAutoMenuObserver;
    23 
    24 /** A menu title that will be added to a standard resource-constructed menu bar. 
    25 
    26 If added to the CEikAutoMenuTitleArray stored by CEikonEnv during standard 
    27 application start up, the menu pane specified will appear in all applications. 
    28 The menu observer passed in is notified of any events on such menu panes in 
    29 preference to the usual observer (C<MyApp>AppUi). 
    30 
    31 @publishedAll 
    32 @released */
    33 NONSHARABLE_CLASS(CEikAutoMenuTitle) : public CBase
    34 	{
    35 public:
    36 	/** Specifies the position of a menu title in a menu. 
    37 
    38 	If an array of menu titles holds more than one menu title that is specified 
    39 	for the start or end of a menu, the menu titles are placed in the same order 
    40 	as that in which they appear in the array. This means the first menu title 
    41 	specified with EStart in an array will be the first on a menu bar and the last 
    42 	EEnd will be the last on a menu bar. */
    43 	enum TTitlePos
    44 		{
    45 		/** The menu title is placed first in a menu. */
    46 		EStart,
    47 		/** The menu title is placed last in a menu. */
    48 		EEnd
    49 		};
    50 	enum { ENominalTextLength=40 };
    51 public:
    52 	IMPORT_C static CEikAutoMenuTitle* NewLC(TTitlePos aPos, const TDesC& aText, MEikAutoMenuObserver& aMenuObserver,
    53 										TInt aMenuPaneResourceId = 0, CGulIcon* aIcon = NULL);
    54 	IMPORT_C ~CEikAutoMenuTitle();
    55 private:
    56 	CEikAutoMenuTitle(TTitlePos aPos, const TDesC& aText, MEikAutoMenuObserver& aMenuObserver,
    57 						TInt aMenuPaneResourceId, CGulIcon* aIcon);
    58 public:
    59 	TTitlePos iPos;
    60 	TBuf<ENominalTextLength> iText;
    61 	MEikAutoMenuObserver& iMenuObserver;
    62 	TInt iMenuPaneResourceId;
    63 	CGulIcon* iIcon;
    64 	};
    65 
    66 
    67 /** Creates a standard array of CEikAutoMenuTitle objects. 
    68 
    69 @publishedPartner 
    70 @released */
    71 NONSHARABLE_CLASS(CEikAutoMenuTitleArray) : public CArrayPtrFlat<CEikAutoMenuTitle>
    72 // If more than one title is specified for the start or end, they will be placed in the same order they appear
    73 // in the array (so the first EStart in the array will be the first on a menu bar also but the last EEnd will
    74 // be the last).
    75 	{
    76 public:
    77 	CEikAutoMenuTitleArray();
    78 	~CEikAutoMenuTitleArray();
    79 	};
    80 
    81 #endif	// __EIKAMNT_H__