FreeWRL / FreeX3D 4.3.0
fwMotifWindow.c
1/*
2
3 FreeWRL support library.
4 Create Motif window, widget, menu. Manage events.
5
6*/
7
8/****************************************************************************
9 This file is part of the FreeWRL/FreeX3D Distribution.
10
11 Copyright 2009 CRC Canada. (http://www.crc.gc.ca)
12
13 FreeWRL/FreeX3D is free software: you can redistribute it and/or modify
14 it under the terms of the GNU Lesser Public License as published by
15 the Free Software Foundation, either version 3 of the License, or
16 (at your option) any later version.
17
18 FreeWRL/FreeX3D is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 GNU General Public License for more details.
22
23 You should have received a copy of the GNU General Public License
24 along with FreeWRL/FreeX3D. If not, see <http://www.gnu.org/licenses/>.
25****************************************************************************/
26
27#include <config.h>
28#if !(defined(_ANDROID))
29
30#include <system.h>
31#include <display.h>
32#if KEEP_FV_INLIB
33#include <internal.h>
34
35#include <libFreeWRL.h>
36
37#include <threads.h>
38
39#include "../main/MainLoop.h"
40#include "../vrml_parser/Structs.h"
41#include "../opengl/OpenGL_Utils.h"
42#include "../scenegraph/Viewer.h"
43#include "../ui/common.h"
44
45#include <Xm/MainW.h>
46#include <Xm/RowColumn.h>
47#include <Xm/PushB.h>
48#include <Xm/ToggleB.h>
49#include <Xm/CascadeB.h>
50#include <Xm/TextF.h>
51#include <Xm/Separator.h>
52#include <Xm/PanedW.h>
53#include <Xm/Text.h>
54#include <Xm/ScrolledW.h>
55#include <Xm/FileSB.h>
56#include <Xm/SelectioB.h>
57#include <Xm/MessageB.h>
58#include <Xm/DrawingA.h> /* simple drawing area */
59
60#define ABOUT_FREEWRL "FreeWRL Version %s\n \
61%s %s.\n \n \
62FreeWRL is a VRML/X3D Browser for OS X and Unix.\n \n \
63Thanks to the Open Source community for all the help received.\n \
64http://freewrl.sf.net"
65
66#define DJ_KEEP_COMPILER_WARNING 0
67
68/* static String defaultResources[200]; */
69static int MainWidgetRealized = FALSE;
70
71XtAppContext Xtcx;
72
73static Widget freewrlTopWidget, mainw, menubar;
74static Widget frame, freewrlDrawArea;
75static Widget about_widget;
76static Widget newFileWidget;
77
78static Arg buttonArgs[10]; static int buttonArgc = 0;
79
80extern char myMenuStatus[];
81
82static void fv_createMenuBar(void);
83static void fv_createDrawingFrame(void);
84
85
86static void myXtManageChild (int c, Widget child)
87{
88#ifdef XTDEBUG
89 printf ("at %d, managing %d\n",c, child);
90#endif
91 if (child != NULL) XtManageChild (child);
92}
93
94
95/* see if/when we become iconified - if so, dont bother doing OpenGL stuff */
96static void StateWatcher (Widget w, XtPointer unused, XEvent *event, Boolean *cont)
97{
98#ifdef XEVENT_VERBOSE
99 // Used to track down TouchSensor loosing event with Motif (direct X11 is ok)
100 TRACE_MSG("freewrlTopWidget [StateWatch] went through (xm callback): widget %p event %p\n", (void*)w, (void*)event);
101#endif
102 if (event->type == MapNotify) setDisplayed (TRUE);
103 else if (event->type == UnmapNotify) setDisplayed (FALSE);
104}
105
106static void fv_DrawArea_events (Widget w, XtPointer unused, XEvent *event, Boolean *cont)
107{
108#ifdef XEVENT_VERBOSE
109 // Used to track down TouchSensor loosing event with Motif (direct X11 is ok)
110
111 XWindowAttributes attr;
112 XSetWindowAttributes set_attr;
113
114 TRACE_MSG("fv_DrawArea event went through (xm callback): widget %p event %p\n", (void*)w, (void*)event);
115
116 memset(&attr, 0, sizeof(attr));
117 memset(&set_attr, 0, sizeof(set_attr));
118
119 /* Get window attributes and examine the event mask */
120 XGetWindowAttributes(Xdpy, Xwin, &attr);
121 TRACE_MSG("DrawArea event mask: %lu\n", attr.your_event_mask);
122 if (!(attr.your_event_mask & PointerMotionMask)) {
123 TRACE_MSG("DrawArea window not configured to receive PointerMotionMask...\n");
124 }
125 /* Set event mask to catch mouse motion events */
126 set_attr.event_mask = attr.your_event_mask | PointerMotionMask;
127 XChangeWindowAttributes(Xdpy, Xwin, CWEventMask, &set_attr);
128
129#endif
130
131 /* This event should be passed to FreeWRL (MainLoop) control */
132 DEBUG_XEV("EVENT through MOTIF\n");
133 handle_Xevents(*event);
134}
135
136#define MOTIF_ICON
137#ifdef MOTIF_ICON
138
140//
141// Change the application icon to whatever is in the
142// file "icon.h". See the standalone app "iconToString.c"
143// for instructions on how to create "icon.h".
144//
145// this HAS to be called after widget is realized, after the
146// XtRealizeWidget (toplevel);
147// call
148#include "../../../icons/icon.h"
149
150void set_app_icon(Widget top) {
151 Display *d = XtDisplay(top);
152 Atom net_wm_icon = XInternAtom(d, "_NET_WM_ICON", False);
153 Atom cardinal = XInternAtom(d, "CARDINAL", False);
154 Window w = XtWindow(top);
155
156 //printf ("sizeof buffer %ld\n",sizeof(buffer));
157 // first two elements of the icon.h buffer[] are the
158 // width and height - not sure which is which, but
159 // for this case, it does not matter.
160
161 long wid = 0;
162 long hei = 0;
163 if (sizeof(buffer) > (sizeof(long) * 2)) {
164 wid = buffer[0];
165 hei = buffer[1];
166 } else {
167 printf ("ERROR IN ICON SIZE - nothing there??\n");
168 exit(1);
169 }
170
171 // printf ("wid %ld hei %ld\n",wid,hei);
172
173 // set the icon now.
174 int length = 2 + (wid * hei);
175 XChangeProperty(d, w, net_wm_icon, cardinal,
176 32, PropModeReplace, (const unsigned char*) buffer, length);
177}
178#endif //MOTIF_ICON
179
183int fv_create_main_window(freewrl_params_t * params) //int argc, char *argv[])
184{
185 int argc_out = 0;
186 char *argv_out[1] = { NULL };
187 Dimension width, height;
188 Arg initArgs[10]; int initArgc = 0;
189
190 /* XtVaAppInitialize ??? */
191 XtSetArg(initArgs[initArgc], XmNlabelString, XmStringCreate(getWindowTitle(), XmSTRING_DEFAULT_CHARSET)); initArgc++;
192 XtSetArg(initArgs[initArgc], XmNheight, params->height); initArgc++;
193 XtSetArg(initArgs[initArgc], XmNwidth, params->width); initArgc++;
194 XtSetArg(initArgs[initArgc], XmNmappedWhenManaged, False); initArgc++;
195
200 XtToolkitInitialize();
201 Xtcx = XtCreateApplicationContext();
202
203 XtDisplayInitialize(Xtcx, Xdpy, "FreeWRL", "FreeWRL_class", NULL, 0, &argc_out, argv_out);
204
205 freewrlTopWidget = XtAppCreateShell("FreeWRL", "FreeWRL_class", applicationShellWidgetClass, Xdpy, initArgs, initArgc);
206
207 if (!freewrlTopWidget) {
208 ERROR_MSG("Can't initialize Motif\n");
209 return FALSE;
210 }
211
212 /* Inform Motif that we have our visual and colormap already ... (before top level is realized) */
213 XtVaSetValues(freewrlTopWidget,
214 XmNdepth, Xvi->depth,
215 XmNvisual, Xvi->visual,
216 XmNcolormap, colormap,
217 NULL);
218
219 mainw = XmCreateMainWindow(freewrlTopWidget, getWindowTitle(), NULL, 0);
220 if (!mainw)
221 return FALSE;
222
223 myXtManageChild(29, mainw);
224
225 /* Create a menu bar. */
226 fv_createMenuBar();
227
228 /* Create a framed drawing area for OpenGL rendering. */
229 fv_createDrawingFrame();
230
231 /* Set up the application's window layout. */
232 XtVaSetValues(mainw,
233 XmNworkWindow, frame,
234 XmNcommandWindow, NULL,
235 XmNmenuBar, menubar,
236 NULL);
237
238
239 XtRealizeWidget (freewrlTopWidget);
240
241
242#ifdef MOTIF_ICON
243 // JAS - set the icon here
244 set_app_icon(freewrlTopWidget);
245#endif //MOTIF_ICON
246
247
248 /* FIXME: see fwBareWindow.c */
249 /* Roberto Gerson */
250 /* If -d is setted, so reparent the window */
251 if (params->winToEmbedInto != INT_ID_UNDEFINED){
252 printf("fwMotifWindow::Trying to reparent window: %ld, to new parent: %ld\n",
253 XtWindow(freewrlTopWidget),
254 params->winToEmbedInto);
255
256 XReparentWindow(XtDisplay(freewrlTopWidget),
257 XtWindow(freewrlTopWidget),
258 (Window) params->winToEmbedInto, 0, 0);
259
260 XMapWindow(XtDisplay(freewrlTopWidget), XtWindow(freewrlTopWidget));
261 }
262
263 XFlush(XtDisplay(freewrlTopWidget));
264
265 MainWidgetRealized = XtIsRealized(freewrlTopWidget); /*TRUE;*/
266 TRACE_MSG("fv_create_main_window: top widget realized: %s\n", BOOL_STR(MainWidgetRealized));
267
268 Xwin = XtWindow(freewrlTopWidget);
269 GLwin = XtWindow(freewrlDrawArea);
270
271 /* now, lets tell the OpenGL window what its dimensions are */
272
273 XtVaGetValues(freewrlDrawArea, XmNwidth, &width, XmNheight, &height, NULL);
274 /* printf("%s,%d fv_create_main_window %d, %d\n",__FILE__,__LINE__,width,height); */
275 fv_setScreenDim(width,height);
276
277 /* lets see when this goes iconic */
278 XtAddEventHandler(freewrlTopWidget, StructureNotifyMask, FALSE, StateWatcher, NULL);
279 /* all events for DrawArea should be passed to FreeWRL (MainLoop) control */
280 XtAddEventHandler(freewrlDrawArea, event_mask, False, fv_DrawArea_events, NULL);
281
282 return TRUE;
283}
284
285/************************************************************************
286
287Callbacks to handle button presses, etc.
288
289************************************************************************/
290
291/* Label strings are "broken" on some Motifs. See:
292 * http://www.faqs.org/faqs/motif-faq/part5/
293 */
294/* both of these fail on Ubuntu 6.06 */
295/* diastring = XmStringCreateLtoR(ns,XmFONTLIST_DEFAULT_TAG); */
296/*diastring = XmStringCreateLocalized(ns); */
297
298static XmString xec_NewString(char *s)
299{
300 XmString xms1;
301 XmString xms2;
302 XmString line;
303 XmString separator;
304 char *p;
305 char *t = XtNewString(s); /* Make a copy for strtok not to */
306 /* damage the original string */
307
308 separator = XmStringSeparatorCreate();
309 p = strtok(t,"\n");
310 xms1 = XmStringCreateLocalized(p);
311
312 /* FIXME: ???? why NULL here */
313 while ((p = strtok(NULL,"\n")))
314 {
315 line = XmStringCreateLocalized(p);
316 xms2 = XmStringConcat(xms1,separator);
317 XmStringFree(xms1);
318 xms1 = XmStringConcat(xms2,line);
319 XmStringFree(xms2);
320 XmStringFree(line);
321 }
322
323 XmStringFree(separator);
324 XtFree(t);
325 return xms1;
326}
327
328/* Callbacks */
329static void fv_aboutFreeWRLpopUp (Widget w, XtPointer data, XtPointer callData)
330{
331
332 int ac;
333 Arg args[10];
334 const char *ver;
335 char *msg, *rdr, *vendor;
336 XmString diastring;
337 ac = 0;
338
339 ver = libFreeWRL_get_version();
340
341 rdr = (char *)glGetString(GL_RENDERER); // JAS - was gglobal()->display.rdr_caps.renderer;
342 vendor = (char *)glGetString(GL_VENDOR); // JAS - was gglobal()->display.rdr_caps.vendor;
343
344 msg = MALLOC(void *, strlen(ABOUT_FREEWRL) + strlen(ver)
345 + strlen(rdr) + strlen(vendor));
346 sprintf(msg, ABOUT_FREEWRL, ver, rdr, vendor);
347
348 diastring = xec_NewString(msg);
349 XtSetArg(args[ac], XmNmessageString, diastring); ac++;
350 XtSetValues(about_widget, args, ac);
351 XmStringFree(diastring);
352 FREE(msg);
353
354 myXtManageChild(2,about_widget);
355}
356
357/* quit selected */
358static void fv_quitMenuBar (Widget w, XtPointer data, XtPointer callData)
359{
360 fwl_doQuit(__FILE__,__LINE__);
361}
362
363static void fv_reloadFile (Widget w, XtPointer data, XtPointer callData)
364{
365 ConsoleMessage ("reloading %s", BrowserFullPath);
366 /* FIXME: implement reload function */
367}
368
369/* file selection dialog box, ok button pressed */
370static void fv_fileSelectPressed (Widget w, XtPointer data, XmFileSelectionBoxCallbackStruct *callData)
371{
372 char *newfile;
373
374 /* get the filename */
375 XmStringGetLtoR(callData->value,
376 XmSTRING_DEFAULT_CHARSET, &newfile);
377
378 if (!Anchor_ReplaceWorld(newfile)) {
379 /* error message */
380 }
381 XtUnmanageChild(w);
382}
383
384/* file selection dialog box cancel button - just get rid of widget */
385static void fv_unManageMe (Widget widget, XtPointer client_data,
386 XmFileSelectionBoxCallbackStruct *selection)
387{
388 XtUnmanageChild(widget);
389}
390
391/* new file popup - user wants to load a new file */
392static void fv_newFilePopup(Widget cascade_button, char *text, XmPushButtonCallbackStruct *cbs)
393{
394 myXtManageChild(4,newFileWidget);
395 XtPopup(XtParent(newFileWidget), XtGrabNone);
396}
397
398#ifdef DOESNOTGETICONICSTATE
399/* resize, configure events */
400static void fv_GLAreaexpose (Widget w, XtPointer data, XtPointer callData)
401{
402 XmDrawingAreaCallbackStruct *cd = (XmDrawingAreaCallbackStruct *) callData;
403 switch (cd->reason) {
404 case XmCR_EXPOSE: printf ("got expose event \n");
405 default: printf ("not known event, %d\n",cd->reason);
406 }
407}
408#endif
409
410/* resize, configure events */
411static void fv_GLArearesize (Widget w, XtPointer data, XtPointer callData)
412{
413/* XmDrawingAreaCallbackStruct *cd = (XmDrawingAreaCallbackStruct *) callData; */
414 Dimension width, height;
415
416 XtVaGetValues (w, XmNwidth, &width, XmNheight, &height, NULL);
417 /* printf("%s,%d GLArearesize %d, %d\n",__FILE__,__LINE__,width,height); */
418 fv_setScreenDim (width,height);
419}
420
421/* remove this button from this SelectionBox widget */
422static void fv_removeWidgetFromSelect (Widget parent,
423#if NeedWidePrototypes
424 unsigned int
425#else
426 unsigned char
427#endif
428 button) {
429
430 Widget tmp;
431
432 tmp = XmSelectionBoxGetChild(parent, button);
433 if (tmp == NULL) {
434 printf ("hmmm - button does not exist\n");
435 } else {
436 XtUnmanageChild(tmp);
437 }
438}
439
440/* start up the browser, and point it to www.crc.ca/FreeWRL */
441static void fv_freewrlHomePopup (Widget w, XtPointer data, XtPointer callData)
442{
443#if DJ_KEEP_COMPILER_WARNING
444 #define MAXLINE 2000
445#endif
446 const char *browser;
447 char *sysline;
448 const char pattern[] = "%s http://freewrl.sourceforge.net &";
449
450 browser = freewrl_get_browser_program();
451 if (!browser) {
452 browser = BROWSER;
453 }
454 sysline = MALLOC(char *, strlen(browser)+strlen(pattern));
455 sprintf(sysline, pattern, browser);
456
457 freewrlSystem(sysline);
458
459 FREE(sysline);
460}
461
462#ifdef XTDEBUG
463/* for debugging... */
464printEvent (XEvent event)
465{
466 switch (event.type) {
467 case KeyPress: printf ("KeyPress"); break;
468 case KeyRelease: printf ("KeyRelease"); break;
469 case ButtonPress: printf ("ButtonPress"); break;
470 case ButtonRelease: printf ("ButtonRelease"); break;
471 case MotionNotify: printf ("MotionNotify"); break;
472 case EnterNotify: printf ("EnterNotify"); break;
473 case LeaveNotify: printf ("LeaveNotify"); break;
474 case FocusIn: printf ("FocusIn"); break;
475 case FocusOut: printf ("FocusOut"); break;
476 case KeymapNotify: printf ("KeymapNotify"); break;
477 case Expose: printf ("Expose"); break;
478 case GraphicsExpose: printf ("GraphicsExpose"); break;
479 case NoExpose: printf ("NoExpose"); break;
480 case VisibilityNotify: printf ("VisibilityNotify"); break;
481 case CreateNotify: printf ("CreateNotify"); break;
482 case DestroyNotify: printf ("DestroyNotify"); break;
483 case UnmapNotify: printf ("UnmapNotify"); break;
484 case MapNotify: printf ("MapNotify"); break;
485 case MapRequest: printf ("MapRequest"); break;
486 case ReparentNotify: printf ("ReparentNotify"); break;
487 case ConfigureNotify: printf ("ConfigureNotify"); break;
488 case ConfigureRequest: printf ("ConfigureRequest"); break;
489 case GravityNotify: printf ("GravityNotify"); break;
490 case ResizeRequest: printf ("ResizeRequest"); break;
491 case CirculateNotify: printf ("CirculateNotify"); break;
492 case CirculateRequest: printf ("CirculateRequest"); break;
493 case PropertyNotify: printf ("PropertyNotify"); break;
494 case SelectionClear: printf ("SelectionClear"); break;
495 case SelectionRequest: printf ("SelectionRequest"); break;
496 case SelectionNotify: printf ("SelectionNotify"); break;
497 case ColormapNotify: printf ("ColormapNotify"); break;
498 case ClientMessage: printf ("ClientMessage"); break;
499 case MappingNotify: printf ("MappingNotify"); break;
500 default :printf ("Event out of range - %d",event.type);
501 }
502 printf ("\n");
503}
504#endif
505
506/* File pulldown menu */
507static void fv_createFilePulldown()
508{
509 Widget menupane, btn, cascade;
510
511 XmString mask;
512 int ac;
513 Arg args[10];
514
515 /* Create the FileSelectionDialog */
516 memset(args, 0, sizeof(args));
517 ac = 0;
518 mask = XmStringCreateLocalized("*.x3d");
519 XtSetArg(args[ac], XmNdirMask, mask); ac++;
520
521 /* newFileWidget = XmCreateFileSelectionDialog(menubar, "select", args, 1); */
522 newFileWidget = XmCreateFileSelectionDialog(mainw, "select", args, 1);
523
524 XtAddCallback(newFileWidget, XmNokCallback, (XtCallbackProc)fv_fileSelectPressed, NULL);
525 XtAddCallback(newFileWidget, XmNcancelCallback, (XtCallbackProc)fv_unManageMe, NULL);
526 /* delete buttons not wanted */
527 fv_removeWidgetFromSelect(newFileWidget,XmDIALOG_HELP_BUTTON);
528 XtUnmanageChild(newFileWidget);
529
530
531 menupane = XmCreatePulldownMenu (menubar, "menupane", NULL, 0);
532 btn = XmCreatePushButton (menupane, "Reload", NULL, 0);
533 XtAddCallback (btn, XmNactivateCallback, (XtCallbackProc)fv_reloadFile, NULL);
534 myXtManageChild (5,btn);
535 btn = XmCreatePushButton (menupane, "New...", NULL, 0);
536 XtAddCallback (btn, XmNactivateCallback, (XtCallbackProc)fv_newFilePopup, NULL);
537 myXtManageChild (6,btn);
538
539 btn = XmCreatePushButton (menupane, "Quit", NULL, 0);
540 XtAddCallback (btn, XmNactivateCallback, (XtCallbackProc)fv_quitMenuBar, NULL);
541 myXtManageChild (7,btn);
542 XtSetArg (args[0], XmNsubMenuId, menupane);
543 cascade = XmCreateCascadeButton (menubar, "File", args, 1);
544 myXtManageChild (8,cascade);
545}
546
547static void fv_createHelpPulldown()
548{
549 Widget btn, menupane, cascade;
550 int ac;
551 Arg args[10];
552
553
554 menupane = XmCreatePulldownMenu (menubar, "menupane", NULL, 0);
555
556 /* Helpity stuff */
557 ac = 0;
558 /*
559 sprintf (ns,ABOUT_FREEWRL,getLibVersion(),"","");
560 diastring = xec_NewString(ns);
561
562 XtSetArg(args[ac], XmNmessageString, diastring); ac++;
563 */
564 XtSetArg(args[ac], XmNmessageAlignment,XmALIGNMENT_CENTER); ac++;
565 about_widget = XmCreateInformationDialog(menubar, "about", args, ac);
566 XtAddCallback(about_widget, XmNokCallback, (XtCallbackProc)fv_unManageMe, NULL);
567 fv_removeWidgetFromSelect (about_widget, XmDIALOG_CANCEL_BUTTON);
568 /*
569 causes segfault on Core3 fv_removeWidgetFromSelect (about_widget, XmDIALOG_HELP_BUTTON);
570 */
571
572
573 btn = XmCreatePushButton (menupane, "About FreeWRL...", NULL, 0);
574 XtAddCallback (btn, XmNactivateCallback, (XtCallbackProc)fv_aboutFreeWRLpopUp, NULL);
575 myXtManageChild (23,btn);
576 btn = XmCreatePushButton (menupane, "FreeWRL Homepage...", NULL, 0);
577 XtAddCallback (btn, XmNactivateCallback, (XtCallbackProc)fv_freewrlHomePopup, NULL);
578 myXtManageChild (24,btn);
579
580 XtSetArg (args[0], XmNsubMenuId, menupane);
581 cascade = XmCreateCascadeButton (menubar, "Help", args, 1);
582 myXtManageChild (25,cascade);
583}
584
585/**********************************/
586static void fv_createMenuBar(void)
587{
588 Arg menuArgs[10]; int menuArgc = 0;
589
590 /* create the menu bar */
591 memset(menuArgs, 0, sizeof(menuArgs));
592 menuArgc = 0;
593
594 /* the following XtSetArg is not required; it only "pretties" up the display
595 in some circumstances. It came out in Motif 2.0, and is not always found */
596#ifdef XmNscrolledWindowChildType
597 XtSetArg(menuArgs[menuArgc], XmNscrolledWindowChildType, XmMENU_BAR); menuArgc++;
598#endif
599
600 menubar = XmCreateMenuBar (mainw, "menubar", menuArgs, menuArgc);
601 myXtManageChild (26,menubar);
602
603 /* generic toggle button resources */
604 XtSetArg(buttonArgs[buttonArgc], XmCVisibleWhenOff, TRUE); buttonArgc++;
605 XtSetArg(buttonArgs[buttonArgc],XmNindicatorType,XmN_OF_MANY); buttonArgc++;
606
607 if (!RUNNINGASPLUGIN) fv_createFilePulldown();
608 fv_createHelpPulldown();
609
610}
611
612/**********************************************************************************/
613/*
614 create a frame for FreeWRL, and for messages
615*/
616static void fv_createDrawingFrame(void)
617{
618 /* frame holds everything here */
619 frame = XtVaCreateManagedWidget("form", xmPanedWindowWidgetClass, mainw, NULL);
620
621 /* create the FreeWRL OpenGL drawing area, and map it. */
622
623#if 0 /* MB: do not create a glwDrawingArea but a simple widget
624 we have our own initialization of OpenGL ...
625 in the near future we could remove completely the GLwDrawA files...
626 */
627 freewrlDrawArea = XtVaCreateManagedWidget ("freewrlDrawArea", glwDrawingAreaWidgetClass,
628 frame, "visualInfo", Xvi,
629 XmNtopAttachment, XmATTACH_WIDGET,
630 XmNbottomAttachment, XmATTACH_FORM,
631 XmNleftAttachment, XmATTACH_FORM,
632 XmNrightAttachment, XmATTACH_FORM,
633 NULL);
634#endif
635
636 freewrlDrawArea = XmCreateDrawingArea (frame, "drawing_a", NULL, 0);
637
638#ifdef DOESNOTGETICONICSTATE
639 XtAddCallback (freewrlDrawArea, XmNexposeCallback, fv_GLAreaexpose, NULL);
640#endif
641
642 XtAddCallback (freewrlDrawArea, XmNresizeCallback, fv_GLArearesize, NULL);
643
644 myXtManageChild(27,freewrlDrawArea);
645}
646
647void setConsoleMessage (char *str)
648{
649// we do not do this anymore, Doug Sanden's HUD code does lots now
650}
651
652
653
654// this does nothing anymore, Doug Sanden's HUD code replaces this.
655void frontendUpdateButtons()
656{
657}
658
659#endif /* IPHONE */
660#endif /* KEEP_FV_INLIB */
Initialization.
Definition libFreeWRL.h:72