1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/epoc32/include/mw/eikamnt.h Wed Mar 31 12:27:01 2010 +0100
1.3 @@ -0,0 +1,81 @@
1.4 +// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// 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.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +//
1.18 +
1.19 +#ifndef __EIKAMNT_H__
1.20 +#define __EIKAMNT_H__
1.21 +
1.22 +#include <e32base.h>
1.23 +
1.24 +class CGulIcon;
1.25 +class MEikAutoMenuObserver;
1.26 +
1.27 +/** A menu title that will be added to a standard resource-constructed menu bar.
1.28 +
1.29 +If added to the CEikAutoMenuTitleArray stored by CEikonEnv during standard
1.30 +application start up, the menu pane specified will appear in all applications.
1.31 +The menu observer passed in is notified of any events on such menu panes in
1.32 +preference to the usual observer (C<MyApp>AppUi).
1.33 +
1.34 +@publishedAll
1.35 +@released */
1.36 +NONSHARABLE_CLASS(CEikAutoMenuTitle) : public CBase
1.37 + {
1.38 +public:
1.39 + /** Specifies the position of a menu title in a menu.
1.40 +
1.41 + If an array of menu titles holds more than one menu title that is specified
1.42 + for the start or end of a menu, the menu titles are placed in the same order
1.43 + as that in which they appear in the array. This means the first menu title
1.44 + specified with EStart in an array will be the first on a menu bar and the last
1.45 + EEnd will be the last on a menu bar. */
1.46 + enum TTitlePos
1.47 + {
1.48 + /** The menu title is placed first in a menu. */
1.49 + EStart,
1.50 + /** The menu title is placed last in a menu. */
1.51 + EEnd
1.52 + };
1.53 + enum { ENominalTextLength=40 };
1.54 +public:
1.55 + IMPORT_C static CEikAutoMenuTitle* NewLC(TTitlePos aPos, const TDesC& aText, MEikAutoMenuObserver& aMenuObserver,
1.56 + TInt aMenuPaneResourceId = 0, CGulIcon* aIcon = NULL);
1.57 + IMPORT_C ~CEikAutoMenuTitle();
1.58 +private:
1.59 + CEikAutoMenuTitle(TTitlePos aPos, const TDesC& aText, MEikAutoMenuObserver& aMenuObserver,
1.60 + TInt aMenuPaneResourceId, CGulIcon* aIcon);
1.61 +public:
1.62 + TTitlePos iPos;
1.63 + TBuf<ENominalTextLength> iText;
1.64 + MEikAutoMenuObserver& iMenuObserver;
1.65 + TInt iMenuPaneResourceId;
1.66 + CGulIcon* iIcon;
1.67 + };
1.68 +
1.69 +
1.70 +/** Creates a standard array of CEikAutoMenuTitle objects.
1.71 +
1.72 +@publishedPartner
1.73 +@released */
1.74 +NONSHARABLE_CLASS(CEikAutoMenuTitleArray) : public CArrayPtrFlat<CEikAutoMenuTitle>
1.75 +// If more than one title is specified for the start or end, they will be placed in the same order they appear
1.76 +// in the array (so the first EStart in the array will be the first on a menu bar also but the last EEnd will
1.77 +// be the last).
1.78 + {
1.79 +public:
1.80 + CEikAutoMenuTitleArray();
1.81 + ~CEikAutoMenuTitleArray();
1.82 + };
1.83 +
1.84 +#endif // __EIKAMNT_H__