home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Fred Fish Collection 1.5
/
ffcollection-1-5-1992-11.iso
/
ff_disks
/
500-599
/
ff562.lza
/
Intuisup
/
Menus
/
source.lzh
/
menus.h
< prev
Wrap
C/C++ Source or Header
|
1991-09-23
|
2KB
|
69 lines
/*************************************
* *
* Menus v2.0 *
* by Torsten Jürgeleit in 05/91 *
* *
* Defines, structs and protos *
* *
*************************************/
#ifndef MENU_LIST_H
#define MENU_LIST_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_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;
USHORT ml_Flags;
UBYTE ml_TextPen1;
UBYTE ml_TextPen2;
BYTE *ml_Buffer;
ULONG ml_BufferSize;
};
struct MenuData {
USHORT md_Type;
USHORT md_Flags;
BYTE *md_Name;
BYTE *md_CommandKey;
ULONG md_MutualExclude;
};
/* Global prototypes */
struct MenuList *create_menu(struct RenderInfo *ri, struct Window *win,
struct MenuData *md, struct TextAttr *ta);
VOID attach_menu(struct Window *win, struct MenuList *ml);
struct MenuItem *menu_item_address(struct MenuList *ml, USHORT menu_num);
VOID remove_menu(struct MenuList *ml);
VOID free_menu(struct MenuList *ml);
/* Global pragmas */
#pragma regcall(create_menu(a0,a1,a2,a3))
#pragma regcall(attach_menu(a0,a1))
#pragma regcall(menu_item_address(a0,d0))
#pragma regcall(remove_menu(a0))
#pragma regcall(free_menu(a0))
#endif