2 ** Buttons & Pulldown menus across the top of the application.
3 ** When selected, it will continue to the submenu if non-null,
4 ** otherwise call the general callback.
7 typedef struct MenuItemS {
8 char *label; /* the displayed label */
9 struct MenuItemS **submenu; /* if non-null, a submenu to display */
10 int operation; /* op identifer */
11 char *form; /* name of form to popup */
18 char *prompt; /* text displayed to left of input */
19 int type; /* what sort of input expected */
20 union { /* default value / return value */
25 Boolean insensitive; /* grayed-out or not... */
26 int (*valuechanged)(); /* if non-NULL, call */
27 char **keywords; /* list of possible values */
37 /* max length of character fields */
38 #define MAXFIELDSIZE 256
40 #define stringval(f, n) ((f)->inputlines[n]->returnvalue.stringvalue)
41 #define boolval(f, n) ((f)->inputlines[n]->returnvalue.booleanvalue)
44 ** All (foo **) entries are assumed to be null-terminated lists of foos.
48 char *label; /* text displayed on button */
49 int (*returnfunction) (); /* function called when button hit */
53 ** Pass a pointer to the filled-in EntryForm structure back to the
54 ** returnfunction when the button is hit.
58 char *formname; /* name of form (duh!) */
59 char *instructions; /* text at top of form */
60 UserPrompt **inputlines; /* list of input lines */
61 BottomButton **buttons; /* list of buttons on the bottom */
62 Widget formpointer; /* already exists? */
64 caddr_t extrastuff; /* for future expansion */
68 ** When you're coming up, check to see if formpointer is initialized.
69 ** If so, map it. Otherwise, create the form and set formpointer to
70 ** the new toplevel widget id. Then map it.