static XtAppContext app_context;
static Widget toplevel, text, form;
static Widget navigation, weapons, status, planets, misc;
+static Widget navlabel, weaplabel, statlabel, planlabel, misclabel;
static String fallback[] = {
/* text window resources */
{"Help", noargs_proc, &misc, 0},
};
+#define MAXWIDTH 640
+#define TEXTHEIGHT 200
+
int main(int argc, char **argv)
{
struct cmd_t *cp;
form = XtVaCreateManagedWidget("form", formWidgetClass, toplevel, NULL);
/* the command window */
text = XtVaCreateManagedWidget("text", asciiTextWidgetClass, form,
- XtNwidth, 400, XtNheight, 200,
+ XtNwidth, MAXWIDTH, XtNheight, TEXTHEIGHT,
NULL);
XtVaSetValues(text, XtNeditType,XawtextRead, XtNdisplayCaret,False, NULL);
/* The button panels */
navigation = XtVaCreateManagedWidget("navigation",
- boxWidgetClass, form,
- XtNfromVert, text,
- XtNorientation, XtorientHorizontal,
- NULL);
+ boxWidgetClass, form,
+ XtNborderWidth, 0,
+ XtNfromVert, text,
+ XtNorientation, XtorientHorizontal,
+ NULL);
+ navlabel = XtVaCreateManagedWidget("Navigation: ",
+ labelWidgetClass, navigation,
+ XtNborderWidth, 0,
+ NULL);
weapons = XtVaCreateManagedWidget("weapons",
boxWidgetClass, form,
+ XtNborderWidth, 0,
XtNfromVert, navigation,
XtNorientation, XtorientHorizontal,
NULL);
+ weaplabel = XtVaCreateManagedWidget("Weapons: ",
+ labelWidgetClass, weapons,
+ XtNborderWidth, 0,
+ NULL);
status = XtVaCreateManagedWidget("status",
boxWidgetClass, form,
+ XtNborderWidth, 0,
XtNfromVert, weapons,
XtNorientation, XtorientHorizontal,
NULL);
+ statlabel = XtVaCreateManagedWidget("Status: ",
+ labelWidgetClass, status,
+ XtNborderWidth, 0,
+ NULL);
planets = XtVaCreateManagedWidget("planets",
boxWidgetClass, form,
+ XtNborderWidth, 0,
XtNfromVert, status,
XtNorientation, XtorientHorizontal,
NULL);
+ planlabel = XtVaCreateManagedWidget("Planets: ",
+ labelWidgetClass, planets,
+ XtNborderWidth, 0,
+ NULL);
misc = XtVaCreateManagedWidget("misc",
boxWidgetClass, form,
+ XtNborderWidth, 0,
XtNfromVert, planets,
XtNorientation, XtorientHorizontal,
NULL);
+ misclabel = XtVaCreateManagedWidget("Miscellaneous:",
+ labelWidgetClass, misc,
+ XtNborderWidth, 0,
+ NULL);
for (cp = commands; cp < commands + sizeof(commands)/sizeof(commands[0]); cp++) {
cp->widget = XtVaCreateManagedWidget(cp->name,
commandWidgetClass,