/* $Revision Header *** Header built automatically - do not edit! ***********
 *
 *	(C) Copyright 1991 by Torsten Jürgeleit
 *
 *	Name .....: menus.h
 *	Created ..: Thursday 19-Dec-91 18:03:00
 *	Revision .: 1
 *
 *	Date        Author                 Comment
 *	=========   ====================   ====================
 *	03-Jun-92   Torsten Jürgeleit      alternate color for menu item texts
 *	19-Dec-91   Torsten Jürgeleit      Created this file!
 *
 ****************************************************************************
 *
 *	Menu support routines
 *
 * $Revision Header ********************************************************/

#ifndef	ISUP_MENUS_H
#define	ISUP_MENUS_H

	/* Defines */

#define MENU_DATA_TYPE_TITLE	1
#define MENU_DATA_TYPE_ITEM	2
#define MENU_DATA_TYPE_SUBITEM	3

#define MAX_MENU_DATA_TYPE	MENU_DATA_TYPE_SUBITEM

#define MENU_DATA_FLAG_DISABLED		(1 << 0)	/* disable menu or menu item */
#define MENU_DATA_FLAG_ATTRIBUTE	(1 << 1)	/* attribute menu item */
#define MENU_DATA_FLAG_SELECTED		(1 << 2)	/* selected attribute menu item */
#define MENU_DATA_FLAG_EMPTY_LINE	(1 << 3)	/* insert empty line before this item */
#define MENU_DATA_FLAG_HIGH_NONE	(1 << 4)	/* no highliting */
#define MENU_DATA_FLAG_HIGH_BOX		(1 << 5)	/* highliting with box, otherwise with complement */
#define MENU_DATA_FLAG_TEXT_COLOR2	(1 << 6)	/* alternate color for item text */

#define MENU_LIST_FLAG_ATTACHED		(1 << 0)	/* menu list is currently attached to a window */

	/* Structures */

struct MenuList {
	struct RenderInfo  *ml_RenderInfo;
	struct Window      *ml_Window;
	struct TextAttr    *ml_TextAttr;
	struct TextFont    *ml_TextFont;
	struct MenuData    *ml_Data;
	LONG	ml_ID;		/* id = 'ISUP' */
	USHORT	ml_Flags;
	UBYTE	ml_TextPen1;
	UBYTE	ml_TextPen2;
	BYTE	**ml_LanguageTextArray;
	BYTE	*ml_Buffer;
	ULONG	ml_BufferSize;
};
struct MenuData {
	USHORT	md_Type;
	USHORT	md_Flags;
	BYTE	*md_Text;
	BYTE	*md_CommandKey;
	ULONG	md_MutualExclude;
};
	/* Global prototypes */

struct MenuList  *create_menu(struct RenderInfo  *ri, struct Window  *win,
    struct MenuData  *md, struct TextAttr  *ta, BYTE **language_text_array);
VOID attach_menu(struct Window  *win, struct MenuList  *ml);
struct MenuItem  *menu_item_address(struct MenuList  *ml, USHORT menu_num);
struct Window  *remove_menu(struct MenuList  *ml);
VOID free_menu(struct MenuList  *ml);

	/* Global pragmas (Aztec C v5.2a) */

#pragma intfunc(create_menu(a0,a1,a2,a3,d0))
#pragma intfunc(attach_menu(a0,a1))
#pragma intfunc(menu_item_address(a0,d0))
#pragma intfunc(remove_menu(a0))
#pragma intfunc(free_menu(a0))

#endif   /* ISUP_MENUS_H */
