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 union { /* default value / return value */
26 Boolean insensitive; /* grayed-out or not... */
27 Boolean changed; /* true when prog changes config */
28 int (*valuechanged)(); /* if non-NULL, call */
29 char **keywords; /* list of possible values */
30 char *keyword_name; /* name of keyword */
32 caddr_t parent; /* parent form */
41 /* max length of character fields */
42 #define MAXFIELDSIZE 256
44 #define stringval(f, n) ((f)->inputlines[n]->returnvalue.stringvalue)
45 #define boolval(f, n) ((f)->inputlines[n]->returnvalue.booleanvalue)
48 ** All (foo **) entries are assumed to be null-terminated lists of foos.
52 char *label; /* text displayed on button */
53 int (*returnfunction) (); /* function called when button hit */
57 ** Pass a pointer to the filled-in EntryForm structure back to the
58 ** returnfunction when the button is hit.
62 char *formname; /* name of form (duh!) */
63 char *instructions; /* text at top of form */
64 UserPrompt **inputlines; /* list of input lines */
65 BottomButton **buttons; /* list of buttons on the bottom */
66 Widget formpointer; /* already exists? */
68 caddr_t extrastuff; /* for future expansion */
72 ** When you're coming up, check to see if formpointer is initialized.
73 ** If so, map it. Otherwise, create the form and set formpointer to
74 ** the new toplevel widget id. Then map it.