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 char *accel; /* accelerator */
11 int operation; /* op identifer */
12 char *form; /* name of form to popup */
19 char *prompt; /* text displayed to left of input */
20 int type; /* what sort of input expected */
21 Boolean choice; /* is this field the next choice */
22 union { /* default value / return value */
27 Boolean insensitive; /* grayed-out or not... */
28 Boolean changed; /* true when prog changes config */
29 int (*valuechanged)(); /* if non-NULL, call */
30 char **keywords; /* list of possible values */
31 char *keyword_name; /* name of keyword */
33 caddr_t parent; /* parent form */
42 /* max length of character fields */
43 #define MAXFIELDSIZE 256
45 #define stringval(f, n) ((f)->inputlines[n]->returnvalue.stringvalue)
46 #define boolval(f, n) ((f)->inputlines[n]->returnvalue.booleanvalue)
49 ** All (foo **) entries are assumed to be null-terminated lists of foos.
53 char *label; /* text displayed on button */
54 int (*returnfunction) (); /* function called when button hit */
58 ** Pass a pointer to the filled-in EntryForm structure back to the
59 ** returnfunction when the button is hit.
63 char *formname; /* name of form (duh!) */
64 char *instructions; /* text at top of form */
65 UserPrompt **inputlines; /* list of input lines */
66 BottomButton **buttons; /* list of buttons on the bottom */
67 Widget formpointer; /* already exists? */
69 caddr_t extrastuff; /* for future expansion */
73 ** When you're coming up, check to see if formpointer is initialized.
74 ** If so, map it. Otherwise, create the form and set formpointer to
75 ** the new toplevel widget id. Then map it.