home *** CD-ROM | disk | FTP | other *** search
/ Internet Info 1997 December / Internet_Info_CD-ROM_Walnut_Creek_December_1997.iso / faqs / comp / answers / motif-faq / part9 < prev   
Encoding:
Internet Message Format  |  1997-10-19  |  62.2 KB

  1. Path: senator-bedfellow.mit.edu!faqserv
  2. From: kenton@rahul.net (Ken Lee)
  3. Newsgroups: comp.windows.x.motif,comp.answers,news.answers
  4. Subject: Motif FAQ (Part 9 of 9)
  5. Supersedes: <motif-faq/part9_875789459@rtfm.mit.edu>
  6. Followup-To: poster
  7. Date: 18 Oct 1997 10:15:46 GMT
  8. Organization: none
  9. Lines: 1744
  10. Approved: news-answers-request@MIT.EDU
  11. Distribution: inet
  12. Expires: 1 Dec 1997 10:06:58 GMT
  13. Message-ID: <motif-faq/part9_877169218@rtfm.mit.edu>
  14. References: <motif-faq/part1_877169218@rtfm.mit.edu>
  15. Reply-To: kenton@rahul.net (Ken Lee)
  16. NNTP-Posting-Host: penguin-lust.mit.edu
  17. Summary: Motif Frequently Asked Questions (with answers).
  18. Keywords: FAQ question answer
  19. X-Last-Updated: 1997/08/27
  20. Originator: faqserv@penguin-lust.MIT.EDU
  21. Xref: senator-bedfellow.mit.edu comp.windows.x.motif:60057 comp.answers:28585 news.answers:114857
  22.  
  23. Archive-name: motif-faq/part9
  24. Last-modified: SEP 1, 1997
  25. Posting-Frequency: irregular
  26. Organization: Kenton Lee, X/Motif Consultant, http://www.rahul.net/kenton/
  27. URL:  http://www.rahul.net/kenton/faqs/mfaq_index.html
  28. Version: 6.3
  29.  
  30. -----------------------------------------------------------------------------
  31. Subject: 295)  Why doesn't the Help callback work on some widgets?
  32.  
  33. [Last modified: May 95]
  34.  
  35. Answer:  If you press the help key the help callback of the widget with the
  36. keyboard focus is called (not the one containing the mouse).  You can't get
  37. the help callback of a non-keyboard-selectable widget called. To get `context
  38. sensitive' help on these, you have to find the mouse, associate its position
  39. with a widget and then do the help.
  40.  
  41.  The X Resource, Issue 6, has an article on implementing context help in
  42.  Motif in this manner, that is, using the mouse position to indicate the
  43.  widget for which context help is desired, as well as using resources to
  44.  specify the help.  Example source code is available at
  45.  
  46.         ftp://ftp.ora.com/pub/examples/xresource/issue6/helpdemo.tar.Z
  47.  
  48.  The demo program lets you toggle between using the method described in
  49.  the article and XmTrackingLocate() for comparision purposes.
  50.  
  51. Contributed by:  Jay Schmidgall  jay@vnet.ibm.com (author of the article
  52. mentioned above).  Thanks to chen@adi.com (Franklin Chen) for correcting the
  53. URL.
  54.  
  55. -----------------------------------------------------------------------------
  56. Subject: 296)  How can I implement "bubble help" or "tool tips" with Motif?
  57.  
  58. [Last modified: Nov 96]
  59.  
  60. Answer:  Gary Aviv (gary@compgen.com) informed this maintainer about the free
  61. LiteClue widget from Computer Generation, Inc. (http://www.compgen.com/).
  62. LiteClue is a widget which pops a one line help message when the user passes
  63. the pointer over another "watched" widget. This is known by various names in
  64. the industry such as hints, clues, tips, bubble help and balloon help.
  65. Technical documentation and source for the LiteClue widget are available from:
  66.  
  67.         http://www.compgen.com/widgets/LiteClue.html
  68.         ftp://ftp.compgen.com/pub/widgets/LiteClue.tar.Z
  69.  
  70. Ken Lee (http://www.rahul.net/kenton/) writes:  A simple technique is to popup
  71. a shell when enter/leave events occur.  Rick Evans wrote a tutorialfor the
  72. July, 1995 issue of *The X Advisor*:
  73.  
  74.     http://www.unx.com/DD/advisor/docs/jul95/jul95.evans.shtml
  75.  
  76. Morris Hirsch (hirsch@cs.umass.edu) has another approach and contributed a
  77. code example which is over 1000 lines, so I've put the code on our web site:
  78.  
  79.         http://www.cen.com/mw3/bubbleHelp.txt
  80.  
  81. -----------------------------------------------------------------------------
  82. Subject: 297)  Can I specify a widget in a resource file?
  83.  
  84. Answer:  This answer, which uses the Xmu library, is due to David Elliott.  If
  85. the converter is added, then the name of a widget (a string) can be used in
  86. resource files, and will be converted to the appropriate widget.
  87.  
  88. This code, which was basically stolen from the Athena Form widget, adds a
  89. String to Widget converter.  I wrote it as a general routine that I call at
  90. the beginning of all of my programs, and made it so I could add other
  91. converters as needed (like String to Unit Type ;-).
  92.  
  93.         #include <X11/Intrinsic.h>
  94.         #include <X11/StringDefs.h>
  95.         #include <Xm/Xm.h>
  96.         #include <X11/Xmu/Converters.h>
  97.         #include <X11/IntrinsicP.h>
  98.         #include <X11/CoreP.h>
  99.  
  100.         void
  101.         setupConverters()
  102.         {
  103.                 static XtConvertArgRec parentCvtArgs[] = {
  104.                         {XtBaseOffset, (caddr_t)XtOffset(Widget, core.parent),
  105.                                 sizeof(Widget)}
  106.                 };
  107.  
  108.                 XtAddConverter(XmRString, XmRWindow, XmuCvtStringToWidget,
  109.                         parentCvtArgs, XtNumber(parentCvtArgs));
  110.         }
  111.  
  112.  
  113. -----------------------------------------------------------------------------
  114. Subject: 298)  Why are only some of my translations are being installed?  I
  115. have a translation table like the following, but only the first ones are
  116. getting installed and the rest are ignored.
  117.  
  118.  *Text.translations:    #override \
  119.      Ctrl<Key>a:    beginning-of-line() \n\
  120.      Ctrl<Key>e:    end-of-line() \n\
  121.      Ctrl<Key>f:    forward-character() \n\
  122.  
  123. Answer:  Most likely, you have a space at the end of one of the lines (the
  124. first in this case).
  125.  
  126.      Ctrl<Key>a:    beginning-of-line() \n\
  127.                                            ^ space here
  128.  
  129. The second backslash in each line is there to protect the real newline
  130. character and so you must not follow it with anything other than the newline
  131. itself. Otherwise it acts as the end of the resource definition and the
  132. remaining lines are not added.
  133.  
  134.  
  135. -----------------------------------------------------------------------------
  136. Subject: 299)  Where can I get the PanHandler code?
  137.  
  138. [Last modified: Nov 96]
  139.  
  140. Answer:  It is available by email from Chuck Ocheret:  chuck@NYC.Thinkbank.COM
  141. (email change).
  142.  
  143. -----------------------------------------------------------------------------
  144. Subject: 300)  What are these passive grab warnings?  When I destroy certain
  145. widgets I get a stream of messages
  146.  
  147.     Warning: Attempt to remove non-existant passive grab
  148.  
  149.  
  150. Answer:  They are meaningless, and you want to ignore them.  Do this (from Kee
  151. Hinckley) by installing an XtWarning handler that explicitly looks for them
  152. and discards them:
  153.  
  154.         static void xtWarnCB(String message) {
  155.            if (asi_strstr(message, "non-existant passive grab", TRUE)) return;
  156.            ...
  157.  
  158. They come from Xt, and (W. Scott Meeks): "it's something that the designers of
  159. Xt decided the toolkit should do. Unfortunately, Motif winds up putting
  160. passive grabs all over the place for the menu system.  On the one hand, we
  161. want to remove all these grabs when menus get destroyed so that they don't
  162. leak memory; on the other hand, it's almost impossible to keep track of all
  163. the grabs, so we have a conservative strategy of ungrabbing any place where a
  164. grab could have been made and we don't explicitly know that there is no grab.
  165. The unfortunate side effect is the little passive grab warning messages.
  166. We're trying to clean these up where possible, but there are some new places
  167. where the warning is generated.  Until we get this completely cleaned up (1.2
  168. maybe), your best bet is probably to use a warning handler."
  169.  
  170. -----------------------------------------------------------------------------
  171. Subject: 301)  How do I have more buttons than three in a MessageBox?  I want
  172. to have something like a MessageBox (or other widget) with more than three
  173. buttons, but with the same nice appearance.
  174.  
  175. [Last modified: Feb 95]
  176.  
  177. Answer:  The Motif 1.2 MessageBox widget allows extra buttons to be added
  178. after the OK button. Just create the extra buttons as children of the
  179. MessageBox. Similarly with the SelectionBox.
  180.  
  181. Pre-Motif 1.2, you have to do one of the following methods.
  182.  
  183. A SelectionBox is created with four buttons, but the fourth (the Apply button)
  184. is unmanaged. To manage it get its widget ID via
  185. XmSelectionBoxGetChild(parent, XmDIALOG_APPLY_BUTTON) and then XtManage it.
  186. Unmanage all of the other bits in the SelectionBox that you don't want.  If
  187. you want more than four buttons, try two SelectionBoxes (or similar) together
  188. in a container, where all of the unwanted parts of the widgets are unmanaged.
  189.  
  190. Alternatively, build your own dialog:
  191.  
  192. /* Written by Dan Heller.  Copyright 1991, O'Reilly && Associates.
  193.  * This program is freely distributable without licensing fees and
  194.  * is provided without guarantee or warranty expressed or implied.
  195.  * This program is -not- in the public domain.  This program is
  196.  * taken from the Motif Programming Manual, O'Reilly Volume 6.
  197.  */
  198.  
  199. /* action_area.c -- demonstrate how CreateActionArea() can be used
  200.  * in a real application.  Create what would otherwise be identified
  201.  * as a PromptDialog, only this is of our own creation.  As such,
  202.  * we provide a TextField widget for input.  When the user presses
  203.  * Return, the Ok button is activated.
  204.  */
  205. #include <Xm/DialogS.h>
  206. #include <Xm/PushBG.h>
  207. #include <Xm/PushB.h>
  208. #include <Xm/LabelG.h>
  209. #include <Xm/PanedW.h>
  210. #include <Xm/Form.h>
  211. #include <Xm/RowColumn.h>
  212. #include <Xm/TextF.h>
  213.  
  214. typedef struct {
  215.     char *label;
  216.     void (*callback)();
  217.     caddr_t data;
  218. } ActionAreaItem;
  219.  
  220. static void
  221.     do_dialog(), close_dialog(), activate_cb(),
  222.     ok_pushed(), cancel_pushed(), help();
  223.  
  224. main(argc, argv)
  225. int argc;
  226. char *argv[];
  227. {
  228.     Widget toplevel, button;
  229.     XtAppContext app;
  230.  
  231.     toplevel = XtVaAppInitialize(&app, "Demos",
  232.         NULL, 0, &argc, argv, NULL, NULL);
  233.  
  234.     button = XtVaCreateManagedWidget("Push Me",
  235.         xmPushButtonWidgetClass, toplevel, NULL);
  236.     XtAddCallback(button, XmNactivateCallback, do_dialog, NULL);
  237.  
  238.     XtRealizeWidget(toplevel);
  239.     XtAppMainLoop(app);
  240. }
  241.  
  242. /* callback routine for "Push Me" button.  Actually, this represents
  243.  * a function that could be invoked by any arbitrary callback.  Here,
  244.  * we demonstrate how one can build a standard customized dialog box.
  245.  * The control area is created here and the action area is created in
  246.  * a separate, generic routine: CreateActionArea().
  247.  */
  248. static void
  249. do_dialog(w, file)
  250. Widget w; /* will act as dialog's parent */
  251. char *file;
  252. {
  253.     Widget dialog, pane, rc, label, text_w, action_a;
  254.     XmString string;
  255.     extern Widget CreateActionArea();
  256.     Arg args[10];
  257.     static ActionAreaItem action_items[] = {
  258.         { "Ok",     ok_pushed,     NULL          },
  259.         { "Cancel", cancel_pushed, NULL          },
  260.         { "Close",  close_dialog,  NULL          },
  261.         { "Help",   help,          "Help Button" },
  262.     };
  263.  
  264.     /* The DialogShell is the Shell for this dialog.  Set it up so
  265.      * that the "Close" button in the window manager's system menu
  266.      * destroys the shell (it only unmaps it by default).
  267.      */
  268.     dialog = XtVaCreatePopupShell("dialog",
  269.         xmDialogShellWidgetClass, XtParent(w),
  270.         XmNtitle,  "Dialog Shell",     /* give arbitrary title in wm */
  271.         XmNdeleteResponse, XmDESTROY,  /* system menu "Close" action */
  272.         NULL);
  273.  
  274.     /* now that the dialog is created, set the Close button's
  275.      * client data, so close_dialog() will know what to destroy.
  276.      */
  277.     action_items[2].data = (caddr_t)dialog;
  278.  
  279.     /* Create the paned window as a child of the dialog.  This will
  280.      * contain the control area (a Form widget) and the action area
  281.      * (created by CreateActionArea() using the action_items above).
  282.      */
  283.     pane = XtVaCreateWidget("pane", xmPanedWindowWidgetClass, dialog,
  284.         XmNsashWidth,  1,
  285.         XmNsashHeight, 1,
  286.         NULL);
  287.  
  288.     /* create the control area (Form) which contains a
  289.      * Label gadget and a List widget.
  290.      */
  291.     rc = XtVaCreateWidget("control_area", xmRowColumnWidgetClass, pane, NULL);
  292.     string = XmStringCreateLocalized("Type Something:");
  293.     XtVaCreateManagedWidget("label", xmLabelGadgetClass, rc,
  294.         XmNlabelString,    string,
  295.         XmNleftAttachment, XmATTACH_FORM,
  296.         XmNtopAttachment,  XmATTACH_FORM,
  297.         NULL);
  298.     XmStringFree(string);
  299.  
  300.     text_w = XtVaCreateManagedWidget("text-field",
  301.         xmTextFieldWidgetClass, rc, NULL);
  302.  
  303.     /* RowColumn is full -- now manage */
  304.     XtManageChild(rc);
  305.  
  306.     /* Set the client data "Ok" and "Cancel" button's callbacks. */
  307.     action_items[0].data = (caddr_t)text_w;
  308.     action_items[1].data = (caddr_t)text_w;
  309.  
  310.     /* Create the action area -- we don't need the widget it returns. */
  311.     action_a = CreateActionArea(pane, action_items, XtNumber(action_items));
  312.  
  313.     /* callback for Return in TextField.  Use action_a as client data */
  314.     XtAddCallback(text_w, XmNactivateCallback, activate_cb, action_a);
  315.  
  316.     XtManageChild(pane);
  317.     XtPopup(dialog, XtGrabNone);
  318. }
  319.  
  320. /*--------------*/
  321. /* The next four functions are the callback routines for the buttons
  322.  * in the action area for the dialog created above.  Again, they are
  323.  * simple examples, yet they demonstrate the fundamental design approach.
  324.  */
  325. static void
  326. close_dialog(w, shell)
  327. Widget w, shell;
  328. {
  329.     XtDestroyWidget(shell);
  330. }
  331.  
  332. /* The "ok" button was pushed or the user pressed Return */
  333. static void
  334. ok_pushed(w, text_w, cbs)
  335. Widget w, text_w;         /* the text widget is the client data */
  336. XmAnyCallbackStruct *cbs;
  337. {
  338.     char *text = XmTextFieldGetString(text_w);
  339.  
  340.     printf("String = %s0, text);
  341.     XtFree(text);
  342. }
  343.  
  344. static void
  345. cancel_pushed(w, text_w, cbs)
  346. Widget w, text_w;         /* the text field is the client data */
  347. XmAnyCallbackStruct *cbs;
  348. {
  349.     /* cancel the whole operation; reset to NULL. */
  350.     XmTextFieldSetString(text_w, "");
  351. }
  352.  
  353. static void
  354. help(w, string)
  355. Widget w;
  356. String string;
  357. {
  358.     puts(string);
  359. }
  360. /*--------------*/
  361.  
  362. /* When Return is pressed in TextField widget, respond by getting
  363.  * the designated "default button" in the action area and activate
  364.  * it as if the user had selected it.
  365.  */
  366. static void
  367. activate_cb(text_w, client_data, cbs)
  368. Widget text_w;              /* user pressed Return in this widget */
  369. XtPointer client_data;        /* action_area passed as client data */
  370. XmAnyCallbackStruct *cbs;   /* borrow the "event" field from this */
  371. {
  372.     Widget dflt, action_area = (Widget)client_data;
  373.  
  374.     XtVaGetValues(action_area, XmNdefaultButton, &dflt, NULL);
  375.     if (dflt) /* sanity check -- this better work */
  376.         /* make the default button think it got pushed.  This causes
  377.          * "ok_pushed" to be called, but XtCallActionProc() causes
  378.          * the button appear to be activated as if the user selected it.
  379.          */
  380.         XtCallActionProc(dflt, "ArmAndActivate", cbs->event, NULL, 0);
  381. }
  382.  
  383. #define TIGHTNESS 20
  384.  
  385. Widget
  386. CreateActionArea(parent, actions, num_actions)
  387. Widget parent;
  388. ActionAreaItem *actions;
  389. int num_actions;
  390. {
  391.     Widget action_area, widget;
  392.     int i;
  393.  
  394.     action_area = XtVaCreateWidget("action_area", xmFormWidgetClass, parent,
  395.         XmNfractionBase, TIGHTNESS*num_actions - 1,
  396.         XmNleftOffset,   10,
  397.         XmNrightOffset,  10,
  398.         NULL);
  399.  
  400.     for (i = 0; i < num_actions; i++) {
  401.         widget = XtVaCreateManagedWidget(actions[i].label,
  402.             xmPushButtonWidgetClass, action_area,
  403.             XmNleftAttachment,       i? XmATTACH_POSITION : XmATTACH_FORM,
  404.             XmNleftPosition,         TIGHTNESS*i,
  405.             XmNtopAttachment,        XmATTACH_FORM,
  406.             XmNbottomAttachment,     XmATTACH_FORM,
  407.             XmNrightAttachment,
  408.                     i != num_actions-1? XmATTACH_POSITION : XmATTACH_FORM,
  409.             XmNrightPosition,        TIGHTNESS*i + (TIGHTNESS-1),
  410.             XmNshowAsDefault,        i == 0,
  411.             XmNdefaultButtonShadowThickness, 1,
  412.             NULL);
  413.         if (actions[i].callback)
  414.             XtAddCallback(widget, XmNactivateCallback,
  415.                 actions[i].callback, actions[i].data);
  416.         if (i == 0) {
  417.             /* Set the action_area's default button to the first widget
  418.              * created (or, make the index a parameter to the function
  419.              * or have it be part of the data structure). Also, set the
  420.              * pane window constraint for max and min heights so this
  421.              * particular pane in the PanedWindow is not resizable.
  422.              */
  423.             Dimension height, h;
  424.             XtVaGetValues(action_area, XmNmarginHeight, &h, NULL);
  425.             XtVaGetValues(widget, XmNheight, &height, NULL);
  426.             height += 2 * h;
  427.             XtVaSetValues(action_area,
  428.                 XmNdefaultButton, widget,
  429.                 XmNpaneMaximum,   height,
  430.                 XmNpaneMinimum,   height,
  431.                 NULL);
  432.         }
  433.     }
  434.  
  435.     XtManageChild(action_area);
  436.  
  437.     return action_area;
  438. }
  439.  
  440. -----------------------------------------------------------------------------
  441. Subject: 302)  How do I create a "busy working cursor"?
  442.  
  443. [Last modified: Feb 95]
  444.  
  445. Answer:  - in Baudouin's code (following), the idea is to keep in an array an
  446. up-to-date list of all shells used in the application, and set for all of them
  447. the cursor to a watch or to the default cursor, with the 2 functions provided.
  448.  
  449. - in Dan Heller's code (later), the idea is to turn on the watch cursor for
  450. the top-level shell only, popup a working window to possibly abort the
  451. callback, and manage some expose events during the callback.
  452.  
  453. - in the FAQ for comp.windows.x, the idea is to bring a large window on top of
  454. the application, hide all windows below it, and turn on the watch cursor on
  455.  
  456.  
  457.                                     - 13 -
  458.  
  459.  
  460. this large window. Unmapping the large window resets the default cursor,
  461. mapping it turns on the watch cursor.
  462.  
  463. Baudouin Raoult (mab@ecmwf.int) wrote:
  464.  
  465. void my_SetWatchCursor(w)
  466. Widget w;
  467. {
  468.         static Cursor watch = NULL;
  469.  
  470.         if(!watch)
  471.                 watch = XCreateFontCursor(XtDisplay(w),XC_watch);
  472.  
  473.         XDefineCursor(XtDisplay(w),XtWindow(w),watch);
  474.         XmUpdateDisplay(w);
  475. }
  476.  
  477. void my_ResetCursor(w)
  478. Widget w;
  479. {
  480.         XUndefineCursor(XtDisplay(w),XtWindow(w));
  481.         XmUpdateDisplay(w);
  482. }
  483.  
  484.  
  485. Answer:  A solution with lots of bells and whistles is
  486.  
  487. /* Written by Dan Heller.  Copyright 1991, O'Reilly && Associates.
  488.  * This program is freely distributable without licensing fees and
  489.  * is provided without guarantee or warrantee expressed or implied.
  490.  * This program is -not- in the public domain.
  491.  */
  492.  
  493. /* busy.c -- demonstrate how to use a WorkingDialog and to process
  494.  * only "important" events.  e.g., those that may interrupt the
  495.  * task or to repaint widgets for exposure.  Set up a simple shell
  496.  * and a widget that, when pressed, immediately goes into its own
  497.  * loop.  First, "lock" the shell so that a timeout cursor is set on
  498.  * the shell and pop up a WorkingDialog.  Then enter loop ... sleep
  499.  * for one second ten times, checking between each interval to see
  500.  * if the user clicked the Stop button or if any widgets need to be
  501.  * refreshed.  Ignore all other events.
  502.  *
  503.  * main() and get_busy() are stubs that would be replaced by a real
  504.  * application; all other functions can be used "as is."
  505.  */
  506. #include <Xm/MessageB.h>
  507. #include <Xm/PushB.h>
  508. #include <X11/cursorfont.h>
  509.  
  510. Widget shell;
  511. void TimeoutCursors();
  512. Boolean CheckForInterrupt();
  513.  
  514. main(argc, argv)
  515. int argc;
  516. char *argv[];
  517. {
  518.     XtAppContext app;
  519.     Widget button;
  520.     XmString label;
  521.     void get_busy();
  522.  
  523.     shell = XtVaAppInitialize(&app, "Demos",
  524.         NULL, 0, &argc, argv, NULL, NULL);
  525.  
  526.     label = XmStringCreateLocalized(
  527.         "Boy, is *this* going to take a long time.");
  528.     button = XtVaCreateManagedWidget("button",
  529.         xmPushButtonWidgetClass, shell,
  530.         XmNlabelString,          label,
  531.         NULL);
  532.     XmStringFree(label);
  533.     XtAddCallback(button, XmNactivateCallback, get_busy, argv[1]);
  534.  
  535.     XtRealizeWidget(shell);
  536.     XtAppMainLoop(app);
  537. }
  538.  
  539. void
  540. get_busy(widget)
  541. Widget widget;
  542. {
  543.     int n;
  544.  
  545.     TimeoutCursors(True, True);
  546.     for (n = 0; n < 10; n++) {
  547.         sleep(1);
  548.         if (CheckForInterrupt()) {
  549.             puts("Interrupt!");
  550.             break;
  551.         }
  552.     }
  553.     if (n == 10)
  554.         puts("done.");
  555.     TimeoutCursors(False, NULL);
  556. }
  557.  
  558. /* The interesting part of the program -- extract and use at will */
  559. static Boolean stopped;  /* True when user wants to stop processing */
  560. static Widget dialog;    /* WorkingDialog displayed when timed out */
  561.  
  562. /* timeout_cursors() turns on the "watch" cursor over the application
  563.  * to provide feedback for the user that he's going to be waiting
  564.  * a while before he can interact with the appliation again.
  565.  */
  566. void
  567. TimeoutCursors(on, interruptable)
  568. int on, interruptable;
  569. {
  570.     static int locked;
  571.     static Cursor cursor;
  572.     extern Widget shell;
  573.     XSetWindowAttributes attrs;
  574.     Display *dpy = XtDisplay(shell);
  575.     XEvent event;
  576.     Arg args[1];
  577.     XmString str;
  578.     extern void stop();
  579.  
  580.     /* "locked" keeps track if we've already called the function.
  581.      * This allows recursion and is necessary for most situations.
  582.      */
  583.     on? locked++ : locked--;
  584.     if (locked > 1 || locked == 1 && on == 0)
  585.         return; /* already locked and we're not unlocking */
  586.  
  587.     stopped = False; /* doesn't matter at this point; initialize */
  588.     if (!cursor) /* make sure the timeout cursor is initialized */
  589.         cursor = XCreateFontCursor(dpy, XC_watch);
  590.  
  591.     /* if "on" is true, then turn on watch cursor, otherwise, return
  592.      * the shell's cursor to normal.
  593.      */
  594.     attrs.cursor = on? cursor : None;
  595.  
  596.     /* change the main application shell's cursor to be the timeout
  597.      * cursor (or to reset it to normal).  If other shells exist in
  598.      * this application, they will have to be listed here in order
  599.      * for them to have timeout cursors too.
  600.      */
  601.     XChangeWindowAttributes(dpy, XtWindow(shell), CWCursor, &attrs);
  602.  
  603.     XFlush(dpy);
  604.  
  605.     if (on) {
  606.         /* we're timing out, put up a WorkingDialog.  If the process
  607.          * is interruptable, allow a "Stop" button.  Otherwise, remove
  608.          * all actions so the user can't stop the processing.
  609.          */
  610.         str = XmStringCreateLocalized("Busy.  Please Wait.");
  611.         XtSetArg(args[0], XmNmessageString, str);
  612.         dialog = XmCreateWorkingDialog(shell, "Busy", args, 1);
  613.         XmStringFree(str);
  614.         XtUnmanageChild(
  615.             XmMessageBoxGetChild(dialog, XmDIALOG_OK_BUTTON));
  616.         if (interruptable) {
  617.             str = XmStringCreateLocalized("Stop");
  618.             XtVaSetValues(dialog, XmNcancelLabelString, str, NULL);
  619.             XmStringFree(str);
  620.             XtAddCallback(dialog, XmNcancelCallback, stop, NULL);
  621.         } else
  622.             XtUnmanageChild(
  623.                 XmMessageBoxGetChild(dialog, XmDIALOG_CANCEL_BUTTON));
  624.         XtUnmanageChild(
  625.             XmMessageBoxGetChild(dialog, XmDIALOG_HELP_BUTTON));
  626.         XtManageChild(dialog);
  627.     } else {
  628.         /* get rid of all button and keyboard events that occured
  629.          * during the time out.  The user shouldn't have done anything
  630.          * during this time, so flush for button and keypress events.
  631.          * KeyRelease events are not discarded because accelerators
  632.          * require the corresponding release event before normal input
  633.          * can continue.
  634.          */
  635.         while (XCheckMaskEvent(dpy,
  636.                 ButtonPressMask | ButtonReleaseMask | ButtonMotionMask
  637.                 | PointerMotionMask | KeyPressMask, &event)) {
  638.             /* do nothing */;
  639.         }
  640.         XtDestroyWidget(dialog);
  641.     }
  642. }
  643.  
  644. /* User Pressed the "Stop" button in dialog. */
  645. void
  646. stop(dialog)
  647. Widget dialog;
  648. {
  649.     stopped = True;
  650. }
  651.  
  652. Boolean
  653. CheckForInterrupt()
  654. {
  655.     extern Widget shell;
  656.     Display *dpy = XtDisplay(shell);
  657.     Window win = XtWindow(dialog);
  658.     XEvent event;
  659.  
  660.     /* Make sure all our requests get to the server */
  661.     XFlush(dpy);
  662.  
  663.     /* Let motif process all pending exposure events for us. */
  664.     XmUpdateDisplay(shell);
  665.  
  666.     /* Check the event loop for events in the dialog ("Stop"?) */
  667.     while (XCheckMaskEvent(dpy,
  668.             ButtonPressMask | ButtonReleaseMask | ButtonMotionMask |
  669.             PointerMotionMask | KeyPressMask | KeyReleaseMask,
  670.             &event)) {
  671.         /* got an "interesting" event. */
  672.         if (event.xany.window == win)
  673.             XtDispatchEvent(&event); /* it's in our dialog.. */
  674.         else /* uninteresting event--throw it away and sound bell */
  675.             XBell(dpy, 50);
  676.     }
  677.     return stopped;
  678. }
  679.  
  680.  
  681. -----------------------------------------------------------------------------
  682. Subject: 303)  Can I use the hourglass that mwm uses?
  683.  
  684. [Last modified: March 93]
  685.  
  686. Answer:  The hourglass used by mwm is hard-coded into code that is subject to
  687. OSF copyright. In Motif 1.2 though, the bitmaps for this and other things
  688. (information, no_enter, question, warning, working) were made available.  The
  689. install process will probably add them to /usr/include/X11/bitmaps.
  690. Otherwise, just use the watch cursor XC_watch of the previous question,
  691. because that has the same semantics.
  692.  
  693.  
  694. -----------------------------------------------------------------------------
  695. Subject: 304)  What order should the libraries be linked in?
  696.  
  697. [Last modified: August 92]
  698.  
  699. Answer:  At link time, use the library order  -lXm -lXt -lX11. There are two
  700. reasons for this (dbrooks@osf.org):
  701.  
  702. On most systems, the order matters because the linker won't re-scan a library
  703. once it is done with it.  Thus any references to Xlib calls from Xm will
  704. probably be unresolved.
  705.  
  706. The [other] problem is that there are two VendorShell widgets. A dummy is
  707. provided in the Xt library, but a widget set will rely on its own being
  708. referenced.  If you mention Xt first, the linker will choose the wrong one.
  709.  
  710. Motif code will wrongly assume the Motif VendorShell has been class-
  711. initialized [and will probably crash].
  712.  Xaw has a similar problem, but a softer landing; it only complains about
  713. unregistered converters.
  714.  
  715.  
  716. -----------------------------------------------------------------------------
  717. Subject: 305)  How do I use xmkmf for Motif clients?
  718.  
  719. [Last modified: July 96]
  720.  
  721. Answer:  This advice comes from dbrooks@osf.org. For another answer, see the
  722. question immediately following this one ("How do I use imake with Motif
  723. 2.0?").
  724.  
  725. There are a number of intractable problems with using X configuration files
  726. and xmkmf, while trying to make it easy to build Motif.  Not the least of
  727. these, but one I've never heard mentioned yet, is that the rules for
  728. contructing the names of shared library macros are machine-dependent, and in
  729. the various xxxLib.tmpl files.  Do we edit all those files to add definitions
  730. for XMLIB, DEPXMLIB, etc., or do we put a maze of #ifdefs into the Motif.tmpl
  731. file?
  732.  
  733. Please note that, if you install Motif, it overwrites your installed
  734. Imake.tmpl with one that includes Motif.tmpl and Motif.rules.
  735.  
  736. With those caveats, I think the following guidelines will help.
  737.  
  738. David Brooks OSF
  739.  
  740. Clients in the X11R5 release use the xmkmf command to build Makefiles.  In
  741. general, the xmkmf command cannot be used for Motif clients, because of the
  742. need to consider the UseInstalledMotif flag separately.  Since xmkmf is a
  743. simple script that calls imake, it is easy to construct the proper call to
  744. imake using the following rules.
  745.  
  746. In the following, replace {MTOP} by the toplevel directory with the Motif
  747. source tree, and {XTOP} by the toplevel ("mit") directory with the X source.
  748. It is assumed that the directory containing your installed imake is in your
  749. PATH.
  750.  
  751. When needed, the imake variables XTop and MTop are normally set in your
  752. site.def (to {XTOP} amd {MTOP} respectively); however they may also be set
  753. with additional -D arguments to imake.
  754.  
  755. 1. With both X and Motif in their source trees, ensure the imake variables
  756.    XTop and MTop are set, and use:
  757.  
  758.         ${XTOP}/config/imake -I{MTOP}/config
  759.  
  760. 2. With Motif in its source tree, and X installed, ensure MTop is set, and
  761.    use:
  762.  
  763.         imake -I{MTOP}/config -DUseInstalled
  764.  
  765. 3. With both Motif and X installed, and a nonstandard ProjectRoot (see
  766.    site.def for an explanation of this), use:
  767.  
  768.         imake -DUseInstalled -DUseInstalledMotif -I{ProjectRoot}/lib/X11/config
  769.  
  770.    or, if the configuration files are in /usr/lib/X11/config:
  771.  
  772.         imake -DUseInstalled -DUseInstalledMotif  -I/usr/lib/X11/config
  773.  
  774. [Thanks to Paul DuBois (dubois@primate.wisc.edu) for correcting this.]
  775.  
  776. To build a simple Imakefile, remember to include lines like this:
  777.  
  778.         LOCAL_LIBRARIES = XmClientLibs
  779.                 DEPLIBS = XmClientDepLibs
  780.  
  781. Or, for a client that uses uil/mrm, replace these by MrmClientLibs and
  782. MrmClientDepLibs, and also use:
  783.  
  784.         MSimpleUilTarget(program)
  785.  
  786. to build the client and uid file.  Look at the demos for more examples.
  787.  
  788.  
  789. And Paul Howell <grue@engin.umich.edu> added:
  790.  
  791. i did this, calling the new script "xmmkmf".  It passes both -DUseInstalled
  792. and -DUseInstalledMotif.
  793.  
  794. and i modified the stock R5 Imake.tmpl to do this:
  795.  
  796. #include <Project.tmpl>
  797. #ifdef UseInstalledMotif
  798. #include <Motif.tmpl>
  799. #endif
  800.  
  801. #include <Imake.rules>
  802. #ifdef UseInstalledMotif
  803. #include <Motif.rules>
  804. #endif
  805.  
  806. the result was something that does both athena and motif rules.  and it really
  807. works, just that easy!
  808.  
  809. -----------------------------------------------------------------------------
  810. Subject: 306)  How do I use imake with Motif 2.0?
  811.  
  812. [Last modified: July 96]
  813.  
  814. Answer:  Paul DuBois (dubois@primate.wisc.edu), the author of the O'Reilly and
  815. Associates book, Software Portability with imake, recently wrote some notes on
  816. the use of imake to configure Motif (2.0). It has some discussion on the roles
  817. of UseInstalled and UseInstalledMotif, for instance, which seem to be murky to
  818. many people.  The document is available at:
  819.  
  820.         http://www.primate.wisc.edu/software/imake-stuff
  821.  
  822. -----------------------------------------------------------------------------
  823. Subject: 307)  How do I make context sensitive help?  The Motif Style Guide
  824. says that an application must initiate context-sensitive help by changing the
  825. shape of the pointer to the question pointer. When the user moves the pointer
  826. to the component help is wanted on and presses BSelect, any available context
  827. sensitive help for the component must be presented, and the pointer reverts
  828. from the question pointer.
  829. [Last modified: August 92]
  830.  
  831. Answer:  A widget that gives context sensitive help would place this help in
  832. the XmNhelpCallback function. To trigger this function:  (from Martin G C
  833. Davies, mgcd@se.alcbel.be)
  834.  
  835. I use the following callback that is called when the "On Context" help
  836. pulldown menu is selected. It does the arrow bit and calls the help callbacks
  837. for the widget. It also zips up the widget tree looking for help if needs be.
  838. I don't restrict the arrows motion so I can get help on dialog boxes. No
  839. prizes for guessing what "popup_message" does.
  840.  
  841.  
  842. static void ContextHelp(
  843.     Widget              w ,
  844.     Opaque              * tag ,
  845.     XmAnyCallbackStruct * callback_struct
  846. )
  847. {
  848.     static Cursor   context_cursor = NULL ;
  849.     Widget          context_widget ;
  850.  
  851.     if ( context_cursor == NULL )
  852.         context_cursor = XCreateFontCursor( display, XC_question_arrow ) ;
  853.  
  854.     context_widget = XmTrackingLocate( top_level_widget,
  855.                                 context_cursor, FALSE ) ;
  856.  
  857.     if ( context_widget != NULL ) /* otherwise its not a widget */
  858.     {
  859.         XmAnyCallbackStruct cb ;
  860.  
  861.         cb.reason = XmCR_HELP ;
  862.         cb.event = callback_struct->event ;
  863.  
  864.         /*
  865.          * If there's no help at this widget we'll track back
  866.            up the hierarchy trying to find some.
  867.          */
  868.  
  869.         do
  870.         {
  871.             if ( ( XtHasCallbacks( context_widget, XmNhelpCallback ) ==
  872.                                                 XtCallbackHasSome ) )
  873.             {
  874.                 XtCallCallbacks( context_widget, XmNhelpCallback, & cb ) ;
  875.                 return ;
  876.             }
  877.             else
  878.                 context_widget = XtParent( context_widget ) ;
  879.         } while ( context_widget != NULL ) ;
  880.     }
  881.  
  882.     popup_message( "No context-sensitive help found0or the selected object." ) ;
  883. }
  884.  
  885.  
  886. Dave Bonnett suggested, to use the following translations for XmText (and
  887. XmTextField) widgets to get the same help with key strokes, and to provide an
  888. accelerator label in the Context help menu entry.
  889.  
  890. MyApp*XmText*translations: #override\n\
  891.                                 <Key>F1:    Help()
  892.  
  893. MyApp*Help_menu*Contextual Help.acceleratorText:   F1
  894.  
  895. MyApp*defaultVirtualBindings:           osfBackSpace : <Key>Delete\n\
  896.                                         osfRight : <Key>Right\n\
  897.                                         osfLeft  : <Key>Left\n\
  898.                                         osfUp    : <Key>Up\n\
  899.                                         osfHelp  : <Key>F1\n\
  900.                                         osfDown  : <Key>Down
  901.  
  902.  
  903. -----------------------------------------------------------------------------
  904. Subject: 308)  How do I debug a modal interaction?
  905.  
  906. When an application crashes in a modal section (such as in a modal dialog, a
  907. menu or when a drag and drop is in action), I cannot access the debugger.
  908.  
  909. [Last modified: January 1993]
  910.  
  911. Answer:  Run the debugger on one display while the application writes to
  912. another display.
  913.  
  914. -----------------------------------------------------------------------------
  915. Subject: 309)  Why can't I install my own colormap using XInstallColormap?
  916.  
  917. [Last modified: Nov 96]
  918.  
  919. Answer:  You shouldn't install the colormap yourself using XInstallColormap.
  920. See the ICCCM document for all the reasons.  Instead put the colormap as an
  921. argument on the Shell widget and the window manager will take care of this.
  922.  
  923. When the colormap is installed,  unless you have a display with multiple
  924. colormaps, the other windows will go "technicolor" and there is no way around
  925. this problem.
  926.  
  927. Thanks to Doug Rand (drand@sgi.com)
  928.  
  929. Kenton Lee (http://www.rahul.net/kenton/) adds:  Use XtSetWMColormapWindows()
  930. to specify non-default colormaps.
  931.  
  932.  
  933. -----------------------------------------------------------------------------
  934. Subject: 310)  How do I install a private colormap?
  935.  
  936. [Last modified: Jan 96]
  937.  
  938. Answer:  Mark Buser (buser@tartan.com) writes:  If you find that your
  939. XAllocNamedColor is failing or XpmCreatePixmapFromData is dieing from
  940. XpmColorFaileds, you may have exhausted the number of colormap entries.  One
  941. way to install a new colormap is the following:
  942.  
  943.  
  944.     Toplevel = XtVaAppInitialize ( &app, ...
  945.     ...
  946.     dpy = XtDisplay (Toplevel);
  947.     cmap = DefaultColormapOfScreen ( XtScreen( Toplevel) );
  948.     ...
  949.     /* Detect color errors due to colormap depletion */
  950.     ...
  951.     if (colors_depleted) {
  952.       cmap = XCopyColormapAndFree ( dpy, cmap );
  953.       ...
  954.  
  955.       /* Run through color allocation again to see if ok now */
  956.       ...
  957.     }
  958.  
  959.     /* Install colormap into toplevel widget.  This must be done
  960.     ** before any child widgets are created.
  961.     */
  962.     XtVaSetValues ( Toplevel, XmNcolormap, cmap, NULL);
  963.  
  964.     /* Create any children of toplevel, they will inherit new colormap */
  965.     ...
  966.  
  967.  
  968. This is only one way to go, there are other possibilities, but this seems to
  969. be the simplest.
  970.  
  971. -----------------------------------------------------------------------------
  972. Subject: 311)  How do I get correct shadow colors to match other color
  973. changes?
  974.  
  975. [Last modified: Sept 95]
  976.  
  977. Answer:
  978.  
  979. Thanks to Craig MacFarlane (craigm@chateau-rouge.ICS.UCI.EDU) for the
  980. following explanation and code:
  981.  
  982. You have to make a call to calculate the new shadow colors.  The trick is
  983. actually getting a value of type Pixel when all you have is the string "Blue".
  984. I use the XtConvertAndStore() function to convert from a char * to a Pixel.
  985. For example:
  986.  
  987.  
  988.   char *color = "blue";
  989.   XrmValue color_value, pixel_value;
  990.   Pixel background;
  991.  
  992.   color_value.size = strlen(color);
  993.   color_value.addr = (XtPointer) color;
  994.   pixel_value.size = sizeof(Pixel);
  995.   pixel_value.addr = (XtPointer) 0;
  996.  
  997.   result = XtConvertAndStore(widget,
  998.                              XtRString, &color_value,
  999.                              XtRPixel, &pixel_value);
  1000.  
  1001.   background = (*(Pixel *)pixel_value.addr);
  1002.  
  1003.  
  1004. You can then use the pixel value obtained by XtConvertAndStore() in the
  1005. XmGetColors call.  XmGetColors calculates appropriate foreground, topshadow,
  1006. bottomshadow, and select colors for the given background. e.g.
  1007.  
  1008.  
  1009.   XmGetColors(screen,
  1010.               DefaultColormap(display_id, DefaultScreen(display_id)),
  1011.               background,
  1012.               &foreground, &topshadow, &bottomshadow, &select);
  1013.  
  1014.  
  1015. Then it's trivial to set the shadow colors at the same time you set the
  1016. foreground and background colors.  For example:
  1017.  
  1018.  
  1019.   XtVaSetValues(widget,
  1020.                 XmNforeground, foreground,
  1021.                 XmNbackground, background,
  1022.                 XmNarmColor, select,
  1023.                 XmNtopShadowColor, topshadow,
  1024.                 XmNbottomShadowColor, bottomshadow,
  1025.                 NULL);
  1026.  
  1027.  
  1028. You'll get asthetically pleasing colors every time. :)
  1029.  
  1030. Wolfram Gries <1gries@informatik.uni-hamburg.de> adds:
  1031.  
  1032. The function XmChangeColor() takes a Widget and a Pixel-value for the new
  1033. background-color and does the calculation of the new shadow-colors on its own.
  1034. But it seems to me that this function is rather slow, so if you often change
  1035. the color of your widgets, the XmGetColors()/XmSetColors() approach might be
  1036. better.
  1037.  
  1038. -----------------------------------------------------------------------------
  1039. Subject: 312)  What color algorithm does Motif use?  I am told that Motif uses
  1040. some sort of algorithm that will take a single color that is defined for the
  1041. "background" and scale it so that the widget remains discriminable from the
  1042. background, etc.  What is the algorithm?
  1043.  
  1044. [Last modified: Oct 94]
  1045.  
  1046. Answer:  Chris Flatters (cflatter@nrao.edu) writes:  Shiz Kobara's book
  1047. "Visual Design with OSF/Motif", Addison Wesley,  1991, ISBN 0-201-56320-7) is
  1048. a good source for information of this sort.  I haven't seen it in bookshops
  1049. for a while so it may have gone out of print (which would be a pity).  In
  1050. essence each widget has 4 colours which, to first order, are
  1051.  
  1052.         background
  1053.         select          (background * 85%)
  1054.         top shadow      (background * 150%)
  1055.         bottom shadow   (background * 50%)
  1056.  
  1057. An additional correction may be applied to the hues of the calculated colours
  1058. if any of the RGB values saturates.  The algorithm works best if the brightest
  1059. of the RGB components lies in the range 155-175 (on a scale of 0-255).  The
  1060. top shadow becomes darker than the background for light background colours
  1061. which does not lead to a particularly pleasing effect.
  1062.  
  1063. -----------------------------------------------------------------------------
  1064. Subject: 313)  How can you access the superclass widget from which Motif
  1065. convenience dialogs are subclassed?
  1066.  
  1067. [Last modified: Oct 94]
  1068.  
  1069. Answer:  Kim Frei (uunet!ask.uniras.dk!kimf) wrote: If you are using Motif
  1070. 1.2, read about XmTemplateDialog.
  1071.  
  1072. -----------------------------------------------------------------------------
  1073. Subject: 314)  Can the Notebook widget display non-rectangular "file tabs"?
  1074. Is it possible to use the Shape extension to fiddle with the shape of the
  1075. major tabs (XmPushButtons right now) to get non-rectangular buttons, going for
  1076. that "file tab" look?
  1077.  
  1078. [Last modified: May 95]
  1079.  
  1080. Answer:  Vania Joloboff <uunet!gr.osf.org!vania> wrote:
  1081.  
  1082. On the Motif 2.0* CD-ROM, in the demos directory, there is a library of
  1083. additional widgets lib/Exm.  Among the widgets, there is a ExmTabButton
  1084. especially designed to fit within a Notebook. It has a smooth shape like real
  1085. tabs in folders.
  1086.  
  1087. It also a good example on how to use the new traits and the Xme API for widget
  1088. writers.
  1089.  
  1090. (Thanks to Ken Lee, http://www.rahul.net/kenton/, for a correction here.)
  1091.  
  1092. -----------------------------------------------------------------------------
  1093. Subject: 315)  How does the clipboard mechanism work?
  1094.  
  1095. [Last modified: Dec 94]
  1096.  
  1097. A.  Doug Rand <drand@sgi.com> writes:
  1098.  
  1099. Basically there are two selections CLIPBOARD_MANAGER and CLIPBOARD which are
  1100. used.  The Motif clipboard is not a clipboard manager, but xclipboard,  or a
  1101. more functional clipboard client would be.  The newest ICCCM (2.0) spells this
  1102. out.
  1103.  
  1104. The basic process is that the clipboard manager:
  1105.  
  1106. 1) Check to see if CLIPBOARD_MANAGER is owned by anyone,  abort if it is.
  1107.  
  1108. 2) Assert ownership of CLIPBOARD_MANAGER and CLIPBOARD
  1109.  
  1110. 3) When the CLIPBOARD selection is lost,  query new owner for data and then
  1111. retake ownership of CLIPBOARD
  1112.  
  1113. #3 is done until the application exists.  What you do with the data is up to
  1114. the application.
  1115.  
  1116. -----------------------------------------------------------------------------
  1117. Subject: 316)  Why does the xyz application core dump when I cut and paste?
  1118.  
  1119. Answer:  Application crashes when text is cut and pasted into an XmText widget
  1120. may occur with statically linked executables linked with X11R5 libraries under
  1121. SunOS. For example, a Netscape README file says:
  1122.  
  1123.     The SunOS 4.1 [Netscape 0.94] distribution also includes a directory
  1124.     called "nls".  This directory is a standard part of the MIT X11R5
  1125.     distribution, but is not included with OpenWindows 3.0 or earlier.  We
  1126.     have linked Netscape against the MIT R5 libraries because they are
  1127.     less buggy in general; however, they have one rather serious bug,
  1128.     which is that if this "nls" directory does not exist, the program will
  1129.     dump core any time you try to paste into a text field!
  1130.  
  1131.     So, if you don't have the "nls" directory on your system, you will
  1132.     need to install it first.  The usual place is /usr/lib/X11/nls,
  1133.     but you can put it anywhere: just point the $XNLSPATH environment
  1134.     variable at it.
  1135.  
  1136.     Some sites don't have their X libraries installed in /usr/lib/X11/.
  1137.     This doesn't matter.  You either need to put the nls directory in
  1138.     /usr/lib/X11/, or every user will need to set this environment
  1139.     variable.
  1140.  
  1141. So, for example, we do:
  1142.  
  1143.        setenv XNLSPATH /usr/local/x11r5/lib/X11/nls
  1144.  
  1145. since our X11R5 is not installed in the default location.
  1146.  
  1147. -----------------------------------------------------------------------------
  1148. Subject: 317)  Why is XtWindow(widget) == 0?
  1149.  
  1150. [Last modified: Oct 95]
  1151.  
  1152. Answer:  The window is not created until the widget is realized.  In general,
  1153. using XtWindow() is a bad idea.  In most cases, you can create more robust
  1154. code by subclassing the widget and putting your window code in new wiget class
  1155. methods.
  1156.  
  1157. Ken Lee, http://www.rahul.net/kenton/
  1158.  
  1159. -----------------------------------------------------------------------------
  1160. Subject: 318)  Why doesn't XtNameToWidget (widget, "MyName") work?
  1161.  
  1162. [Last modified: Apr 95]
  1163.  
  1164. Answer:  The second argument must be a qualified specification (like a
  1165. resource specification).  In most cases, you'll use something like "*MyName".
  1166. The leading '*' is required.
  1167.  
  1168. Ken Lee, http://www.rahul.net/kenton/
  1169.  
  1170. -----------------------------------------------------------------------------
  1171. Subject: 319)  Why does my callback's client data structure contain incorrect
  1172. values when the callback is called?  I created a structure and used a pointer
  1173. to it as callback client data.
  1174.  
  1175. [Last modified: Apr 95]
  1176.  
  1177. Answer:  If your structure is declared as automatic, the callback will
  1178. probably not be executed within the structure's scope, so the pointer to the
  1179. structure will become invalid.  You can avoid this problem by declaring your
  1180. structure external or by allocating with malloc or (in C++) new.
  1181.  
  1182. Ken Lee, http://www.rahul.net/kenton/
  1183.  
  1184. -----------------------------------------------------------------------------
  1185. Subject: 320)  How can an application manage events on multiple displays?
  1186.  
  1187. [Last modified: May 95]
  1188.  
  1189. Answer:  Just put multiple display pointers into one application context.
  1190. (You normally specify which application context as an argument to
  1191. XtOpenDisplay()).  XtAppNextEvent() and XtAppMainLoop() automatically poll all
  1192. displays in the application context.
  1193.  
  1194. Ken Lee, http://www.rahul.net/kenton/
  1195.  
  1196. -----------------------------------------------------------------------------
  1197. Subject: 321)+  Can a Motif application create windows on mutiple screens (on
  1198. a multi-screen workstation)?
  1199.  
  1200. [Last modified: Sep 97]
  1201.  
  1202. Answer:  Multiple screens is simpler than multiple displays, since one X
  1203. server controls all of the screens.  Simply specify the XmNscreen resource
  1204. when you create your top level (or other) shell widget and the X Toolkit will
  1205. create the shell on that screen.  You should generally also explicitly set
  1206. your XmNcolormap, XmNdepth, and XmNvisual resources for the new shell, since
  1207. the defaults may not be valid on the second screen.
  1208.  
  1209. Ken Lee, http://www.rahul.net/kenton/
  1210.  
  1211. -----------------------------------------------------------------------------
  1212. Subject: 322)  Why do I get "Error: attempt to add non-widget child "dsm" to
  1213. parent"?
  1214.  
  1215. [Last modified: May 95]
  1216.  
  1217. Answer:  Most likely, you are linking your libraries in the wrong order.  You
  1218. must link -lXm *before* -lXt.
  1219.  
  1220. Ken Lee, http://www.rahul.net/kenton/
  1221.  
  1222. Ken Sall (ksall@cen.com) adds: This same error occurs if you combine Motif and
  1223. Athena widgets in the same application. If you link with "-lXaw" before "-
  1224. lXm", you get the runtime error. However, if you switch the order of the two
  1225. libraries, there is no problem. For example:
  1226.  
  1227.         cc mothena.c -o mothena -lXm -lXaw -lXt -lXmu -lX11
  1228.  
  1229.  
  1230. -----------------------------------------------------------------------------
  1231. Subject: 323)  Why do I get link errors about "XShape" symbols?
  1232.  
  1233. [Last modified: May 95]
  1234.  
  1235. Answer:  You must link with the X extensions library, -lXext, after any widget
  1236. libraries.  For example,
  1237.  
  1238.         cc -o myapp myapp.o -lXm -lXt -lXext -lX11
  1239.  
  1240. Ken Lee, http://www.rahul.net/kenton/
  1241.  
  1242. -----------------------------------------------------------------------------
  1243. Subject: 324)+  Why do I get link errors about "ICE" and "SM" symbols?
  1244.  
  1245. [Last modified: Sep 97]
  1246.  
  1247. Answer:  You must link with the the X ICE and/or SM libraries.  For example,
  1248.  
  1249.         cc -o myapp myapp.o -lXm -lXt -lXext -lICE -lSM -lX11
  1250.  
  1251. Ken Lee, http://www.rahul.net/kenton/
  1252.  
  1253. -----------------------------------------------------------------------------
  1254. Subject: 325)  Why does my X11R6 program crash with undefined symbol
  1255. "LowerCase"?
  1256.  
  1257. [Last modified: May 95]
  1258.  
  1259. Answer:  If you are using Motif version 1.1.[123], then the problem may be a
  1260. failure to set MotifBC to YES in your site.def.
  1261.  
  1262. Thanks to Geoffrey Leach, geoff@netcom.com
  1263.  
  1264. -----------------------------------------------------------------------------
  1265. Subject: 326)  How do I programatically control xwd to dump a specific window?
  1266. I need a non-interactive way to tell xwd what X window to make an image of...
  1267. NOT by the traditional point-and-click method.
  1268.  
  1269. [Last modified: July 95]
  1270.  
  1271. Answer:  Ken Sall (ksall@cen.com) wrote:
  1272.  
  1273.  1. Get the window id of the toplevel shell widget using the "XtWindow"
  1274.     function.
  1275.  2. Invoke "xwd" from the program that has access to the window id, such as:
  1276.  
  1277.      Window dumpId; /* returned from XtWindow */
  1278.      sprintf (cmd_string, "xwd -frame -out tmp.xwd -id 0x%x", dumpId);
  1279.      system (cmd_string);
  1280.  
  1281. -----------------------------------------------------------------------------
  1282. Subject: 327)  How can I display an xwd in a window (without using xwud)?
  1283.  
  1284. [Last modified: Sept 95]
  1285.  
  1286. Answer:  Ken Lee (http://www.rahul.net/kenton/) writes:
  1287.  
  1288. 1.  read the xwd file into an XImage
  1289. 2.  create a pixmap and XPutImage the image into the pixmap
  1290. 3.  use the pixmap as the XmNlabelPixmap of a label widget
  1291.  
  1292. -----------------------------------------------------------------------------
  1293. Subject: 328)  Can I write a multi-threaded Motif application?
  1294.  
  1295. [Last modified: May 97]
  1296.  
  1297. Answer:  Motif 2.1 can be compiled to be thread-safe (if libX11 and libXt are
  1298. also compiled to be thread-safe).
  1299.  
  1300. Motif releases prior to Motif 2.1 were not thread-safe.  In these releases,
  1301. you can use Motif from one thread and do other things in other threads but you
  1302. cannot call Motif functions from more than one thread.
  1303.  
  1304. Try looking in the X FAQ for information on threads:
  1305.  
  1306.         http://www.cis.ohio-state.edu/hypertext/faq/usenet/x-faq/top.html
  1307.         ftp://ftp.x.org/contrib/faqs/FAQ
  1308.  
  1309.  
  1310. Ken Lee, http://www.rahul.net/kenton/
  1311.  
  1312. -----------------------------------------------------------------------------
  1313. Subject: 329)  How can I dump my widget instance tree in a way that reflects
  1314. the hierarchy?
  1315.  
  1316. [Last modified: July 97]
  1317.  
  1318. Answer:  Jeremy Jameson (jameson@drmail.dr.att.com) posted this code to
  1319. c.w.x.m in 5/95.
  1320.  
  1321. [Note:  this code does not consider popup children, which are not listed in
  1322. the XmNchildren array. To find those, you have to peek at the popup_list in
  1323. core widget record.  - K.Lee 7/97]
  1324.  
  1325.  
  1326.                                     - 14 -
  1327.  
  1328.  
  1329. /*******************************************************************************
  1330. * dumpWidgetTree( Widget w )
  1331. *
  1332. *       This function will recursively descend throught the Widget tree
  1333. *       and print the children and their pointer addresses.
  1334. *
  1335. *       Jeremy Jameson          5/17/95
  1336. *
  1337. *******************************************************************************/
  1338.  
  1339. static void dumpWidgetTree( Widget w )
  1340. {
  1341.    WidgetList list = NULL;
  1342.    Cardinal num_children = 0;
  1343.    int i;
  1344.    static int n = 0;
  1345.    Widget child;
  1346.    static char* indent =
  1347. "-----------------------------------------------------------------------------";
  1348.    char tmp[256];
  1349.  
  1350.    *tmp = ' ';
  1351.  
  1352.    if ( n >= strlen( indent ) +1 )
  1353.    {
  1354.       printf(
  1355.          "ERROR:Widget tree is too deep, not enough indent string ( < %d )!\n",
  1356.           n );
  1357.       n = 0;
  1358.       return;
  1359.    }
  1360.  
  1361.    strncpy( tmp, indent, n );
  1362.    tmp[n] = ' ';
  1363.  
  1364.    printf( "%s> Dumping widget tree of %s - %#x \n", tmp, XtName( w ), w );
  1365.  
  1366.    if ( ! XtIsComposite( w ) )
  1367.    {
  1368.       printf(
  1369.          "%s>   %s is not a subclass of Composite and therefore has no children\n",
  1370.          tmp, XtName( w ) );
  1371.       return;
  1372.    }
  1373.  
  1374.    XtVaGetValues( w,
  1375.          XmNchildren, &list,
  1376.          XmNnumChildren, &num_children,
  1377.          NULL );
  1378.  
  1379.    printf( "%s>   %s has %d %s\n", tmp, XtName( w ),
  1380.       num_children, num_children == 1 ? "child" : "children" );
  1381.  
  1382.    for ( i = 1; i <= num_children; i++ )
  1383.    {
  1384.       child = list[i-1];
  1385.       printf( "%s>   child %2d  %20s \t (%#x)\n", tmp, i, XtName( child ), child );
  1386.    }
  1387.  
  1388.    printf( "\n" );
  1389.  
  1390.    for ( i = 1; i <= num_children; i++ )
  1391.    {
  1392.       child = list[i-1];
  1393.       n += 3;
  1394.       dumpWidgetTree( child );
  1395.  
  1396.       n -= 3;
  1397.    }
  1398.    printf( "\n" );
  1399. }
  1400.  
  1401. -----------------------------------------------------------------------------
  1402. Subject: 330)  How do I convert my xpm file into a Pixmap?  (The xpm file is
  1403. basically a C variable which I can #include.)
  1404.  
  1405. [Last modified: Sept 95]
  1406.  
  1407. Answer:  Use XpmCreatePixmapFromData() See the XPM library documentation for
  1408. full examples and details.
  1409.  
  1410. Ken Lee, http://www.rahul.net/kenton/
  1411.  
  1412. -----------------------------------------------------------------------------
  1413. Subject: 331)  How can I display a gif/jpeg/tiff picture in a widget?
  1414.  
  1415. [Last modified: Sept 95]
  1416.  
  1417. Answer:  Get the Xpm library and read the documentation.  Get xpaint from
  1418. ftp.x.org, also get the jpeg and tiff libraries on the internet.  From these
  1419. you can easily create the code to read in gif, jpeg, and tiff.
  1420.  
  1421. Read the images into and XpmImage format.  Then use one of the Xpm conveneince
  1422. functions to create wither an XImage or a Pixmap from your data.  The xpm lib
  1423. will take care of the color allocation and Pixmap/XImage creation, then you
  1424. can just use expose routines to copy the Pixmap into a dialog or any
  1425. window....
  1426.  
  1427. Thanks to Ramiro Estrugo (restrugo@fateware.com)
  1428.  
  1429. -----------------------------------------------------------------------------
  1430. Subject: 332)  How do I get the events for gadgets? Or the name of the gadget?
  1431.  
  1432. [Last modified: July 96]
  1433.  
  1434. Answer:  Get events from the gadget's parent.  Ken Lee,
  1435. http://www.rahul.net/kenton/
  1436.  
  1437. A related question is "How the name of a gadget an event is directed to?"
  1438. Daniel Dardailler (daniel@x.org) writes:
  1439.  
  1440. Motif 2.0 provides a XmObjectAtPoint public function that support this
  1441. functionality.  For earlier version, something like the undocumented
  1442. _XmInputInGadget( wid, x, y ) should do it.
  1443.  
  1444.     _XmInputInGadget
  1445.         Given a composite widget and an (x, y) coordinate, see if the
  1446.         (x, y) lies within one of the gadgets contained within the
  1447.         composite.  Return the gadget if found, otherwise return NULL.
  1448.  
  1449. -----------------------------------------------------------------------------
  1450. Subject: 333)  Can I set the foreground and background colors of gadgets?
  1451.  
  1452. [Last modified: Nov 96]
  1453.  
  1454. Answer:  Not in Motif 1.x.  Gadgets don't have their own colors, they use
  1455. those of their parents.  Notice that Motif's convenience dialogs generally use
  1456. label gadgets, not widgets, so you cannot customize the colors of individual
  1457. buttons.
  1458.  
  1459. Beginning in Motif 2.0, gadgets do have their own color resources.
  1460.  
  1461. Ken Lee, http://www.rahul.net/kenton/
  1462.  
  1463. -----------------------------------------------------------------------------
  1464. Subject: 334)  Where can I get the xmon or xscope programs to trace my X
  1465. protocol?
  1466.  
  1467. [Last modified: Mar 96]
  1468.  
  1469. Answer:  Both are included in the contrib section of X11R5:
  1470.     ftp://ftp.x.org/pub/R5/
  1471.  
  1472. Xmon is also available at:
  1473.     ftp://ftp.x.org/contrib/devel_tools/ and
  1474.     ftp://ftp.crl.research.digital.com/pub/X11/contrib/devel_tools/
  1475.  
  1476. Ken Lee, http://www.rahul.net/kenton/
  1477.  
  1478. -----------------------------------------------------------------------------
  1479. Subject: 335)  What does the error "Couldn't find per display information"
  1480. mean?
  1481.  
  1482. [Last modified: Mar 96]
  1483.  
  1484. Answer:  Xt often needs information about the current X display.  It generates
  1485. this error when it couldn't find the display pointer.  Common causes
  1486. applications accidentally destroying widgets twice or trying to generate fake,
  1487. incomplete events with XSendEvent().
  1488.  
  1489. Ken Lee, http://www.rahul.net/kenton/
  1490.  
  1491. -----------------------------------------------------------------------------
  1492. Subject: 336)  Can I set widget fallback resources after I've called
  1493. XtAppInitialize()?
  1494.  
  1495. [Last modified: Mar 96]
  1496.  
  1497. Answer:  No.  Fallbacks are only checked when displays are initialized.
  1498.  
  1499. Ken Lee, http://www.rahul.net/kenton/
  1500.  
  1501. -----------------------------------------------------------------------------
  1502. Subject: 337)  Can I use the newline character in widget names?
  1503.  
  1504. [Last modified: Mar 96]
  1505.  
  1506. Answer:  No.  Widget names are designed to be used in resource specifications.
  1507. The Xlib resource file syntax says the only alphanumeric characters (plus '-'
  1508. and '_') may be used in a resource component name.  If you want more than one
  1509. line of text in a label widget, set the XmNlabelString resource.
  1510.  
  1511. Ken Lee, http://www.rahul.net/kenton/
  1512.  
  1513. -----------------------------------------------------------------------------
  1514. Subject: 338)  Is anybody out there selling Windows95 look-alike widgets?  Why
  1515. isn't there a Widget builder for Motif/X yet? Something like OCX (I believe on
  1516. Windows95).
  1517.  
  1518. [Last modified: Mar 96]
  1519.  
  1520. Answer:  David B. Lewis (dbl%craft@uunet.uu.net) writes:
  1521.  
  1522. None that I know of. There are similar widgets available in Motif 2.0.  There
  1523. are similar widgets available in the ICS EnhancementPak.
  1524.  
  1525. [For the second part of the question...]  Because it's very hard to do. I
  1526. don't know what OCX is, but I can't imagine that the technology is so much
  1527. better than that used in Xt that it's possible to write something to generate
  1528. real code. It's trivial, of course, to generate the framework for a widget
  1529. given only its name, superclass, and resources; but everything else is real
  1530. code.
  1531.  
  1532. -----------------------------------------------------------------------------
  1533.  
  1534. Subject: 339)  How can I convert my OLIT programs to the Motif look & feel?
  1535.  
  1536. [Last modified: July 96]
  1537.  
  1538. Answer:  Mark Fresolone (mjf@mjm.com) writes:  There are a number of
  1539. translator products on the market which translate OLIT source code or DevGuide
  1540. builder files into Motif source code and builder files.
  1541.  
  1542. In 1995, MJM Software (Melillo Consulting Inc.)  released the MoOLIT 5.1
  1543. toolkit, which allows one to simply re-compile Sun or UnixWare OLIT programs,
  1544. and have them be switchable between the OPENLOOK and Motif look and feels.
  1545. MoOLIT 5.1 is available on most popular UNIX platforms.  More information is
  1546. available at:
  1547.  
  1548.         http://www.mjm.com/Products/MoOLIT
  1549.  
  1550. -----------------------------------------------------------------------------
  1551.  
  1552. Subject: 340)*  Where can I obtain X and Motif applications?
  1553.  
  1554. [Last modified: Sep 97]
  1555.  
  1556. Answer:  Several product lists are available from "MW3: Motif on the World
  1557. Wide Web":
  1558.  
  1559.         http://www.cen.com/mw3/commercial.html
  1560.         MW3: Commercial Products and Vendors
  1561.  
  1562.         http://www.cen.com/mw3/non-commercial.html
  1563.         MW3: Non-Commercial Applications and Shareware
  1564.  
  1565.         http://www.cen.com/mw3/vendors.html
  1566.         MW3: Motif Vendor List
  1567.  
  1568. Brandon Harris has an impressive collection of apps (commercial and non-
  1569. commercial) in various categories:
  1570.  
  1571.         http://www.gaijin.com/X/x.apps.html
  1572.         X Applications:
  1573.         DateBooks, Development, Editors, File Management, Games,
  1574.         Graphics, Mail, Miscellaneous, Office and Finance, Utilities,
  1575.         WebBrowsers, Window Managers.
  1576.  
  1577. The Open Group Open maintains a list of products at:
  1578.  
  1579.         Open Software Registry
  1580.         http://www.opensoftware.com/
  1581.  
  1582. Two other comp.windows.x.* FAQs have long lists of available tools:
  1583.  
  1584.         http://www.ee.ryerson.ca:8080/~elf/xapps/faq.html
  1585.         comp.windows.x.apps FAQ
  1586.  
  1587. and the topic "OBTAINING X AND RELATED SOFTWARE AND HARDWARE" in the X FAQ:
  1588.  
  1589.         http://www.cs.ruu.nl/wais/html/na-dir/x-faq/part3.html
  1590.  
  1591. -----------------------------------------------------------------------------
  1592. Subject: 341)  What does this mean: Warning: Cannot find callback list in
  1593. XtAddCallback?
  1594.  
  1595. [Last modified: July 96]
  1596.  
  1597. Answer:  It means that you gave an invalid callback name to XtAddCallback,
  1598. e.g., using XmNactivateCallback when the widget does not have a callback with
  1599. that name.
  1600.  
  1601. Ken Lee, http://www.rahul.net/kenton/
  1602.  
  1603. -----------------------------------------------------------------------------
  1604. Subject: 342)  If a single widget has multiple callback functions, are they
  1605. all executed?  If so, in what order?
  1606.  
  1607. [Last modified: Nov 96]
  1608.  
  1609. Answer:  Yes, they are all executed.  The order, however, is not defined by
  1610. the X Toolkit specifications.  If you really want a certain order, you should
  1611. register a single callback function and have it call your other functions in
  1612. the order you want.
  1613.  
  1614. Ken Lee, http://www.rahul.net/kenton/
  1615.  
  1616. -----------------------------------------------------------------------------
  1617. Subject: 343)  Why are some widgets still visible after I call
  1618. XtDestroyWidget() on them?
  1619.  
  1620. [Last modified: Nov 96]
  1621.  
  1622. Answer:  To avoid memory corruption problems, the X Toolkit uses a 2 phase
  1623. destroy process.  When you call XtDestroyWidget(), the widgets are not really
  1624. destroyed until after you return to the Xt main loop.  Until then, the widget
  1625. will behave (mostly) as if they were not destroyed.  If this is a problem, you
  1626. should unmanage them as well (you can safely unmanage them after you destroy
  1627. them and before you return to the main loop).
  1628.  
  1629. Ken Lee, http://www.rahul.net/kenton/
  1630.  
  1631. Note: The details of the two-phase destruction are described on the
  1632. XtCreateWidget(3Xt)/XtDestroyWidget(3Xt) man page. - ksall@cen.com
  1633.  
  1634. -----------------------------------------------------------------------------
  1635. Subject: 344)  If I call XtGetValues on a resource that does not exist for a
  1636. given widget, what value is returned?
  1637.  
  1638. [Last modified: Nov 96]
  1639.  
  1640. Answer:  No value is returned.  Your return variable is not modified.  If it
  1641. was uninitialized (i.e., garbage) before the call to XtGetValues, it will
  1642. remain uninitialized.
  1643.  
  1644. Ken Lee, http://www.rahul.net/kenton/
  1645. -----------------------------------------------------------------------------
  1646. Subject: 345)  Can I reparent a widget (change its parent)?
  1647.  
  1648. [Last modified: Aug 97]
  1649.  
  1650. Answer:  Xt does not support reparenting of widgets within the widget
  1651. hierarchy.  This would complicate the hierarchical resource model.  You can
  1652. destroy the old hierarchy and create a new one.  On most systems, this is
  1653. pretty fast for reasonably sized widget hierarchies.
  1654.  
  1655. Note, however, that X11R6.3 provides an "application group" extension that
  1656. allows one X client to act as the root of another X client's window hierarchy.
  1657. See the X11R6.3 documentation for more details.
  1658.  
  1659. Ken Lee, http://www.rahul.net/kenton/
  1660. -----------------------------------------------------------------------------
  1661. Subject: 346)  Are there any "year 2000" issues within Motif?
  1662.  
  1663. [Last modified: May 97]
  1664.  
  1665. Answer:  We believe that the Motif and X11 sources have no Y2K difficulties
  1666. when they leave these doors.  What implementors do to them while producing
  1667. binaries is not under our control.
  1668.  
  1669. David Brooks, QA Manager, Desktop Engineering     dbrooks@opengroup.org The
  1670. Open Group                 <URL:http://www.opengroup.org/~dbrooks/>
  1671.  
  1672. -----------------------------------------------------------------------------
  1673. Subject: 347)  Can I suppress or customize Motif warning and error messages?
  1674.  
  1675. [Last modified: Aug 97]
  1676.  
  1677. Answer:  A better idea is usually to fix problems indicated by the messages.
  1678. If you must, Motif justs uses Xt's message system which can be customized with
  1679. XtAppSetWarningHandler and XtAppSetErrorHandler.
  1680.  
  1681. -----------------------------------------------------------------------------
  1682. Subject: 348)  TOPIC: HISTORY and ACKNOWLEDGEMENTS
  1683.  
  1684. [Last modified: April 97]
  1685.  
  1686. Answer:
  1687.  
  1688. History:
  1689. -------
  1690. November 89 to July 93: FAQ was maintained by Jan Newmarch
  1691.                         (jan@ise.canberra.edu.au)
  1692.  
  1693. July 93 to August 94:   FAQ was maintained by Brian Dealy
  1694.                         (dealy@c3i.saic.com)
  1695.  
  1696. Sept. 94 to April 97:   FAQ was maintained by Ken Sall
  1697.                         (ksall@cen.com)
  1698.  
  1699. beginning April 97:      FAQ was maintained by Kenton Lee
  1700.                         (http://www.rahul.net/kenton/)
  1701.  
  1702. Acknowledgments:
  1703. ----------------
  1704. This list was compiled using questions and answers posed to
  1705. comp.windows.x.motif and motif-talk. Some information was excerpted from the
  1706. comp.windows.x FAQ.  To all who contributed one way or the other, thanks! We
  1707. try to give individual references, but you may recognize something uncredited
  1708. as your contribution. If we've mangled the words (or, heaven forbid, the code)
  1709. too much, let the current maintainer know.
  1710.  
  1711. NOTE: If you are a two-or-more-time contributor to this FAQ and you have a WWW
  1712. personal home page which you'd like to have listed, see the subject: "Which X
  1713. and Motif developers have their own home page URLs?"
  1714.  
  1715.  
  1716.   Jan Newmarch, Information Science and Engineering,
  1717.   University of Canberra, PO Box 1, Belconnen, Act 2616
  1718.   Australia. Tel: (Aust) 6-2522422. Fax: (Aust) 6-2522999
  1719.  
  1720.   ACSnet: jan@ise.canberra.edu.au
  1721.   ARPA:   jan%ise.canberra.edu.au@uunet.uu.net
  1722.   UUCP:   {uunet,ukc}!munnari!ise.canberra.edu.au!jan
  1723.   JANET:  jan%au.edu.canberra.ise@EAN-RELAY
  1724.  
  1725.  
  1726. Jan Newmarch maintained this FAQ for a long time and has really helped a great
  1727. many of us by providing this valuable service.  He deserves a big round of
  1728. applause for his efforts.  I use this resource all the time and it has saved
  1729. me countless hours with manuals and source code trying to relearn what others
  1730. have already discovered.  Jan`s efforts are gratefully acknowledged here.
  1731.  
  1732.  
  1733.   Brian Dealy, SAIC
  1734.   dealy@c3i.saic.com
  1735.  
  1736.  
  1737. Likewise, Brian Dealy of SAIC did an admirable job taking over the Motif FAQ
  1738. from Jan. A considerable amount of information was added during his tenure and
  1739. we greatly appreciate Brian's work on the FAQ, as well as his efforts in
  1740. maintaining the comp.windows.x.motif newsgroup reflector, for the good of all
  1741. Motif-dom.
  1742.  
  1743.  
  1744.   Ken Sall
  1745.   ksall@cen.com
  1746.   Tel: (301) 953-3330  FAX: (301) 953-2368
  1747.   Century Computing, Inc.
  1748.   http://www.cen.com/
  1749.  
  1750.  
  1751. And thanks to Ken Sall for maintaining the FAQ for the last 3 years. During
  1752. Ken's tenure the FAQ more than doubled in size. Ken was one of the first FAQ
  1753. maintainers to change all ftp references to URLs and to incorporate http URLs
  1754. thoroughout the FAQ. This effort motivated him to create the Motif on the
  1755. World Wide Web site (http://www.cen.com/mw3/) which contains hundreds of Motif
  1756. links.
  1757.  
  1758.  
  1759.   Kenton Lee
  1760.   X/Motif Consultant
  1761.   kenton@rahul.net
  1762.   http://www.rahul.net/kenton/
  1763.  
  1764.  
  1765.