projects
/
super-star-trek.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
6804507
)
More buttons, and systematic use of fallback.
author
Eric S. Raymond
<esr@thyrsus.com>
Wed, 13 Sep 2006 18:22:46 +0000
(18:22 +0000)
committer
Eric S. Raymond
<esr@thyrsus.com>
Wed, 13 Sep 2006 18:22:46 +0000
(18:22 +0000)
src/xio.c
patch
|
blob
|
history
diff --git
a/src/xio.c
b/src/xio.c
index 0c5b225013cfba61330ad603757c130fb20095e3..ed095115cc696fa2e65553a1eb071bd357b22e95 100644
(file)
--- a/
src/xio.c
+++ b/
src/xio.c
@@
-7,10
+7,19
@@
#include <X11/Xaw/AsciiText.h>
XtAppContext app_context;
#include <X11/Xaw/AsciiText.h>
XtAppContext app_context;
-Widget toplevel, form, buttons, quit, destruct, text;
+Widget toplevel, form, text;
+Widget buttons, phasers, photons, destruct, quit;
String fallback[] = {
String fallback[] = {
- "*destruct.fromHoriz: quit",
+ /* button labels */
+ "*phasers.label: Phasers",
+ "*photons.label: Torps",
+ "*destruct.label: Destruct",
+ "*quit.label: Quit",
+ /* layout constraints */
+ "*photons.fromHoriz: phasers",
+ "*destruct.fromHoriz: photons",
+ "*quit.fromHoriz: destruct",
NULL,
};
NULL,
};
@@
-22,20
+31,26
@@
static void quit_proc (Widget w, XtPointer client_data, XtPointer call_data)
int main (int argc, char **argv)
{
int main (int argc, char **argv)
{
- toplevel = XtVaOpenApplication (&app_context, "
XThird
", NULL, 0, &argc,
+ toplevel = XtVaOpenApplication (&app_context, "
sst2k
", NULL, 0, &argc,
argv, fallback,
applicationShellWidgetClass,
XtNallowShellResize, True, NULL);
form = XtVaCreateManagedWidget ("form", formWidgetClass, toplevel, NULL);
/* The button panel */
buttons = XtVaCreateManagedWidget ("form", formWidgetClass, form, NULL);
argv, fallback,
applicationShellWidgetClass,
XtNallowShellResize, True, NULL);
form = XtVaCreateManagedWidget ("form", formWidgetClass, toplevel, NULL);
/* The button panel */
buttons = XtVaCreateManagedWidget ("form", formWidgetClass, form, NULL);
-
quit = XtVaCreateManagedWidget("quit
",
+
phasers = XtVaCreateManagedWidget("phasers
",
commandWidgetClass, buttons,
commandWidgetClass, buttons,
- XtNlabel, "Quit", NULL);
- XtAddCallback (quit, XtNcallback, quit_proc, NULL);
+ NULL);
+ photons = XtVaCreateManagedWidget("photons",
+ commandWidgetClass, buttons,
+ NULL);
destruct = XtVaCreateManagedWidget("destruct",
commandWidgetClass, buttons,
destruct = XtVaCreateManagedWidget("destruct",
commandWidgetClass, buttons,
- XtNlabel, "Destruct", NULL);
+ NULL);
+ quit = XtVaCreateManagedWidget("quit",
+ commandWidgetClass, buttons,
+ NULL);
+ XtAddCallback (quit, XtNcallback, quit_proc, NULL);
/* the command window */
text = XtVaCreateManagedWidget ("text", asciiTextWidgetClass, form,
XtNfromVert, buttons,
/* the command window */
text = XtVaCreateManagedWidget ("text", asciiTextWidgetClass, form,
XtNfromVert, buttons,