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
williamr@2
     1
// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
williamr@2
     2
// All rights reserved.
williamr@2
     3
// This component and the accompanying materials are made available
williamr@2
     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
williamr@2
     5
// which accompanies this distribution, and is available
williamr@2
     6
// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
williamr@2
     7
//
williamr@2
     8
// Initial Contributors:
williamr@2
     9
// Nokia Corporation - initial contribution.
williamr@2
    10
//
williamr@2
    11
// Contributors:
williamr@2
    12
//
williamr@2
    13
// Description:
williamr@2
    14
//
williamr@2
    15
williamr@2
    16
#ifndef __EIKAMNT_H__
williamr@2
    17
#define __EIKAMNT_H__
williamr@2
    18
williamr@2
    19
#include <e32base.h>
williamr@2
    20
williamr@2
    21
class CGulIcon;
williamr@2
    22
class MEikAutoMenuObserver;
williamr@2
    23
williamr@2
    24
/** A menu title that will be added to a standard resource-constructed menu bar. 
williamr@2
    25
williamr@2
    26
If added to the CEikAutoMenuTitleArray stored by CEikonEnv during standard 
williamr@2
    27
application start up, the menu pane specified will appear in all applications. 
williamr@2
    28
The menu observer passed in is notified of any events on such menu panes in 
williamr@2
    29
preference to the usual observer (C<MyApp>AppUi). 
williamr@2
    30
williamr@2
    31
@publishedAll 
williamr@2
    32
@released */
williamr@2
    33
NONSHARABLE_CLASS(CEikAutoMenuTitle) : public CBase
williamr@2
    34
	{
williamr@2
    35
public:
williamr@2
    36
	/** Specifies the position of a menu title in a menu. 
williamr@2
    37
williamr@2
    38
	If an array of menu titles holds more than one menu title that is specified 
williamr@2
    39
	for the start or end of a menu, the menu titles are placed in the same order 
williamr@2
    40
	as that in which they appear in the array. This means the first menu title 
williamr@2
    41
	specified with EStart in an array will be the first on a menu bar and the last 
williamr@2
    42
	EEnd will be the last on a menu bar. */
williamr@2
    43
	enum TTitlePos
williamr@2
    44
		{
williamr@2
    45
		/** The menu title is placed first in a menu. */
williamr@2
    46
		EStart,
williamr@2
    47
		/** The menu title is placed last in a menu. */
williamr@2
    48
		EEnd
williamr@2
    49
		};
williamr@2
    50
	enum { ENominalTextLength=40 };
williamr@2
    51
public:
williamr@2
    52
	IMPORT_C static CEikAutoMenuTitle* NewLC(TTitlePos aPos, const TDesC& aText, MEikAutoMenuObserver& aMenuObserver,
williamr@2
    53
										TInt aMenuPaneResourceId = 0, CGulIcon* aIcon = NULL);
williamr@2
    54
	IMPORT_C ~CEikAutoMenuTitle();
williamr@2
    55
private:
williamr@2
    56
	CEikAutoMenuTitle(TTitlePos aPos, const TDesC& aText, MEikAutoMenuObserver& aMenuObserver,
williamr@2
    57
						TInt aMenuPaneResourceId, CGulIcon* aIcon);
williamr@2
    58
public:
williamr@2
    59
	TTitlePos iPos;
williamr@2
    60
	TBuf<ENominalTextLength> iText;
williamr@2
    61
	MEikAutoMenuObserver& iMenuObserver;
williamr@2
    62
	TInt iMenuPaneResourceId;
williamr@2
    63
	CGulIcon* iIcon;
williamr@2
    64
	};
williamr@2
    65
williamr@2
    66
williamr@2
    67
/** Creates a standard array of CEikAutoMenuTitle objects. 
williamr@2
    68
williamr@2
    69
@publishedPartner 
williamr@2
    70
@released */
williamr@2
    71
NONSHARABLE_CLASS(CEikAutoMenuTitleArray) : public CArrayPtrFlat<CEikAutoMenuTitle>
williamr@2
    72
// If more than one title is specified for the start or end, they will be placed in the same order they appear
williamr@2
    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
williamr@2
    74
// be the last).
williamr@2
    75
	{
williamr@2
    76
public:
williamr@2
    77
	CEikAutoMenuTitleArray();
williamr@2
    78
	~CEikAutoMenuTitleArray();
williamr@2
    79
	};
williamr@2
    80
williamr@2
    81
#endif	// __EIKAMNT_H__