33 #define MESG "something strange happened with\nthe FreeWRL console..."
34 #define WINTITLE "FreeWRL X3D/VRML Console:"
35 #define MINTITLE "FreeWRL Console:"
39 XtAppContext app_context;
42 Widget top, mainBox, messageText, dismissButton;
47 void dismiss_proc (Widget w, XtPointer client_data, XtPointer call_data) {
48 XtDestroyApplicationContext(app_context);
52 int main(
int argc,
char **argv) {
55 strncpy (inLine,argv[1],strlen(argv[1]));
57 strncpy (inLine,MESG,strlen(MESG));
61 top = XtVaAppInitialize(&app_context,
"XViewfile", NULL, 0, &argc, argv, NULL,
67 mainBox = XtVaCreateManagedWidget(
"mainBox", boxWidgetClass, top,
71 messageText = XtVaCreateManagedWidget(
"messageText", asciiTextWidgetClass,
75 XtNtype, XawAsciiString,
76 XtNscrollVertical, XawtextScrollAlways,
77 XtNscrollHorizontal, XawtextScrollWhenNeeded,
79 XtNlength, strlen(inLine),
84 dismissButton = XtVaCreateManagedWidget(
"dismiss_button", commandWidgetClass,
85 mainBox, XtNlabel,
"Dismiss", NULL);
89 XtAddCallback(dismissButton,XtNcallback, dismiss_proc, NULL);
91 XtAppMainLoop(app_context);