home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / unixtex-6.1b-src.tgz / tar.out / contrib / unixtex / xdvik / INSTALL < prev    next >
Text File  |  1996-09-28  |  17KB  |  538 lines

  1. Installation of xdvik (relative to the top-level directory):
  2.  
  3. 1. Run `configure' (in the top-level directory, the one with the
  4. `kpathsea' and `xdvi' subdirectories).  This guesses system dependencies.
  5.  
  6. By default, Ghostscript is used to render PostScript specials.
  7. To disable this, specify `--without-ps' to configure.
  8. To use Display PostScript instead of gs, specify `--with-ps=dps'.
  9. To use NeWS instead of gs, specify `--with-ps=news'.
  10. (Naturally you must have the dps and news libraries for these to work!)
  11. You can specify more than one --with-ps option if desired; Ghostscript
  12.   is used last.
  13.  
  14. 2. If necessary, change the default paths or other definitions.
  15. See kpathsea/INSTALL for details.
  16.  
  17. Things to optionally add to DEFS or CFLAGS:
  18. -DA4 if you want A4 paper size by default.
  19. -DALTFONT=\"myfont\" to change the fallback from cmr10.
  20. -DBDPI=num to change default resolution from 300.
  21. -DNOBUTTONS to disable radio buttons for common commands.
  22. -DNOGREY to disable using grayscale to display shrunken bitmaps 
  23.    (which also works on monochrome monitors).
  24. -DNOMAKEPK to disable MakeTeXPK by default.  It can be disabled (or
  25.   enabled) at runtime, regardless of this (see the man page). Your
  26.   MakeTeXPK script must echo the generated filename (and nothing else)
  27.   to standard output.
  28. -DNOQUERY if you have trouble compiling drawingWidgetClass?
  29. -DNOSELFILE to disable SelFile widget support.
  30. -DNOTEXXET to disable DVI opcodes 250 and 251.
  31. -DNOTOOL to compile using only Xlib routines; also set the Make variable
  32.   x_tool_libs="". Functionality is necessarily reduced.
  33.    
  34. The following can be set according to what xdvi's CONTROL-P command
  35. reports for `bitord' and `Unit' for your most common display:
  36.      bitord = 1  =>  -DMSBITFIRST
  37.      Unit = 32   =>  -DBMLONG
  38.      Unit = 16   =>  -DBMSHORT
  39. I am unconvinced that this makes any substantial difference in
  40. performance, however.
  41.  
  42. 3. `make'.
  43.  
  44. 4. `make install'.
  45. (Or `make install-exec', to install just the executables,
  46. or `make install-data', to install just the architecture-independent files.)
  47.  
  48. 5. `make distclean' (or `mostlyclean', or `clean', or `realclean',
  49. depending on how clean you want to be).
  50.  
  51. If you wish to preview documents using PostScript fonts, you may find
  52. ftp.cs.umb.edu:pub/tex/psfonts.tar.gz (Ghostscript-generated bitmaps for
  53. the standard 35 PS fonts at multiples of 300dpi) useful.
  54. Alternatives, programs that can generate PK's from PostScript fonts
  55. include:
  56.   math.berkeley.edu:pub/Software/TeX/gsftopk.tar.Z
  57.   ftp.urc.tue.nl:/pub/tex/ps2pk*.tar.gz
  58.   <ctan.host>:/tex-archive/fonts/utilities/ps2mf
  59.  
  60. None of these use kpathsea (or do subdirectory searching). I work around
  61. this by setting up the programs' font paths to include all the (fonts
  62. in) /usr/local/lib/tex/texmf/fonts/.../type1 directories.  One directory
  63. with links to all the Type 1 fonts would be another way to go.  I don't
  64. think these will (or should) ever be kpathsea-using programs.
  65.  
  66. If problems:
  67.  
  68. * See kpathsea/INSTALL for common system-dependent problems.
  69.  
  70. * IBM RT running BSD, compiling with hc: DEFS="-U__STDC__ -w", as
  71.   <stdarg.h> isn't supplied, and the warnings are meaningless.
  72. --kb@cs.umb.edu
  73.  
  74. * SCO: download libXaw from sosco.sco.com:/TLS/tls005.tar.Z.
  75. --lieder@skyler.mavd.honeywell.com
  76.  
  77. * Tadpole Sparcbook: Comes with obsolete X11 libraries in
  78.   /usr/openwin/lib. You must install more recent libraries.
  79. --ato@bellcore.com
  80.  
  81. Date: Wed, 9 Feb 94 16:29 MET
  82. From: simon@lia.di.epfl.ch (Simon Leinen)
  83. To: tex-k@cs.umb.edu
  84. Subject: First hack at a Motif interface for xdvi
  85.  
  86. If you find that xdvi isn't ugly enough yet, you can apply this patch
  87. and recompile xdvi with -DHAVE_MOTIF (and preferably without
  88. -DBUTTONS).  You also need to link against -lXm.  Tested only on IRIX
  89. 5.1 (X11R5/Motif 1.2.2).
  90.  
  91. Have fun(???),
  92. -- 
  93. Simon.
  94.  
  95. *** xdvik/xdvi.c    1994/02/08 21:36:30    1.1
  96. --- xdvik/xdvi.c    1994/02/09 15:21:00
  97. ***************
  98. *** 96,104 ****
  99.   #define    XtSpecificationRelease    0
  100.   #endif
  101.   #if    XtSpecificationRelease >= 4
  102.   #include <X11/Xaw/Viewport.h>
  103.   #ifdef    BUTTONS
  104.   #include <X11/Xaw/Command.h>
  105. ! #endif
  106.   #else    /* XtSpecificationRelease < 4 */
  107.   #define    XtPointer caddr_t
  108. --- 96,113 ----
  109.   #define    XtSpecificationRelease    0
  110.   #endif
  111. + #ifdef  HAVE_MOTIF
  112. + #include <Xm/MainW.h>
  113. + #include <Xm/PushB.h>
  114. + #include <Xm/ToggleB.h>
  115. + #include <Xm/BulletinB.h>
  116. + #include <Xm/Form.h>
  117. + #include <Xm/RowColumn.h>
  118. + #include <Xm/MenuShell.h>
  119. + #else /* not HAVE_MOTIF */
  120.   #if    XtSpecificationRelease >= 4
  121.   #include <X11/Xaw/Viewport.h>
  122.   #ifdef    BUTTONS
  123.   #include <X11/Xaw/Command.h>
  124. ! #endif /* BUTTONS */
  125.   #else    /* XtSpecificationRelease < 4 */
  126.   #define    XtPointer caddr_t
  127. ***************
  128. *** 108,111 ****
  129. --- 117,121 ----
  130.   #endif
  131.   #endif    /* XtSpecificationRelease */
  132. + #endif /* not HAVE_MOTIF */
  133.   #else    /* !TOOLKIT */
  134.   #define    XtNumber(arr)    (sizeof(arr)/sizeof(arr[0]))
  135. ***************
  136. *** 319,322 ****
  137. --- 329,338 ----
  138.   #ifdef    TOOLKIT
  139.   static    Widget    top_level, vport_widget, draw_widget, clip_widget;
  140. + #ifdef HAVE_MOTIF
  141. + static    Widget    menubar;
  142. + static    Widget    scale_menu;
  143. + static    Widget    shrink_button[5];
  144. + static    unsigned max_shrink_button = 0;
  145. + #endif /* HAVE_MOTIF */
  146.   #ifdef    BUTTONS
  147.   static    Widget    form_widget, line_widget, panel_widget;
  148. ***************
  149. *** 325,328 ****
  150. --- 341,347 ----
  151.   
  152.   static    Arg    vport_args[] = {
  153. + #ifdef HAVE_MOTIF
  154. +   {XmNscrollingPolicy, (XtArgVal) XmAUTOMATIC},
  155. + #else /* not HAVE_MOTIF */
  156.   #ifdef    BUTTONS
  157.       {XtNborderWidth, (XtArgVal) 0},
  158. ***************
  159. *** 334,337 ****
  160. --- 353,357 ----
  161.       {XtNallowHoriz,    (XtArgVal) True},
  162.       {XtNallowVert,    (XtArgVal) True},
  163. + #endif /* not HAVE_MOTIF */
  164.   };
  165.   
  166. ***************
  167. *** 351,362 ****
  168.   #ifdef    BUTTONS
  169.   static    Arg    form_args[] = {
  170.       {XtNdefaultDistance, (XtArgVal) 0},
  171.   };
  172.   #define    XTRA_WID    79
  173.   
  174.   static    Arg    line_args[] = {
  175. -     {XtNbackground,    (XtArgVal) 0},
  176. -     {XtNwidth,    (XtArgVal) 1},
  177.       {XtNheight,    (XtArgVal) 0},
  178.       {XtNfromHoriz,    (XtArgVal) NULL},
  179.       {XtNborderWidth, (XtArgVal) 0},
  180. --- 371,390 ----
  181.   #ifdef    BUTTONS
  182.   static    Arg    form_args[] = {
  183. + #ifdef HAVE_MOTIF
  184. +     {XmNhorizontalSpacing, (XtArgVal) 0},
  185. +     {XmNverticalSpacing, (XtArgVal) 0},
  186. + #else /* not HAVE_MOTIF */
  187.       {XtNdefaultDistance, (XtArgVal) 0},
  188. + #endif /* not HAVE_MOTIF */
  189.   };
  190.   #define    XTRA_WID    79
  191.   
  192.   static    Arg    line_args[] = {
  193.       {XtNheight,    (XtArgVal) 0},
  194. + #ifdef HAVE_MOTIF
  195. +     {XmNleftWidget,    (XtArgVal) NULL},
  196. +     {XmNleftAttachment,    (XtArgVal) XmATTACH_WIDGET},
  197. +     {XmNresizable, (XtArgVal) False},
  198. + #else /* not HAVE_MOTIF */
  199.       {XtNfromHoriz,    (XtArgVal) NULL},
  200.       {XtNborderWidth, (XtArgVal) 0},
  201. ***************
  202. *** 365,371 ****
  203. --- 393,410 ----
  204.       {XtNleft,    (XtArgVal) XtChainRight},
  205.       {XtNright,    (XtArgVal) XtChainRight},
  206. +     {XtNbackground,    (XtArgVal) 0},
  207. +     {XtNwidth,    (XtArgVal) 1},
  208. + #endif /* not HAVE_MOTIF */
  209.   };
  210.   
  211.   static    Arg    panel_args[] = {
  212. + #ifdef HAVE_MOTIF
  213. +     {XmNleftWidget,    (XtArgVal) NULL},
  214. +     {XtNwidth,    (XtArgVal) (XTRA_WID - 1)},
  215. +     {XtNheight,    (XtArgVal) 0},
  216. +     {XtNborderWidth, (XtArgVal) 0},
  217. +     {XmNleftAttachment,    (XtArgVal) XmATTACH_WIDGET},
  218. +     {XmNresizable, (XtArgVal) False},
  219. + #else /* not HAVE_MOTIF */
  220.       {XtNfromHoriz,    (XtArgVal) NULL},
  221.       {XtNwidth,    (XtArgVal) (XTRA_WID - 1)},
  222. ***************
  223. *** 376,379 ****
  224. --- 415,419 ----
  225.       {XtNleft,    (XtArgVal) XtChainRight},
  226.       {XtNright,    (XtArgVal) XtChainRight},
  227. + #endif /* not HAVE_MOTIF */
  228.   };
  229.   
  230. ***************
  231. *** 406,415 ****
  232. --- 446,463 ----
  233.   
  234.   static    Arg    command_args[] = {
  235. + #ifdef HAVE_MOTIF
  236. +     {XmNlabelString,    (XtArgVal) NULL},
  237. + #else /* not HAVE_MOTIF */
  238.       {XtNlabel,    (XtArgVal) NULL},
  239. + #endif /* not HAVE_MOTIF */
  240.       {XtNx,        (XtArgVal) 6},
  241.       {XtNy,        (XtArgVal) 0},
  242.       {XtNwidth,    (XtArgVal) 64},
  243.       {XtNheight,    (XtArgVal) 30},
  244. + #ifdef HAVE_MOTIF
  245. +     {XmNactivateCallback,    (XtArgVal) command_call},
  246. + #else /* not HAVE_MOTIF */
  247.       {XtNcallback,    (XtArgVal) command_call},
  248. + #endif /* not HAVE_MOTIF */
  249.   };
  250.   
  251. ***************
  252. *** 420,434 ****
  253.       int i;
  254.   
  255. !     line_args[2].value = h;
  256. !     line_args[3].value = (XtArgVal) vport_widget;
  257.       line_widget = XtCreateManagedWidget("line", widgetClass, form_widget,
  258.           line_args, XtNumber(line_args));
  259.       panel_args[0].value = (XtArgVal) line_widget;
  260.       panel_args[2].value = h;
  261.       panel_widget = XtCreateManagedWidget("panel", compositeWidgetClass,
  262.           form_widget, panel_args, XtNumber(panel_args));
  263.   
  264.       command_args[2].value = (XtArgVal) vport_widget;
  265.       for (i = 0; i < XtNumber(command_table); ++i) {
  266.           command_args[0].value = (XtArgVal) command_table[i].label;
  267.           command_args[2].value = (XtArgVal) command_table[i].y_pos;
  268. --- 468,498 ----
  269.       int i;
  270.   
  271. !     line_args[0].value = h;
  272. !     line_args[1].value = (XtArgVal) vport_widget;
  273.       line_widget = XtCreateManagedWidget("line", widgetClass, form_widget,
  274.           line_args, XtNumber(line_args));
  275.       panel_args[0].value = (XtArgVal) line_widget;
  276.       panel_args[2].value = h;
  277. + #ifdef HAVE_MOTIF
  278. +     panel_widget = XtCreateManagedWidget("panel", xmBulletinBoardWidgetClass,
  279. +         form_widget, panel_args, XtNumber(panel_args));
  280. + #else /* not HAVE_MOTIF */
  281.       panel_widget = XtCreateManagedWidget("panel", compositeWidgetClass,
  282.           form_widget, panel_args, XtNumber(panel_args));
  283. + #endif /* not HAVE_MOTIF */
  284.   
  285.       command_args[2].value = (XtArgVal) vport_widget;
  286. + #ifdef HAVE_MOTIF
  287.       for (i = 0; i < XtNumber(command_table); ++i) {
  288. +         command_args[0].value = (XtArgVal) 
  289. +           XmCvtCTToXmString ((char *) command_table[i].label);
  290. +         command_args[2].value = (XtArgVal) command_table[i].y_pos;
  291. +         command_call[0].closure = (caddr_t) command_table[i].closure;
  292. +         (void) XtCreateManagedWidget(command_table[i].name,
  293. +         xmPushButtonWidgetClass, panel_widget,
  294. +         command_args, XtNumber(command_args));
  295. +     }
  296. + #else /* not HAVE_MOTIF */
  297. +     for (i = 0; i < XtNumber(command_table); ++i) {
  298.           command_args[0].value = (XtArgVal) command_table[i].label;
  299.           command_args[2].value = (XtArgVal) command_table[i].y_pos;
  300. ***************
  301. *** 438,441 ****
  302. --- 502,506 ----
  303.           command_args, XtNumber(command_args));
  304.       }
  305. + #endif /* not HAVE_MOTIF */
  306.   }
  307.   #endif    /* BUTTONS */
  308. ***************
  309. *** 1036,1040 ****
  310.   }
  311.   
  312. ! #ifdef    BUTTONS
  313.       /*ARGSUSED*/
  314.   static    void
  315. --- 1101,1105 ----
  316.   }
  317.   
  318. ! #if defined(BUTTONS) || defined(HAVE_MOTIF)
  319.       /*ARGSUSED*/
  320.   static    void
  321. ***************
  322. *** 1408,1411 ****
  323. --- 1473,1498 ----
  324.   }
  325.   
  326. + static void
  327. + set_shrink_factor(win, shrink)
  328. +      struct WindowRec * win;
  329. +      int shrink;
  330. + {
  331. + #ifdef HAVE_MOTIF
  332. +   static Widget active_shrink_button = 0;
  333. +   if (win->shrinkfactor != shrink || !active_shrink_button)
  334. +     {
  335. +       if (active_shrink_button)
  336. +     XmToggleButtonSetState (active_shrink_button, False, False);
  337. +       win->shrinkfactor = shrink;
  338. +       if (shrink <= max_shrink_button
  339. +       && (active_shrink_button = shrink_button[shrink]))
  340. +     XmToggleButtonSetState (active_shrink_button, True, False);
  341. +     }
  342. + #else /* not HAVE_MOTIF */
  343. +   win->shrinkfactor = shrink;
  344. + #endif /* not HAVE_MOTIF */
  345. + }
  346.   #ifdef    TOOLKIT
  347.       /*ARGSUSED*/
  348. ***************
  349. *** 1648,1652 ****
  350.           if (number0 <= 0) goto bad;
  351.           if (number0 == mane.shrinkfactor) return;
  352. !         mane.shrinkfactor = number0;
  353.           init_page();
  354.           if (number0 != 1 && number0 != bak_shrink) {
  355. --- 1735,1739 ----
  356.           if (number0 <= 0) goto bad;
  357.           if (number0 == mane.shrinkfactor) return;
  358. !         set_shrink_factor (&mane, number0);
  359.           init_page();
  360.           if (number0 != 1 && number0 != bak_shrink) {
  361. ***************
  362. *** 2746,2749 ****
  363. --- 2833,2902 ----
  364.    */
  365.   
  366. + static void
  367. + file_pulldown_callback (w, client_data, call_data)
  368. +      Widget w;
  369. +      XtPointer client_data;
  370. +      XtPointer call_data;
  371. + {
  372. +   switch ((int) client_data) {
  373. +   case 0:
  374. +     keystroke ('R', 0, False, 0);
  375. +     break;
  376. +   case 1:
  377. +     keystroke ('q', 0, False, 0);
  378. +     break;
  379. +   }
  380. + }
  381. + static void
  382. + navigate_pulldown_callback (w, client_data, call_data)
  383. +      Widget w;
  384. +      XtPointer client_data;
  385. +      XtPointer call_data;
  386. + {
  387. +   switch ((int) client_data) {
  388. +   case 0:
  389. +     keystroke ('p', 10, True, 0);
  390. +     break;
  391. +   case 1:
  392. +     keystroke ('p', 5, True, 0);
  393. +     break;
  394. +   case 2:
  395. +     keystroke ('p', 0, False, 0);
  396. +     break;
  397. +   case 5:
  398. +     keystroke ('n', 10, True, 0);
  399. +     break;
  400. +   case 4:
  401. +     keystroke ('n', 5, True, 0);
  402. +     break;
  403. +   case 3:
  404. +     keystroke ('n', 0, False, 0);
  405. +     break;
  406. +   }
  407. + }
  408. + static void
  409. + scale_pulldown_callback (w, client_data, call_data)
  410. +      Widget w;
  411. +      XtPointer client_data;
  412. +      XtPointer call_data;
  413. + {
  414. +   switch ((int) client_data) {
  415. +   case 0:
  416. +     keystroke ('s', 1, True, 0);
  417. +     break;
  418. +   case 1:
  419. +     keystroke ('s', 2, True, 0);
  420. +     break;
  421. +   case 2:
  422. +     keystroke ('s', 3, True, 0);
  423. +     break;
  424. +   case 3:
  425. +     keystroke ('s', 4, True, 0);
  426. +     break;
  427. +   }
  428. + }
  429.   int
  430.   main(argc, argv)
  431. ***************
  432. *** 2838,2842 ****
  433.           dvi_name == NULL) usage();
  434.       if (shrink_factor != 1) bak_shrink = shrink_factor;
  435. !     mane.shrinkfactor = shrink_factor;
  436.       if (RESOURCE(debug_arg) != NULL)
  437.           debug = isdigit(*RESOURCE(debug_arg)) ? atoi(RESOURCE(debug_arg))
  438. --- 2991,2995 ----
  439.           dvi_name == NULL) usage();
  440.       if (shrink_factor != 1) bak_shrink = shrink_factor;
  441. !     set_shrink_factor (&mane, shrink_factor);
  442.       if (RESOURCE(debug_arg) != NULL)
  443.           debug = isdigit(*RESOURCE(debug_arg)) ? atoi(RESOURCE(debug_arg))
  444. ***************
  445. *** 3012,3017 ****
  446. --- 3165,3175 ----
  447.   
  448.   #ifdef    BUTTONS
  449. + #ifdef HAVE_MOTIF
  450. +     form_widget = XtCreateManagedWidget("form", xmFormWidgetClass,
  451. +         top_level, form_args, XtNumber(form_args));
  452. + #else /* not HAVE_MOTIF */
  453.       form_widget = XtCreateManagedWidget("form", formWidgetClass,
  454.           top_level, form_args, XtNumber(form_args));
  455. + #endif /* not HAVE_MOTIF */
  456.   
  457.       line_args[0].value = (XtArgVal) resource.high_color
  458. ***************
  459. *** 3020,3026 ****
  460. --- 3178,3237 ----
  461.   #define    form_widget    top_level    /* for calls to XtAddEventHandler */
  462.   #endif    /* BUTTONS */
  463. + #ifdef HAVE_MOTIF
  464. +     vport_widget = XtCreateManagedWidget
  465. +       ("vport",
  466. +        xmMainWindowWidgetClass, form_widget,
  467. +        vport_args, XtNumber(vport_args));
  468. +     XtVaGetValues (vport_widget, XmNclipWindow, &clip_widget, NULL);
  469. +     menubar = XmVaCreateSimpleMenuBar
  470. +       (vport_widget, "menubar",
  471. +        XmVaCASCADEBUTTON, (XtArgVal) XmCvtCTToXmString("File"), 0, 
  472. +        XmVaCASCADEBUTTON, (XtArgVal) XmCvtCTToXmString("Navigate"), 0,
  473. +        XmVaCASCADEBUTTON, (XtArgVal) XmCvtCTToXmString("Scale"), 0,
  474. +        0);
  475. +     {
  476. +       XmVaCreateSimplePulldownMenu 
  477. +          (menubar, "file_pulldown", 0, file_pulldown_callback,
  478. +           XmNtearOffModel, (XtArgVal) XmTEAR_OFF_ENABLED,
  479. +           XmVaPUSHBUTTON, (XtArgVal) XmCvtCTToXmString("Reload"), 0, 0, 0,
  480. +           XmVaSEPARATOR,
  481. +           XmVaPUSHBUTTON, (XtArgVal) XmCvtCTToXmString("Quit"), 0, 0, 0,
  482. +           0);
  483. +     }
  484. +     {
  485. +       XmVaCreateSimplePulldownMenu 
  486. +         (menubar, "navigate_pulldown", 1, navigate_pulldown_callback,
  487. +          XmNtearOffModel, (XtArgVal) XmTEAR_OFF_ENABLED,
  488. +          XmVaPUSHBUTTON, (XtArgVal) XmCvtCTToXmString("Page-10"), 0, 0, 0,
  489. +          XmVaPUSHBUTTON, (XtArgVal) XmCvtCTToXmString("Page-5"), 0, 0, 0,
  490. +          XmVaPUSHBUTTON, (XtArgVal) XmCvtCTToXmString("Prev"), 0, 0, 0,
  491. +          XmVaSEPARATOR,
  492. +          XmVaPUSHBUTTON, (XtArgVal) XmCvtCTToXmString("Next"), 0, 0, 0,
  493. +          XmVaPUSHBUTTON, (XtArgVal) XmCvtCTToXmString("Page+5"), 0, 0, 0,
  494. +          XmVaPUSHBUTTON, (XtArgVal) XmCvtCTToXmString("Page+10"), 0, 0, 0,
  495. +          0);
  496. +     }
  497. +     {
  498. +       scale_menu = XmVaCreateSimplePulldownMenu 
  499. +         (menubar, "scale_pulldown", 2, scale_pulldown_callback,
  500. +          XmNradioBehavior, (XtArgVal) True,
  501. +          XmNtearOffModel, (XtArgVal) XmTEAR_OFF_ENABLED,
  502. +          XmVaRADIOBUTTON, (XtArgVal) XmCvtCTToXmString("Shrink1"), 0, 0, 0,
  503. +          XmVaRADIOBUTTON, (XtArgVal) XmCvtCTToXmString("Shrink2"), 0, 0, 0,
  504. +          XmVaRADIOBUTTON, (XtArgVal) XmCvtCTToXmString("Shrink3"), 0, 0, 0,
  505. +          XmVaRADIOBUTTON, (XtArgVal) XmCvtCTToXmString("Shrink4"), 0, 0, 0,
  506. +          0);
  507. +       shrink_button[1] = XtNameToWidget(scale_menu, "button_0");
  508. +       shrink_button[2] = XtNameToWidget(scale_menu, "button_1");
  509. +       shrink_button[3] = XtNameToWidget(scale_menu, "button_2");
  510. +       shrink_button[4] = XtNameToWidget(scale_menu, "button_3");
  511. +       max_shrink_button = 4;
  512. +       set_shrink_factor (&mane, mane.shrinkfactor);
  513. +     }
  514. + #else /* not HAVE_MOTIF */
  515.       vport_widget = XtCreateManagedWidget("vport", viewportWidgetClass,
  516.           form_widget, vport_args, XtNumber(vport_args));
  517.       clip_widget = XtNameToWidget(vport_widget, "clip");
  518. + #endif /* not HAVE_MOTIF */
  519.       draw_args[0].value = (XtArgVal) page_w;
  520.       draw_args[1].value = (XtArgVal) page_h;
  521. ***************
  522. *** 3030,3033 ****
  523. --- 3241,3248 ----
  524.       draw_widget = XtCreateManagedWidget("drawing", drawWidgetClass,
  525.           vport_widget, draw_args, XtNumber(draw_args));
  526. + #ifdef HAVE_MOTIF
  527. +     XmMainWindowSetAreas(vport_widget, menubar, 0, 0, 0, draw_widget);
  528. +     XtManageChild(menubar);
  529. + #endif /* HAVE_MOTIF */
  530.       {    /* set default window size */
  531.   #ifdef    BUTTONS
  532.  
  533.