/* ------------ menu.h ------------- */ #ifndef MENU_H #define MENU_H struct PopDown { char *SelectionTitle; int ActionId; int Accelerator; int Attrib; }; typedef struct Menu { char *Title; void (*PrepMenu)(void *, struct Menu *); struct PopDown Selections[23]; int Selection; } MENU; #define SEPCHAR "\xc4" #define DEFMENU(m) MENU m[]= { #define POPDOWN(ttl,func) {ttl,func,{ #define SELECTION(stxt,acc,id,attr) {stxt,acc,id,attr}, #define SEPARATOR {SEPCHAR}, #define ENDPOPDOWN {NULL},0}}, #define ENDMENU {NULL} }; /* -------- menu selection attributes -------- */ #define INACTIVE 1 #define CHECKED 2 #define TOGGLE 4 extern MENU MainMenu[]; extern MENU SystemMenu[]; extern MENU *ActiveMenu; int MenuHeight(struct PopDown *); int MenuWidth(struct PopDown *); #endif