epoc32/include/mw/eikamnt.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 3 e1b950c65cb4
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     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 "Eclipse Public License v1.0"
     5 // which accompanies this distribution, and is available
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.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 #ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
    22 #include <uikon/eikautomenutitlearray.h>
    23 #endif
    24 
    25 class CGulIcon;
    26 class MEikAutoMenuObserver;
    27 
    28 /** A menu title that will be added to a standard resource-constructed menu bar. 
    29 
    30 If added to the CEikAutoMenuTitleArray stored by CEikonEnv during standard 
    31 application start up, the menu pane specified will appear in all applications. 
    32 The menu observer passed in is notified of any events on such menu panes in 
    33 preference to the usual observer (C<MyApp>AppUi). 
    34 
    35 @publishedAll 
    36 @released */
    37 NONSHARABLE_CLASS(CEikAutoMenuTitle) : public CBase
    38 	{
    39 public:
    40 	/** Specifies the position of a menu title in a menu. 
    41 
    42 	If an array of menu titles holds more than one menu title that is specified 
    43 	for the start or end of a menu, the menu titles are placed in the same order 
    44 	as that in which they appear in the array. This means the first menu title 
    45 	specified with EStart in an array will be the first on a menu bar and the last 
    46 	EEnd will be the last on a menu bar. */
    47 	enum TTitlePos
    48 		{
    49 		/** The menu title is placed first in a menu. */
    50 		EStart,
    51 		/** The menu title is placed last in a menu. */
    52 		EEnd
    53 		};
    54 	enum { ENominalTextLength=40 };
    55 public:
    56 	IMPORT_C static CEikAutoMenuTitle* NewLC(TTitlePos aPos, const TDesC& aText, MEikAutoMenuObserver& aMenuObserver,
    57 										TInt aMenuPaneResourceId = 0, CGulIcon* aIcon = NULL);
    58 	IMPORT_C ~CEikAutoMenuTitle();
    59 private:
    60 	CEikAutoMenuTitle(TTitlePos aPos, const TDesC& aText, MEikAutoMenuObserver& aMenuObserver,
    61 						TInt aMenuPaneResourceId, CGulIcon* aIcon);
    62 public:
    63 	TTitlePos iPos;
    64 	TBuf<ENominalTextLength> iText;
    65 	MEikAutoMenuObserver& iMenuObserver;
    66 	TInt iMenuPaneResourceId;
    67 	CGulIcon* iIcon;
    68 	};
    69 
    70 #endif	// __EIKAMNT_H__