/* @(#)Z 1.21 com/src/ui/idl/MenuBar.idl, odui, od96nt, odnt9712d 97/03/21 16:49:41 (97/03/20 16:07:14) */
//====START_GENERATED_PROLOG======================================
//
//
//   COMPONENT_NAME: odui
//
//   CLASSES: none
//
//   ORIGINS: 82,27
//
//
//   (C) COPYRIGHT International Business Machines Corp. 1995,1996
//   All Rights Reserved
//   Licensed Materials - Property of IBM
//   US Government Users Restricted Rights - Use, duplication or
//   disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
//   	
//   IBM DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
//   ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
//   PURPOSE. IN NO EVENT SHALL IBM BE LIABLE FOR ANY SPECIAL, INDIRECT OR
//   CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
//   USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
//   OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
//   OR PERFORMANCE OF THIS SOFTWARE.
//
//====END_GENERATED_PROLOG========================================
//
//     Copyright:      (r) 1993 - 1995 by Apple Computer, Inc., all rights reserved.

#ifndef _MENUBAR_
#define _MENUBAR_

#ifndef _REFCTOBJ_
#include "RefCtObj.idl"
#endif

#if defined(_PLATFORM_OS2_) || defined(_PLATFORM_WIN32_) || defined(_PLATFORM_AIX_)

#ifndef _ODTYPESM_
#include "odtypesm.idl"
#endif

#endif // PLATFORM_OS2, PLATFORM_WIN32, PLATFORM_AIX

//=====================================================================================
// Classes defined in this interface
//=====================================================================================

interface  ODMenuBar;

//=====================================================================================
// Classes used by this interface
//=====================================================================================

interface  ODPart;



//=====================================================================================
// Class ODMenuBar
//=====================================================================================

interface ODMenuBar :  ODRefCntObject
{
	//-----------------------------------------------------------------------------
	// Public methods for all platforms
	//-----------------------------------------------------------------------------

	void Display			();

	ODMenuBar Copy			();

	void AddMenuLast		(in ODMenuID menuID,
					 in ODPlatformMenu menu,
					 in ODPart part);

	void AddMenuBefore		(in ODMenuID menuID,
					 in ODPlatformMenu menu,
					 in ODPart part,
					 in ODMenuID beforeID);

	void RemoveMenu			(in ODMenuID menu);

	ODPlatformMenu GetMenu		(in ODMenuID menu);

	ODBoolean IsValid		();

#ifdef _PLATFORM_MACINTOSH_
	//-----------------------------------------------------------------------------
	// Public methods for Macintosh only
	//-----------------------------------------------------------------------------

	void AddSubMenu			(in ODMenuID menuID,
					 in ODPlatformMenu menu,
					 in ODPart part);

	void RegisterCommand		(in ODCommandID command,
					 in ODMenuID menu,
					 in ODMenuItemID menuItem);

	void UnregisterCommand		(in ODCommandID command);

	void UnregisterAll		();

	ODBoolean IsCommandRegistered	(in ODCommandID command);

	ODBoolean IsCommandSynthetic	(in ODCommandID command);

	ODCommandID GetCommand		(in ODMenuID menu,
					 in ODMenuItemID menuItem);

	void GetMenuAndItem		(in ODCommandID command,
					 out ODMenuID menu,
					 out ODMenuItemID menuItem);

	void EnableCommand		(in ODCommandID cmdNumber,
					 in ODBoolean enable);

	void CheckCommand		(in ODCommandID cmdNumber,
					 in ODBoolean check);

	void EnableAndCheckCommand	(in ODCommandID cmdNumber,
					 in ODBoolean enable,
					 in ODBoolean check) ;

	void SetItemString		(in ODCommandID cmdNumber,
					 in ODIText itemString);

	void GetItemString		(in ODCommandID cmdNumber,
					 out ODIText itemString);

	void DisableAll			();

	void EnableAll			();


#endif // _PLATFORM_MACINTOSH_

#if defined(_PLATFORM_OS2_) || defined(_PLATFORM_WIN32_) || defined(_PLATFORM_AIX_)
	//-----------------------------------------------------------------------------
	// Public methods for OS/2, Windows, and AIX only
	//-----------------------------------------------------------------------------

	ODUShort  GetMenuText		(in ODMenuID menuID,
					 out string menuString);

	ODBoolean SetMenuText		(in ODMenuID menuID,
					 in string menuString);

	ODUShort  GetMenuItemText	(in ODMenuID menuID,
					 in ODMenuItemID menuItemID,
					 out string menuItemString);

	ODBoolean SetMenuItemText	(in ODMenuID menuID,
					 in ODMenuItemID menuItemID,
					 in string menuItemString);

	ODBoolean SetHideMenuItem	(in ODMenuID menuID,
					 in ODMenuItemID menuItemID);

	ODBoolean SetShowMenuItem	(in ODMenuID menuID,
					 in ODMenuItemID menuItemID);

	ODBoolean CheckMenuItem		(in ODMenuID menuID,
					 in ODMenuItemID menuItemID,
					 in ODBoolean check);

	ODBoolean EnableMenu		(in ODMenuID menuID,
					 in ODBoolean enable);

	ODBoolean EnableMenuItem	(in ODMenuID menuID,
					 in ODMenuItemID menuItemID,
					 in ODBoolean enable);

	ODBoolean AddMenuItemBefore	(in ODMenuID menuID,
					 in ODMenuItemID itemID,
					 in ODPlatformMenuItem menuItem,
					 in ODMenuItemID beforeID);

	ODBoolean AddMenuItemLast	(in ODMenuID menuID,
					 in ODMenuItemID itemID,
					 in ODPlatformMenuItem menuItem);

	ODBoolean AddSubMenuBefore	(in ODMenuID menuID,
					 in ODMenuItemID subMenuItemID,
					 in ODPlatformMenu newSubMenu,
					 in ODMenuItemID beforeID);

	ODBoolean AddSubMenuLast	(in ODMenuID menuID,
					 in ODMenuItemID subMenuItemID,
					 in ODPlatformMenu newSubMenu);

	// obsolete; remove this before GA
	ODBoolean InsertSubmenu		(in ODMenuID menuID,
					 in ODMenuItemID subMenuID,
					 in ODPlatformMenu newSubmenu);

	ODBoolean MenuExists		(in ODMenuID menuID);

	ODBoolean IsMenuEnabled		(in ODMenuID menuID);

	ODBoolean MenuItemExists	(in ODMenuID menuID,
					 in ODMenuItemID menuItemID);

	// obsolete; remove this before GA
	ODBoolean Exists		(in ODMenuID menuID,
					 in ODMenuItemID menuItemID);

	ODBoolean IsItemEnabled		(in ODMenuID menuID,
					 in ODMenuItemID menuItemID);

	ODBoolean IsItemChecked		(in ODMenuID menuID,
					 in ODMenuItemID menuItemID);

	ODBoolean IsItemHidden		(in ODMenuID menuID,
					 in ODMenuItemID menuItemID);

	ODBoolean RemoveMenuItem	(in ODMenuID menuID,
					 in ODMenuItemID menuItemID);

	ODBoolean GetMenuItem		(in ODMenuID menuID,
					 in ODMenuItemID menuItemID,
					 out ODPlatformMenuItem menuItem);

	ODBoolean AddToAccelTable	(in ODULong ulNumberofAccels,
					 in ODACCEL NewAccels);

	void RestoreAccelTable		();

	void GetMenuAndItem		(in ODCommandID command,
					 out ODMenuID menu,
					 out ODMenuItemID menuItem);


#endif // _PLATFORM_OS2_ || _PLATFORM_WIN32_ || _PLATFORM_AIX_

#ifdef _PLATFORM_WIN32_
	//-----------------------------------------------------------------------------
	// Public methods for Windows only
	//-----------------------------------------------------------------------------
	void AddMenuLastEx		(in ODMenuID menuID,
					 in ODPlatformMenu menu,
					 in ODPart part,
					 in ODUShort      subMenuIDcount,
					 in ODMenuIDInfo *subMenuIDinfo);

	void AddMenuBeforeEx		(in ODMenuID menuID,
					 in ODPlatformMenu menu,
					 in ODPart part,
					 in ODMenuID beforeID,
					 in ODUShort      subMenuIDcount,
					 in ODMenuIDInfo *subMenuIDinfo);

	ODBoolean AddSubMenuBeforeEx	(in ODMenuID menuID,
					 in ODMenuItemID subMenuItemID,
					 in ODPlatformMenu newSubMenu,
					 in ODMenuID beforeID,
					 in ODUShort      subMenuIDcount,
					 in ODMenuIDInfo *subMenuIDinfo);

	ODBoolean AddSubMenuLastEx	(in ODMenuID menuID,
					 in ODMenuItemID subMenuItemID,
					 in ODPlatformMenu newSubMenu,
					 in ODUShort      subMenuIDcount,
					 in ODMenuIDInfo *subMenuIDinfo);


#endif // PLATFORM_WIN32

#ifdef _PLATFORM_AIX_
	//-----------------------------------------------------------------------------
	// Public methods for AIX only
	//-----------------------------------------------------------------------------
	ODPlatformMenu CreateX11PlatformMenu	(in ODMenuID menuID);

	void DestroyX11PlatformMenu		(in ODPlatformMenu menu);
#endif // PLATFORM_AIX


#ifdef __SOMIDL__

	implementation
	{

		majorversion = 1; minorversion = 0;

		functionprefix = ODMenuBar;

                override:

	#if defined(_PLATFORM_OS2_) || defined(_PLATFORM_WIN32_) || defined(_PLATFORM_AIX_)
			somInit,
	#endif // _PLATFORM_OS2_ || _PLATFORM_WIN32_ || _PLATFORM_AIX_

			somUninit,
			Purge,
			Release;

		releaseorder:

                        Display,
                        Copy,
                        AddMenuLast,
                        AddMenuBefore,
                        RemoveMenu,
                        GetMenu,
                        IsValid,

	#ifdef _PLATFORM_MACINTOSH_
                        AddSubMenu,
                        RegisterCommand,
                        UnregisterCommand,
                        UnregisterAll,
                        IsCommandRegistered,
                        IsCommandSynthetic,
                        GetCommand,
                        GetMenuAndItem,
                        EnableCommand,
                        CheckCommand,
                        EnableAndCheckCommand,
                        SetItemString,
                        GetItemString,
                        DisableAll,
                        EnableAll,
                        reserved1,
	#endif // _PLATFORM_MACINTOSH_

    #if defined(_PLATFORM_OS2_) || defined(_PLATFORM_WIN32_) || defined(_PLATFORM_AIX_)
			GetMenuText,
			SetMenuText,
			GetMenuItemText,
			SetMenuItemText,
			SetHideMenuItem,
			SetShowMenuItem,
			CheckMenuItem,
			EnableMenu,
			EnableMenuItem,
			AddMenuItemBefore,
			AddMenuItemLast,
			InsertSubmenu,
			AddSubMenuBefore,
			AddSubMenuLast,
			MenuExists,
			IsMenuEnabled,
			MenuItemExists,
			Exists,
			IsItemEnabled,
			IsItemChecked,
			IsItemHidden,
			RemoveMenuItem,
			GetMenuItem,
			AddToAccelTable,
			RestoreAccelTable,

			reserved2,
			reserved3,
			reserved4,
			reserved5,
			reserved6,

	#endif // _PLATFORM_OS2_ || _PLATFORM_WIN32_ || _PLATFORM_AIX

	#ifdef _PLATFORM_WIN32_

			AddMenuLastEx,
			AddMenuBeforeEx,
			AddSubMenuBeforeEx,
			AddSubMenuLastEx,

			reserved7,

	#endif // PLATFORM_WIN32

	#ifdef _PLATFORM_AIX_
			CreateX11PlatformMenu,
			DestroyX11PlatformMenu,
	#endif // PLATFORM_AIX

			reserved8,
			reserved9,
			reserved10,

			GetMenuAndItem;

	#ifdef _PLATFORM_MACINTOSH_
	#endif // _PLATFORM_MACINTOSH_

	#if defined(_PLATFORM_OS2_) || defined(_PLATFORM_WIN32_) || defined(_PLATFORM_AIX_)
		//---------------------------------------------------------------------
		// OS/2, WIN32, and AIX private instance data
		//---------------------------------------------------------------------

	#endif // PLATFORM_OS2, PLATFORM_WIN32, PLATFORM_AIX

	};
#endif // __SOMIDL__

};

#endif // _MENUBAR_

