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 / part4 < prev    next >
Encoding:
Text File  |  1997-10-19  |  63.1 KB  |  1,649 lines

  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 4 of 9)
  5. Supersedes: <motif-faq/part4_875789459@rtfm.mit.edu>
  6. Followup-To: poster
  7. Date: 18 Oct 1997 10:15:27 GMT
  8. Organization: none
  9. Lines: 1628
  10. Approved: news-answers-request@MIT.EDU
  11. Distribution: inet
  12. Expires: 1 Dec 1997 10:06:58 GMT
  13. Message-ID: <motif-faq/part4_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:60052 comp.answers:28580 news.answers:114852
  22.  
  23. Archive-name: motif-faq/part4
  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: 76)*  Is there an mwm virtual desktop manager?
  32.  
  33. [Last modified: Sep 97]
  34.  
  35. Answer:  David Kaelbling (drk@x.org) reports:  In OSF/Motif 2.0, mwm supports
  36. both workspaces (see the f.cci function and the wsm demo for a sample
  37. interface) and a virtual root window.  To manipulate the virtual screen
  38. f.goto, f.pan, and f.track_pan were added, as were iconPinned and clientPinned
  39. client resources.
  40.  
  41. Peter E. Wagner (pwagner@panix.com):  Imagine that your "desktop" extends
  42. beyond the view provided by your monitor.  A virtual window manager gives you
  43. access to the space beyond your viewport (i.e. your screen) by allowing you to
  44. move the viewport to other areas of the extended desktop.
  45.  
  46. The first one is Solbourne's swm, which spawned vtwm/tvtwm/olvwm.
  47.  
  48. David B. Lewis created one.  suresh@unipalm.co.uk has further developed it
  49. into the UniPalm product DOORS, which is only available as a source code
  50. extension to the MOTIF window manager.  The price of the source and unlimited
  51. right to distribute binaries is 10,000 pounds Sterling.  Alternately, source
  52. and right to use within one company is 2,000 pounds Sterling.  Contact Peter
  53. Dawe
  54.  
  55. Unipalm Limited                         Voice: +44 (0) 223 420002
  56. 216 The Science Park                    Fax:   +44 (0) 223 426868
  57. CAMBRIDGE
  58. CB4 4WA
  59.  
  60. An enhancement request for such an object has been filed with OSF.
  61.  
  62. Tim Failes (tim@aus.oz.au) of Advanced User Systems Pty Ltd writes:  IXI (now
  63. SCO) has a fully supported product called Panorama which provides this
  64. facility.  Panorama allows the user to pan around the virtual work space,
  65. dynamically change the size of the virtual workspace, and also access windows
  66. via an icon box.  Panorama also includes a point-and-click tool for setting
  67. resources such as colours, focus policy, etc. [SCO contact information appears
  68. in the "Where can I get Motif?" subject. -ed]
  69.  
  70. -----------------------------------------------------------------------------
  71. Subject: 77)  Why does mwm 1.2 crash on startup?
  72.  
  73. [Last modified: March 93]
  74.  
  75. Answer:  David Brooks wrote:  The commonest cause of early mwm demise is as
  76. follows:
  77.  
  78. - You, or someone, built Xlib in the default way using the Xsi
  79.   internationalization functions.
  80.  
  81. - Your Xlib wasn't installed completely (or at all).
  82.  
  83. - Early on, mwm calls the function XmbTextListToTextProperty, which calls
  84.   _XConvertMBToCT, which looks for the Xsi locale database, finds it
  85.   missing, ignores this fact and tries to dereference zero.
  86.  
  87. The workaround is to find the database *somewhere*, and point the environment
  88. variable XNLSPATH at it.  For example, in my personal X source tree:
  89.  
  90.         setenv XNLSPATH /home/X11r5src/mit/lib/nls/Xsi
  91.  
  92. -----------------------------------------------------------------------------
  93. Subject: 78)  How do I obtain the size of a unmanaged shell widget?
  94.  
  95. Answer:  In the code below, use getsize() for widgets which have been managed,
  96. and getsize2() for newly created shell widgets which have not yet been
  97. managed.
  98.  
  99. getsize2() takes two widget parameters because popup dialogs etc.  _consist_
  100. of two separate widgets - the parent shell and the child bulletin board, form,
  101. whatever.  This important distinction (somewhat glossed over in the Motif
  102. manuals) is the cause of a large number of queries in comp.windows.x.motif.
  103. XmCreate...Dialog() functions return the (bulletin board, form, whatever)
  104. _child_ of the pair, not the parent shell.
  105.  
  106. getsize2() takes the _shell_ widget as it's first parameter, and the shell's
  107. _child_ (the bulletin board, form, whatever) as it's second.  Thus, if you are
  108. using code like widget = XmCreate...Dialog() to create your popup dialogs, use
  109. code like getsize2(XtParent(widget),widget,&width,&height) to get the width
  110. and height. If you use e.g. XmCreateDialogShell() or XtCreatePopupShell(),
  111. then you are creating the the shell widget and it's child explicitly, and can
  112. just pass them into getsize2() with no problem.
  113.  
  114. Note: getsize2() calls getsize().
  115.  
  116. /* getsize(widget,width,height);
  117.  * Widget widget;
  118.  * int *width,*height;
  119.  *
  120.  * returns the width and height of a managed widget */
  121.  
  122.  
  123. void getsize(l,w,h) Widget l; int *w,*h; { Dimension w_,h_,b_;
  124.  
  125. static Arg size_args[] =
  126.   {
  127.   { XmNwidth,0 },
  128.   { XmNheight,0 },
  129.   { XmNborderWidth,0 },
  130.   };
  131.  
  132. size_args[0].value = (XtArgVal)&w_; size_args[1].value = (XtArgVal)&h_;
  133. size_args[2].value = (XtArgVal)&b_;
  134.  
  135. XtGetValues(l,size_args,3);
  136.  
  137. if (w) *w = w_ + b_; if (h) *h = h_ + b_; } /*
  138. getsize2(shell,child,width,height);
  139.  * Widget shell,child;
  140.  * int *width,*height;
  141.  *
  142.  * returns the width, height of an unmanaged shell widget */
  143.  
  144. void getsize2(p,c,w,h) Widget p,c; int *w,*h; { XtSetMappedWhenManaged(p,0);
  145.  
  146. XtManageChild(c);
  147.  
  148. getsize(p,w,h);
  149.  
  150. XtUnmanageChild(c);
  151.  
  152. XtSetMappedWhenManaged(p,-1); } submitted by:  [ Huw Rogers  Communications
  153. Software Engineer, NEC Corporation, Tokyo, Japan ] [ Email:
  154. rogersh@ccs.mt.nec.co.jp  Fax: +81-3-5476-1005  Tel: +81-3-5476-1096 ]
  155.  
  156. -----------------------------------------------------------------------------
  157. Subject: 79)  How can I create a shell widget with a non-default visual type?
  158.  
  159. [Last modified: Apr 95]
  160.  
  161. Answer:  You must specify the colormap, visual type, and depth for the shell
  162. before it is realized.  If you don't specify all three resources (or specify
  163. them incorrectly), you will probably get BadMatch protocol errors from your X
  164. server.
  165.  
  166. Ken Lee, http://www.rahul.net/kenton/
  167.  
  168. -----------------------------------------------------------------------------
  169. Subject: 80)  Can a non-shell Motif widget have a different visual type from
  170. its parent?
  171.  
  172. [Last modified: May 97]
  173.  
  174. Answer:  None of the standard Motif widgets support this.  You can, however,
  175. write your own subclasses that have different visual types.  You'll have to
  176. override the Realize method in your subclass.  Becareful to set the colormap
  177. and depth properly to match your visual type.
  178.  
  179. Ken Lee, http://www.rahul.net/kenton/
  180.  
  181. -----------------------------------------------------------------------------
  182. Subject: 81)  Why do I get BadMatch errors from my menus when I use a non-
  183. default visual type for my application shell?
  184.  
  185. [Last modified: Sept 95]
  186.  
  187. Answer:  Unfortunately, the visual type and depth attributes are copied
  188. differently from parent to child.  To be safe you use non-default visuals on
  189. any of your widgets and use these as parents for shell widgets (including
  190. menus), you should set the visual type, depth, and colormap on the child
  191. shells.
  192.  
  193. Ken Lee, http://www.rahul.net/kenton/
  194.  
  195. -----------------------------------------------------------------------------
  196. Subject: 82)  How do I popup a scrolled list on top of other widgets?
  197.  
  198. [Last modified: Sept 95 ]
  199.  
  200. Put it in an override redirect shell and do a XMapRaise on the shell's window.
  201. That will do it.  If you're using Motif then just use a VendorShell with
  202. XmNoverrideRedirect set to true.
  203.  
  204. Thanks to Doug Rand (drand@sgi.com)
  205.  
  206. -----------------------------------------------------------------------------
  207. Subject: 83)*  How can I keep my application's window always on top of all
  208. other applications' windows?
  209.  
  210. [Last modified: Sep 97]
  211.  
  212. Answer:  Some window managers have features supporting this.  Mwm does not.
  213. The ICCCM does not specify a standard protocol for using the feature.
  214.  
  215. Note:  some applications attempt to implement this periodically pop themselves
  216. to the top of the stack (perhaps in response to visibility change events).
  217. This is very poor practice and should be avoided.  If more than one of a
  218. user's applications try this, the user will get very upset.
  219.  
  220. Ken Lee, http://www.rahul.net/kenton/
  221.  
  222. -----------------------------------------------------------------------------
  223. Subject: 84)  TOPIC: MOTIF DEVELOPMENT TOOLS (GUI BUILDERS and UIMS's)
  224.  
  225. -----------------------------------------------------------------------------
  226. Subject: 85)  What GUI tools exist to assist in developing Motif applications?
  227.  
  228. [Last modified: Nov 96 ]
  229.  
  230. Answer:  [Nov 96 update: added Loox and LXB info; revised MetaCard info.]
  231.  
  232. [A FAQ is not for "personal opinions" on these tools.  I don't think it is
  233. appropriate to give such opinions through this particular posting, so I
  234. haven't included any. I will include vendor-provided descriptions provided
  235. they are concise and informative. See Subject 0 for contribution details.]
  236.  
  237. `Prototyping tools' and `code generation tools' come in two forms:
  238.  
  239.     GUI (Graphical User Interface) builder -
  240.     those that can be used to design (and perhaps rehearse)
  241.     the interface only ; and
  242.  
  243.     UIMS (User Interface Management Systems) -
  244.     those that are a system supporting the development and
  245.     execution of user interfaces.
  246.  
  247. However, this distinction can be somewhat arbitrary when specific tools are
  248. categorized as either one or the other.  (Therefore, the classification below
  249. should be taken with a kilogram of salt. :-)
  250.  
  251. A number of commercial and non-commercial tools of both kinds that will
  252. support Motif are listed below. [NOTE: Vendors or individuals wishing to add
  253. their product or tool to this list, or to change their entry, should email to
  254. the maintainer of this FAQ.]
  255.  
  256. GUI builders:
  257.  
  258.         Builder Xcessory (bx)
  259.         Bx/Loox
  260.         Druid
  261.         ExoCODE/xm
  262.         iXBUILD (formerly X Build)
  263.         MOTIFATION
  264.         WKSH (Windowing Korn Shell)
  265.         X-Designer
  266.  
  267. UIMS:
  268.  
  269.         ALEX
  270.         ezX User Interface Management System
  271.         Galaxy
  272.         MetaCard
  273.         Serpent
  274.         TAE Plus
  275.         TeleUse
  276.         UIMX
  277.         VXP (Visual X windows Programming Interface)
  278.         Widget Creation Library (Wcl)
  279.         WINTERP
  280.         XFaceMaker2
  281.  
  282.  
  283. For users of the WWW, see also Brad A. Myers' `User Interface Software Tools'
  284. list (which is not limited to Motif tools):
  285. http://www.cs.cmu.edu/afs/cs.cmu.edu/user/bam/www/toolnames.html
  286.  
  287. Thanks to Robin Schald (wald@tfh-berlin.de) for updating the above URL.
  288.  
  289.  
  290. Some contact addresses, presented in alphabetical order (without regard to GUI
  291. or UIMS categorization), follow:
  292.  
  293.  
  294. o  ALEX:  For more information contact Michael Karliner on (+44) 81 566 2307
  295. or E-mail to alex@s-strat.co.uk.  ALEX Technologies, Waterman's Yard, 32a The
  296. Mall, Ealing, London W5, UK.
  297.  
  298.  
  299. o  Builder Xcessory (bx): is from ICS.  More details are available by sending
  300. a request to info@ics.com.  Address:
  301.  
  302.         ICS Inc.,
  303.         201 Broadway,
  304.         Cambridge MA 02139,
  305.         Tel. (617) 621-0060,
  306.         Fax. (617) 621-9555
  307.         http://www.ics.com/
  308.  
  309.  
  310. o  BxLoox is an integrated GUI development environment for Motif GUIs
  311. containing dynamic screens. Containing the Builder Xcessory GUI builder from
  312. Integrated Computer Solutions and the Loox dynamic graphics development tool,
  313. BxLoox allows developers to interactively create every aspect of their
  314. interface, including Motif widgets, structured graphics, animated graphics and
  315. data visualization.  Features include :
  316.  
  317.  - object oriented design, based on the Doug Young method
  318.  - C and C++ code generation
  319.  - intelligent graphics primitives
  320.  - animation, blinking etc
  321.  - dynamic control objects (knobs, dials, sliders, digital readouts)
  322.  - LOOXMaker graphical editor for interactive primitive creation and animation
  323.  - 2D and 3D charting widgets
  324.  
  325. Contact:
  326.  
  327.         Loox Software Inc.
  328.         4962 El Camino Real, # 206
  329.         Los Altos, CA 94022
  330.         voice : (415)903-0942
  331.         fax: (415)903-9824
  332.         url: http://www.loox.com
  333.         email: sales@loox.com
  334.  
  335.  
  336. o  Druid: is a commercial product. It currently supports Motif1.1 and 4 unix
  337. platforms: SPARC, HP 9000, RS6000, and SGI. For further information contact:
  338.  
  339.         Mr. Fred Lee,
  340.         Automated Systems (Pte) Limited,
  341.         203 Henderson Road, #12-07/14,
  342.         Henderson Industrial Park,
  343.         Singapore 0315.
  344.         FAX: (65)272-2029
  345.  
  346.  
  347. Or: Dr. Gurminder Singh (gsingh@iss.nus.sg), Institute of Systems Science,
  348. National University of Singapore
  349.  
  350.  
  351. o  ExoCODE/xm:  By Expert Object Corp., 7250 Cicero Avenue, Lincolnwood, IL
  352. 60646 (708)676-5555.  Also:  ExoCODE, EXOC, 500 Hyacinth Place, Highland Park,
  353. IL, 60035, (708) 926-8500, Motif or OpenLook or SunView.
  354.  
  355.  
  356. o  ezX: Contact information:
  357.  
  358.         ezX User Interface Management System
  359.         Sunrise Software, International
  360.         170 Enterprise Center
  361.         Middletown, RI 02840
  362.         401-847-7868
  363.         email: support@sunrise.com
  364.  
  365.  
  366. o  Galaxy, Visix Software Inc., 11440 Commerce Park Drive, Reston, VA, 22091,
  367. (800) 832-8668, Mac, Windows, Motif, OpenLook; very complete, Virtual Toolkit,
  368. UIMS
  369.  
  370.  
  371. o  iXBUILD (formerly X Build):
  372.  
  373.         iXOS Software GmbH,
  374.         Bretonischer Ring 12,
  375.         8011 Grasbrunn/Munich, Germany,
  376.         email support@ixos.de or office@ixos.de,
  377.         phone ++49-89-46005 0
  378.  
  379. or in the US:
  380.  
  381.         UniPress Software,
  382.         2025 Lincoln Hwy.,
  383.         Edison, NJ 08817,
  384.         phone 1-800-222-0550
  385.  
  386.  
  387. o LXB: Linux X11/Motif GUI Builder is a sharware tool for Motif 1.2 or Motif
  388. 2.0 which you can obtain from:
  389.  
  390.         http://www.tc.umn.edu/nlhome/g257/parki005/lxb/lxb.html
  391.  
  392. Thanks to Allen Fogleson (foggie@dtx.net) for mentioning LXB.  The author,
  393. bruce.parkin-1@umn.edu, writes:
  394.  
  395.         Please note that lxb is a work in progress. Not all Motif
  396.         widgets are available, nor can all resources be edited.
  397.         There are many features of a good GUI builder yet to be done.
  398.  
  399.  
  400. o  MetaCard: MetaCard is a cross-platform multimedia authoring tool and GUI
  401. development environment for Unix/X11 workstations and Microsoft Windows 95 and
  402. NT.  Using MetaCard is the easiest way to build Motif and Win32 applications,
  403. Computer Based Training (CBT), on-line documentation, and a wide variety of
  404. other products.  Applications developed with MetaCard are portable to 13
  405. UNIX/X11 workstations and Microsoft Win32 without recompiling or other
  406. preprocessing and have native look and feel on all platforms.  MetaCard
  407. includes a complete GUI builder, GUI script debugger, and a powerful scripting
  408. language with features and performance similar to Perl (which is up to 30
  409. times the performance of Tcl/Tk), but which is much easier to learn and use.
  410.  
  411.         MetaCard Corporation
  412.         4710 Shoup pl.
  413.         Boulder, CO  80303
  414.         303-447-3936
  415.         303-499-9855 (fax)
  416.         http://www.metacard.com
  417.         info@metacard.com
  418.  
  419.  
  420. o  MOTIFATION:  PEM GmbH, Vaihinger Strasse 49, 7000 Stuttgart 80, Germany,
  421. Tel: +49 (0) 711 713045, Fax: +49 (0) 711 713047 Email: basien@pem-
  422. stuttgart.de.  Available for (Motif 1.2/1.1) on SunOS, Solaris 2.1, HP,
  423. Interactive, ODT 3.0, Silicon Graphics, PCS, ...
  424.  
  425.  
  426. o  Serpent:  The S/W is free (anonymous ftp) from ftp.sei.cmu.edu.  For more
  427. info contact erik/robert at serpent-info@sei.cmu.edu.  NOTE: This is no longer
  428. supported, and is apparently replaced by a commercial product called Alpha.
  429.  
  430.  
  431. o  TAE Plus: TAE Plus is a mature, portable software development environment
  432. that supports rapid prototyping, tailoring, and management of Motif-based
  433. graphical user interfaces.  It particularly supports GUI development by non-
  434. programmers and by programmers who are not well-versed in the details of X and
  435. Motif.  Its code generator can produce C, C++, and Ada code and allows for
  436. automatic merging of regenerated code with previously modified parts of the
  437. interface code.  It supports generation of a UIL/Mrm representation of the
  438. interface.
  439.  
  440. Scripting capabilities are provided to facilitate automatic testing, on-line
  441. demos, and tutorials.  A record and playback feature lets you build scripts
  442. simply by interacting with your GUI.  Dynamic Data Objects allow the developer
  443. to create pictorial objects (e.g., a thermometer to show temperature), whose
  444. dynamic portions (e.g., the mercury in the themometer) can change to reflect
  445. changing data or be directly manipulated by the end-user. TAE Plus is
  446. available on Sun, HP, IBM, SGI, and SCO Unix platforms.  Evaluation software
  447. is available via anonymous ftp.
  448.  
  449. TAE Plus contact information:
  450.  
  451.         Century Computing, Inc.
  452.         8101 Sandy Spring Road
  453.         Laurel, MD 20707
  454.         1-800-823-3228
  455.         tae-info@cen.com
  456.         http://www.cen.com/tae/
  457.  
  458.  
  459. o  TeleUSE: (updated Sept. 95) Built around X Windows and OSF/Motif, TeleUSE's
  460. comprehensive toolset gives you maximum control over every phase of graphical
  461. user interface development, including static screen layout and design,
  462. automatic implementation of callbacks, building the executable, and the
  463. interactive test, debug, and maintenance cycles.  For more information, please
  464. contact:
  465.  
  466. In North America and countries not specified below:
  467.  
  468.         Thomson Software Products (formerly Alsys)
  469.         http://www.thomsoft.com/
  470.         10251 Vista Sorrento Parkway, Suite 300
  471.         San Diego, CA  92121
  472.         619-457-2700 x244
  473.         619-452-2117 (fax)
  474.         guiinfo@thomsoft.com
  475.  
  476.         In France:  1 41 48 10 10
  477.         In the UK:  0491 579 090
  478.         In Sweden:  08 707 3060
  479.         In Germany:  72 1 98653 0
  480.         In Japan:  45 451 2412
  481.         In Korea:  2 508 0098
  482.         In India:  91 11 688 5974
  483.         In Singapore:  65 481 8888
  484.         In Australia:  6 257 1729
  485.  
  486. There's a TeleUSE FAQ:
  487.         http://www.jagunet.com/dalmatian/TeleUSE.html (HTML)
  488.         ftp://ftp.jagunet.com/pub/users/dalmatian/TeleUSE.FAQ (ASCII)
  489.  
  490.  
  491. o  UIMX:
  492.  
  493.         Visual Edge Software Limited
  494.         3870 Cote Vertu
  495.         St Laurent, Quebec
  496.         H4R 1V4
  497.         Phone: (514) 332-6430
  498.         Fax:   (514) 332-5914
  499. or:
  500.         Visual Edge Software Ltd.
  501.         101 First Street, Suite 443
  502.         Los Altos, CA 94022
  503.         Phone: (415) 948-0753
  504.         Fax:   (415) 948-0843
  505.  
  506.  
  507. o  VXP (Visual X windows Programming Interface):
  508.  
  509. Yong Chen (stdyxc05@pip.shsu.edu) developed a Motif GUI builder called VXP --
  510. Visual X windows Programming Interface. VXP has some UIMS capabilities. VXP is
  511. now distributed as a freeware, and has been ported to SGI irix, HP hp-ux, Sun
  512. OS4 and Solaris 2.x, DEC OSF/1, IBM AIX, Linux, SCO, NetBSD.  For more
  513. information, visit VXP's WWW home page at
  514.  
  515.         http://www.shsu.edu/~stdyxc05/VXP/
  516. or ftp at
  517.         ftp.shsu.edu    /pub/VXP/
  518.  
  519.  
  520. o  Widget Creation Library (Wcl):  The distribution is available in several
  521. ways.  The preferred approach it for you to get the compressed tar file using
  522. anonymous ftp from:
  523.  
  524.  
  525.         ftp://ftp.x.org/R5contrib/Wcl-2.5.tar.Z  (X11R5 version)
  526.         ftp://ftp.x.org/contrib/devel_tools/Wcl-2.7.tar.gz (X11R6 gzip)
  527.         ftp://ftp.x.org/contrib/devel_tools/Wcl-2.7.tar.Z (X11R6 compressed)
  528. or:
  529.         ftp://ftp.crl.research.digital.com/pub/X11/contrib/devel_tools/Wcl-2.6.tar.Z
  530.         ftp://ftp.crl.research.digital.com/pub/X11/contrib/devel_tools/Wcl-2.7.tar.Z
  531.         ftp://ftp.crl.research.digital.com/pub/X11/contrib/devel_tools/Wcl-2.7.tar.gz
  532.  
  533.  
  534. o  WINTERP: (Widget INTERPreter) An object-oriented rapid prototyping,
  535. development and delivery environment for building extensible applications with
  536. the OSF/Motif UI Toolkit and Xtango-based graphics/animation. By Niels Mayer
  537. (mayer@netcom.com).  Mailing list: winterp-request@netcom.com. Available via
  538. ftp from ftp.x.org:/contrib/devel_tools/winterp-2.xx.tar.gz (where 'xx' is
  539. currently '03').
  540.  
  541. Key WINTERP Features:
  542.  
  543.         * High-level, Object-oriented interface to OSF/Motif and Xtoolkit.
  544.         * High-level object-oriented 2.5D graphics&animation widget based
  545.           on Xtango path transition animation system.
  546.         * Ability to easily create new widget classes w/ complex graphical
  547.           behavior using Xtango animation/graphics.
  548.         * Automatic storeage management of all X/Xt/Motif data, Pixmaps,
  549.           animations. Automatic resource conversion and management.
  550.         * Asynchronous communications w/ other unix programs via
  551.           expect-based subprocess facility.
  552.         * Includes XmGraph to display graphs (both cyclic, acyclic,
  553.           directed, undirected); graph nodes can be arbitrary widgets
  554.           created by WINTERP; supports direct manipulation editing of graph.
  555.         * GIF image support.
  556.         * Lisp-eval server architecture supports inter-application
  557.           communication.
  558.         * Interactive programming via Gnu-Emacs or Motif-Text-widget interface.
  559.         * Portable, small, fast, and free.
  560.  
  561.  
  562. o  WKSH (Windowing Korn Shell):
  563.  
  564.         EXtensible Korn Shell (C language calling interface,
  565.         dynamic library loading, etc.)
  566.         Motif or OpenLook API
  567.         X Toolkit Intrinsics
  568.         WKSH Convenience Functions
  569.         Fast Learning and Prototyping Feature (ksh interpreter)
  570. Contact:
  571.         Acacia Computer,
  572.         PO Box 4376,
  573.         Warren, NJ 07059,
  574.         Phone: 908 548 6955,
  575.         Email: uunet!aca1
  576.  
  577.  
  578. or: Computer Aid Inc, 1-(800)-444-WKSH, or:
  579.  
  580.  
  581.         Consensys Corp,
  582.         Europe: +(44)-734-833241 (Roger Chalke), +(44)0734-835391 (Fax),
  583.         US: (416)-940-2903, (416)-940-2903 (Fax).
  584.  
  585.  
  586. WKSH was developed by USL. Binaries are available through Acacia Computer for
  587. SUNOS, Solaris, SCO ODT, Intel SVR4.0
  588.  
  589.  
  590. o  X-Designer:  a GUI builder for both Motif and Microsoft Windows.  From one
  591. design C or C++ code can be generated for building with the X/Motif or the
  592. Microsoft Foundation Class (MFC) libraries using only the native toolkits.
  593.  
  594.         Imperial Software Technology
  595.         Berkshire House
  596.         252 Kings Road
  597.         Reading
  598.         RG1 4HP
  599.         UK
  600.         TEL: +44 118 958 7055
  601.         FAX: +44 118 958 9005
  602.  
  603.         120 Hawthorne Avenue, Suite 101
  604.         Palo Alto, CA 94301 USA
  605.         (415) 688 0200
  606.         (415) 688 1054 (fax)
  607.  
  608.         sales@ist.co.uk
  609.         URL: http://www.ist.co.uk
  610.  
  611.  
  612. o  XFaceMaker2:
  613.  
  614.  
  615.         NSL -  Non Standard Logics S.A.,
  616.         57-59, rue Lhomond,
  617.         75005  Paris - France,
  618.         Phone: +33 (1) 43.36.77.50,
  619.         Fax:   +33 (1) 43.36.59.78
  620.         email: requests@nsl.fr or requests%nsl.fr@inria.fr for information.
  621.  
  622. Their North American office:
  623.  
  624.         Non Standard Logics, Inc.,
  625.         4141 State Street, Suite B-11,
  626.         Santa Barbara CA 93110,
  627.         Tel: 805 964 9599,
  628.         Fax: 805 964 4367
  629.  
  630. -----------------------------------------------------------------------------
  631. Subject: 86)  TOPIC: GEOMETRY MANAGEMENT
  632.  
  633. [NOTE: Send me your ideas for answered questions pertaining to this topic.]
  634.  
  635. -----------------------------------------------------------------------------
  636. Subject: 87)  Why is geometry management so important?
  637.  
  638. [Last modified: Sept 94]
  639.  
  640. Answer:  Geometry management is a key element of Motif applications for
  641. reasons which include, but are not limited to, the following:
  642.  
  643.  
  644.     The user should be able to re-size the shell and get
  645.     some reasonable geometry response (other than clipping).
  646.  
  647.     The user should be able to tailor fonts and have the
  648.     widgets adjust accordingly.  (Many people over 40 simply
  649.     can't read small fonts without serious eye strain.)
  650.  
  651.     When the designers decide to change a label, the widgets
  652.     should re-adjust accordingly.
  653.  
  654.     Some labels must be set dynamically and the widgets should
  655.     re-layout accordingly.
  656.  
  657.     An internationalized application must work with several resource
  658.     files, one for each supported natural language.  The labels in each
  659.     file have different lengths and the application should adjust
  660.     accordingly.
  661.  
  662.  
  663. -----------------------------------------------------------------------------
  664. Subject: 88)  What are good references for reading about geometry management?
  665.  
  666. [Last modified: Oct 94]
  667.  
  668. Answer:  See the BOOKS topics for detailed reference information.  "X Toolkit
  669. Intrinsics Programming Manual" (Nye & O'Reilly) contains an entire chapter on
  670. geometry management, as does "X Window System Toolkit" (Asente & Swick) on
  671. which the O'Reilly book is based.  Another good reference is the discussion of
  672. the "geometry_manager" and "query_geometry" methods in "X Toolkit Intrinsics
  673. Reference Manual".
  674.  
  675. "Motif Programming Manual" (Heller & Ferguson) has a chapter devoted to Motif
  676. Manager widgets.  Finally, the widget documentation for each geometry manager
  677. widget typically describes its policy in detail.
  678.  
  679. -----------------------------------------------------------------------------
  680. Subject: 89)  Why don't my labels resize in a RowColumn widget?  I have a
  681. RowColumn widget in my application, with several rows and columns of XmLabels.
  682. When I update the text in the labels, the label's width does not get updated.
  683.  
  684. [Last modified: Oct 94]
  685.  
  686. Answer:  Make sure all the ancestor widget resize mechanisms are enabled:
  687.  
  688.    - on shells, set XmNallowShellResize
  689.    - on row column, set XmNresizeWidth and XmNresizeHeight
  690.    - on bulletin board and form, set XmNresizePolicy
  691.  
  692. Also, set XmNrecomputeSize on the label itself.  The shell resource is off by
  693. default; the others should be on by default.
  694.  
  695. Ken Lee, http://www.rahul.net/kenton/
  696.  
  697. -----------------------------------------------------------------------------
  698. Subject: 90)  Why do dialogs appear smaller under 1.2.3 and later?  The same
  699. problem occurs with parts of a complex main window.  All of my dialogs which
  700. were fine under 1.2.2 and earlier come up too small to work with under 1.2.3
  701. (or later). Why?
  702.  
  703. A. Thanks to David Brooks (dbrooks@ics.com) for pointing me to Daniel
  704. Dardailler (daniel@x.org) who wrote this scholarly treatise:
  705.  
  706.       Application's Geometry Management Advanced Guidelines:
  707.       =====================================================
  708.       (or "How to properly manage children of already realized parent")
  709.  
  710. Xt Background:
  711. -------------
  712.  
  713.     XtCreateWidget:        call Initialize ;
  714.  
  715.     XtManageChild:         if (parent realized)
  716.                               call ChangeManaged ;
  717.                               call Realize ;
  718.  
  719.     XtRealizeWidget:       postorder ChangeManaged loop ;
  720.                            preorder Window-creation loop ;
  721.  
  722.  
  723. Creating a widget only invokes its Initialize method (its parent's
  724. InsertPosition method too, but that has nothing to do with GM).
  725. Composite widgets, by opposition to Primitive, does
  726. not usually get a correct size at initialization time, since their
  727. correct size is based on their children sizes, which do not exist yet
  728. at this time.
  729.  
  730. Applications usually create an entire tree of managed but
  731. unrealized widgets and then realize their top level widget, which recursively
  732. realize every widgets in the tree. During the creation process, the
  733. managing of the unrealized widgets is a no-op (only mark them managed).
  734.  
  735. When XtRealizeWidget(toplevel) happens, the change_managed methods of
  736. all the composite widgets in the tree are called in bottom-to-top
  737. order, thus giving each of them a chance to determine their own size
  738. based on their children *current* sizes (composite or not).
  739. Using the current size of the children in this situation is fine,
  740. since they should also be the children's preferred size, not
  741. yet constrained by the parents layout (post-order traversal).
  742.  
  743. When one create a widget inside an already realized parent, this is
  744. a different story and the order of management vs realization is important.
  745.  
  746. Consider a MessageBox created in a realized Frame.
  747. The MessageBox itself creates a bunch of managed children
  748. inside its Initialize method.
  749. If you manage the MessageBox right after its creation, the Frame
  750. ChangeManaged will be called (since it is realized), and its will use
  751. the MessageBox current size as its base for its own size.
  752. Unfortunately, the MessageBox ChangeManaged proc has never been called!
  753. so its current size is whatever the default is, usually a non-settable
  754. value (needed for tracking real initial size setting).
  755. The MessageBox ChangeManaged has not been called because its children
  756. were created and managed at a time where it wasn't realized.
  757.  
  758. What to do ?
  759.  
  760. The first solution would be to have all the ChangeManaged methods in
  761. Motif call XtQueryGeometry instead of using the current size if it's
  762. not the first time (i.e. if they're already realized).
  763. But this is a lot of code to change and a kind of expensive run-time
  764. process as it results in non-linear traversal order of the realized
  765. tree (looks like an O(n!) but I'm not sure).
  766. It's not even guaranteed that it will always work fine, since it relies on
  767. the assumption that the geometry queried is the same that the geometry
  768. asked for any manager (I mean, it might be the case, but if it's not,
  769. it's just more code to fix in a very "bc-sensitive" part of Xm).
  770.  
  771.  
  772. This other solution lies into the application, and is to realize a
  773. manager first and then to manage it.
  774. By realizing it, you are forcing its ChangeManaged proc to be
  775. called (XtRealizeWidget does that), it will get a correct size and
  776. this size will be used by its parent ChangeManaged when
  777. you'll manage the manager. By explicitly realizing the branch
  778. before managing its root, you are reproducing the ordering that
  779. is typical of most applications at startup.
  780.  
  781. So the trick is:
  782.  
  783.         XtCreateWidget(realize_parent, MessageBox);
  784.         XtRealizeWidget(MessageBox);  /* needed */
  785.         XtManageChild(MessageBox);
  786.  
  787. and the model is:
  788.  
  789.     "Always explicitly realize a composite widget child of an already
  790.      realized parent before managing it if all its children have been
  791.      already managed"
  792.  
  793. One can always realize every widget children of realized parents, that
  794. won't hurt, but it's useless for Primitives and Composites that
  795. get more children added later in the program.
  796. Why? because Primitives get their correct size at initialization
  797. time anyway and adding a child to a Composite will generate a geometry
  798. request and a layout that will have the same effect as if the
  799. ChangeManaged method had been called (well, nearly the same effect,
  800. that a complication I will address later).
  801.  
  802. If we consider Motif, this trick is only useful for MessageBox,
  803. SelectionBox and subclasses, and Scale, since those are the only
  804. Composites that create managed children in their Initialize method and
  805. don't usually get additional kids from the application.
  806.  
  807. However, any application that re-creates this order of actions will
  808. need to apply the "realize<manage" method too.
  809. For instance:
  810.  
  811.         XtCreateWidget(realize_parent, DrawingArea);
  812.         XtRealizeWidget(DrawingArea);   /* not needed */
  813.         XtManageChild(DrawingArea);
  814.         XtCreateWidget(DrawingArea, any_child) ;
  815.         XtManageChild(any_child);
  816. but
  817.         XtCreateWidget(realize_parent, DrawingArea);
  818.         XtCreateWidget(DrawingArea, any_child) ;
  819.         XtManageChild(any_child);
  820.         XtRealizeWidget(DrawingArea);   /* needed */
  821.         XtManageChild(DrawingArea);
  822.  
  823. Now this is becoming interesting: there are exceptions to the model :-)
  824.  
  825. The first one is the Xt Shell widget, which has what I consider to be a
  826. bug, but what MIT has, until recently, always considered to be a specific
  827. behavior overridable by a subclass (like our VendorShell):
  828. the ChangeManaged method always resizes the child to its own size
  829. when the Shell is realized.
  830.  
  831. A side effect of this behavior is that even the realized<managed trick
  832. won't work for direct descendant of Shell widget:
  833.  
  834.         XtCreateWidget(realize_shell, MessageBox);
  835.         XtRealizeWidget(MessageBox);  /* needless */
  836.         XtManageChild(MessageBox);    /* will get resized anyway */
  837.  
  838. To get rid of this problem, one needs to add a regular manager
  839. between the Shell and the MessageBox in this case, for the sake
  840. of having this manager doing a request to the Shell from its
  841. ChangeManaged proc. This request will then be handled by the Shell
  842. geometry manager, not its ChangeManaged proc, and it will take into
  843. account the child size.
  844. Note that we could also change our VendorShell ChangeManaged code to not
  845. systematically envelop the Xt Shell ChangeManaged class method, and
  846. check for the already realized case, but I would rather wait
  847. for an Xt fix instead (I'm working on it).
  848.  
  849. If you broader the scope of the Xt Shell situation, you find that there are
  850. also some resources in Xm that come into effect upon geometry request
  851. reception but are not used in the ChangeManaged method.
  852.  
  853. Take the PanedWindow constraint resource XmNallowResize for instance,
  854. which controls the validity of a geometry request made by a PW child.
  855.  
  856. If you do:
  857.  
  858.         XtCreateWidget(realize_shell, PanedWindow);
  859.         XtManageChild(PanedWindow);
  860.  
  861.         XtCreateWidget(PanedWindow, button);
  862.         XtManageChild(button);
  863.  
  864. that works fine since the ChangeManaged of the PanedWindow will
  865. handle the insertion of the button and allowResize won't be used.
  866.  
  867. But if you add a manager in this hierarchy:
  868.  
  869.         XtCreateWidget(realize_parent, PanedWindow);
  870.         XtManageChild(PanedWindow);
  871.  
  872.         XtCreateWidget(PanedWindow, manager);
  873.         XtManageChild(manager);
  874.  
  875.         XtCreateWidget(manager, button);
  876.         XtManageChild(button);
  877.  
  878. That doesn't work anymore since the button management results in
  879. its parent manager's ChangeManaged being called, which in turn makes a
  880. *request* to the PanedWindow, resulting in a No reply because
  881. of allowResize (set to False by default).
  882.  
  883. The PanedWindow parent wouldn't have been realized that everything
  884. would have worked fine, since no request would have been made.
  885. It really depends on the early realization scheme.
  886.  
  887. I think XmNresizable in Form is the only other resource to present
  888. this problem. There is not much to do in those cases except than
  889. setting the corresponding resource to True, which makes sense.
  890.  
  891.  
  892. -----------------------------------------------------------------------------
  893. Subject: 91)  How does the ScrolledWindow manage resizing?
  894.  
  895. [Last modified: June 95]
  896.  
  897. Answer:  The scrolled window should resize its immediate child when it is
  898. resized.  The child is XmNworkWindow in the default application-defined
  899. scrolling mode or XmNclipWindow in the automatic scrolling mode.  In either
  900. case, you can then resize your row column.  If you set XmNadjustLast, the
  901. children of a one column row column will be automatically resized.
  902.  
  903. Ken Lee, http://www.rahul.net/kenton/
  904.  
  905. -----------------------------------------------------------------------------
  906. Subject: 92)  Does the XmPanedWindow widget support horizontal paning?
  907.  
  908. [Last modified: May 97]
  909.  
  910. Answer:  In Motif 2.x it does, but not in Motif 1.x.  There are, however, some
  911. 3rd party horizontal paned widgets listed in the Widget FAQ:
  912. http://reality.sgi.com/widgetFAQ/
  913.  
  914. Ken Lee, http://www.rahul.net/kenton/
  915.  
  916. -----------------------------------------------------------------------------
  917. Subject: 93)  TOPIC: TEXT WIDGET
  918.  
  919. -----------------------------------------------------------------------------
  920. Subject: 94)  How do XmTextField and a single line XmText widget differ?
  921.  
  922. [Last modified: Oct 94]
  923.  
  924. Answer:  XmTextField is designed to be a lightweight, single line text editor.
  925. It does not provide as much functionality as does XmText in order to achieve
  926. better performance.
  927.  
  928. Thanks to Kevin Till, kev@osf.org
  929.  
  930. -----------------------------------------------------------------------------
  931. Subject: 95)  Why does  pressing RETURN in a text widget do nothing?  This
  932. happens using Motif 1.0 when I have a text widget inside a bulletin board (or
  933. form) inside a dialog shell. (In Motif 1.1 it is fixed for both text and list
  934. widgets.)
  935.  
  936. Answer:  In single line mode, pressing the <return> key usually invokes the
  937. activate() action, and in multi-line mode, the newline() action.  However,
  938. whenever a widget is the child of a bulletin board widget which is the child
  939. of a dialog shell, the bulletin board forces all of its children to translate
  940. <return> to the bulletin board action Return() which is usually associated
  941. with the default button of the dialog.  To restore the text actions of
  942. activate() or newline(), you need to overide the Return() action of the
  943. bulletin board.
  944.  
  945.  
  946.         /* declarations */
  947.         /* for a single line widget */
  948.         char newTrans[] = "<Key>Return : activate()";
  949.         /* for a multi line widget */
  950.         char newTrans[] = "<Key>Return : newline()";
  951.         XtTranslations transTable;
  952.  
  953.         /* in executable section */
  954.  
  955.         transTable = XtParseTranslationTable(newTrans);
  956.  
  957.         /* after creating but before managing text widget */
  958.  
  959.         XtOverrideTranslations(textWidget, transTable);
  960.  
  961. -----------------------------------------------------------------------------
  962. Subject: 96)  Can you reuse the return value from XtParseTranslationTable?
  963.  
  964. [Last modified: Nov 96]
  965.  
  966. Answer:  The following is a conversation circa 30 Sep 1996 between Kaleb
  967. Keithley (kaleb@x.org) and Tim Behrendsen (tim@a-sis.com, tim@airshields.com>.
  968. The latter suggested this appear in the Motif FAQ.
  969.  
  970. B> Can the return value from XtParseTranslationTable be saved
  971. TB> off and reused for the lifetime of the application?
  972.  
  973. KK> Yes.
  974.  
  975. TB> Ah!  The answer.  Thank you.
  976. KK>
  977. KK>    XtVaSetValues(widget,
  978. KK>        XmNtranslations, XtParseTranslationTable(table), NULL);
  979.  
  980. TB> which implies it's a one-shot deal (otherwise, this would cause
  981. TB> a memory leak).
  982.  
  983. KK> No, you can always retrieve them with Xt(Va)GetValues.
  984.  
  985. TB> You can, but if you don't and use the technique to wantonly
  986. TB> create and destroy dialogs, it seems you will get a memory
  987. TB> leak.
  988.  
  989. KK> That's correct.
  990.  
  991. TB> In fact, what's scary is this technique is used in the Motif
  992. TB> FAQ list; I knew I saw it somewhere reasonably authoritative
  993. TB> ([approx.] Question 133; code by Dan Heller, O'Reilly and Associates).
  994. TB> He does the following:
  995.  
  996. TB>        XtOverrideTranslations(bboard,
  997. TB>             XtParseTranslationTable("<Configure>: resize()"));
  998.  
  999. TB> This has to be unquestionably broken code, if the translation
  1000. TB> tables are never freed or never reused.  Obviously, I can't
  1001. TB> extract out the table from overridden translations.
  1002.  
  1003. KK> You can't extract the original translations, that's correct.
  1004.  
  1005. TB> Come to think of it; how is this handled when translations are
  1006. TB> parsed in resource files?  If I have lots of translation
  1007. TB> overrides, do they simply burn up space that can't be reused?
  1008. TB> Does it get burned up over and over as I create widgets that
  1009. TB> use those translation resources?
  1010.  
  1011. KK> Yup and yup.
  1012.  
  1013. -----------------------------------------------------------------------------
  1014. Subject: 97)  When I add text to a scrolling text widget, how can I get the
  1015. new text to show?
  1016.  
  1017. [Last modified: Sept 94]
  1018.  
  1019. Answer:  Use the (fully supported) function XmTextShowPosition:
  1020.  
  1021.         void XmTextShowPosition(w, position)
  1022.         Widget w;
  1023.         XmTextPosition position;
  1024.  
  1025. where the position is the number of characters from the beginning of the
  1026. buffer of the text to be displayed. If you don't know how many characters are
  1027. in the buffer, use XmTextGetLastPosition.
  1028.  
  1029.         position = XmTextGetLastPosition(w)
  1030.  
  1031. -----------------------------------------------------------------------------
  1032. Subject: 98)  How do I scroll text to display the most recently added
  1033. information?
  1034.  
  1035. [Last modified: Aug 95]
  1036.  
  1037. Answer:  If you're using the XmScrolledText widget, use
  1038. XmTextSetTopCharacter() or XmTextScroll().
  1039.  
  1040. Ken Lee, http://www.rahul.net/kenton/.
  1041.  
  1042. -----------------------------------------------------------------------------
  1043. Subject: 99)  Does the text widget support 16 bit character fonts?
  1044.  
  1045.  
  1046. [Last modified: November 92]
  1047.  
  1048. Answer:  R5 has support for 16 bit character sets, and Motif 1.2 uses that.
  1049. Neither Motif 1.0 nor 1.1 support 16 bit sets.
  1050.  
  1051. -----------------------------------------------------------------------------
  1052. Subject: 100)  How can I stop the text widget from echoing characters typed?
  1053. I need to turn off echo for password input.
  1054.  
  1055. Answer:  Use the XmNmodifyVerifyCallback to tell when input is received. Set
  1056. the `doit' field in the XmTextVerifyCallbackStruct to False to stop the echo.
  1057. (In Motif 1.0 this will cause a beep per character: Live with it, because at
  1058. 1.1 you can turn it off.)  Note that password hiding is inherently insecure in
  1059. X - someone may have an X grab on the keyboard and be reading all characters
  1060. typed in anyway.
  1061.  
  1062. Another solution often proposed is to set the foreground and background
  1063. colours to be the same, effectively hiding the text.  This has a major flaw:
  1064. someone may select the text (triple click the mouse to get the line), and then
  1065. paste the password into say an xterm with *different* foreground and
  1066. background colours.  This immediately shows the password.
  1067.  
  1068. -----------------------------------------------------------------------------
  1069. Subject: 101)  How can I replace characters typed with say a `*'?  I want to
  1070. replace input for password entry.
  1071.  
  1072. [Last modified: Nov 96]
  1073.  
  1074. Answer:  The solution involves the use of XmNmodifyVerifyCallback and then
  1075. examining the XmTextVerifyCallbackStruct.  The following program from Dan
  1076. Heller and Paula Ferguson illustrates this:
  1077.  
  1078. /* Written by Dan Heller and Paula Ferguson.
  1079.  * Copyright 1994, O'Reilly & Associates, Inc.
  1080.  * Permission to use, copy, and modify this program without
  1081.  * restriction is hereby granted, as long as this copyright
  1082.  * notice appears in each copy of the program source code.
  1083.  * This program is freely distributable without licensing fees and
  1084.  * is provided without guarantee or warrantee expressed or implied.
  1085.  * This program is -not- in the public domain.
  1086.  *
  1087.  * 9Sept1996 RAF -- this is a working version, at least under Sol2.4,
  1088.  * using gcc.  I only modified check_passwd().
  1089.  *
  1090.  */
  1091.  
  1092. /* password.c -- prompt for a password. All input looks like
  1093.  * a series of *'s.  Store the actual data typed by the user in
  1094.  * an internal variable.  Don't allow paste operations.  Handle
  1095.  * backspacing by deleting all text from insertion point to the
  1096.  * end of text.
  1097.  */
  1098. #include <Xm/Text.h>
  1099. #include <Xm/LabelG.h>
  1100. #include <Xm/RowColumn.h>
  1101. #include <ctype.h>
  1102.  
  1103. void check_passwd();
  1104. char *passwd; /* store user-typed passwd here. */
  1105.  
  1106. main(argc, argv)
  1107. int argc;
  1108. char *argv[];
  1109. {
  1110.     Widget        toplevel, text_w, rowcol;
  1111.     XtAppContext  app;
  1112.  
  1113.     XtSetLanguageProc (NULL, NULL, NULL);
  1114.  
  1115.     toplevel = XtVaAppInitialize (&app, "Demos",
  1116.         NULL, 0, &argc, argv, NULL, NULL);
  1117.  
  1118.     rowcol = XtVaCreateWidget ("rowcol",
  1119.         xmRowColumnWidgetClass, toplevel,
  1120.         XmNorientation, XmHORIZONTAL,
  1121.         NULL);
  1122.  
  1123.     XtVaCreateManagedWidget ("Password:",
  1124.         xmLabelGadgetClass, rowcol, NULL);
  1125.     text_w = XtVaCreateManagedWidget ("text_w",
  1126.         xmTextWidgetClass, rowcol, NULL);
  1127.  
  1128.     XtAddCallback(text_w, XmNmodifyVerifyCallback, check_passwd, NULL);
  1129.     XtAddCallback(text_w, XmNactivateCallback, check_passwd, NULL);
  1130.  
  1131.     XtManageChild (rowcol);
  1132.     XtRealizeWidget (toplevel);
  1133.     XtAppMainLoop (app);
  1134. }
  1135.  
  1136. /* check_passwd() -- handle the input of a password. */
  1137. void
  1138. check_passwd(text_w, client_data, call_data)
  1139. Widget        text_w;
  1140. XtPointer     client_data;
  1141. XtPointer     call_data;
  1142. {
  1143.     char *new;
  1144.     char *oldpasswd;
  1145.     int len;
  1146.     XmTextVerifyCallbackStruct *cbs =
  1147.         (XmTextVerifyCallbackStruct *) call_data;
  1148.  
  1149.     if (cbs->reason == XmCR_ACTIVATE) {
  1150.         printf ("5assword: %s0, passwd);
  1151.         return;
  1152.     }
  1153.  
  1154.     if( cbs->text->length > 1 ) {
  1155.         cbs->doit = False; /* don't allow paste operations; make the */
  1156.         return;            /* user type the password! */
  1157.     }
  1158.  
  1159.     if( cbs->startPos < cbs->endPos ) {
  1160.         /* shrink the password by moving endPos... characters forward to
  1161.         /* the point of deletion */
  1162.         memmove( &(passwd[cbs->startPos]),
  1163.                  &(passwd[cbs->endPos]),
  1164.                  strlen(passwd) - cbs->endPos + 1 );
  1165.         if( cbs->text->length == 0 ) /* then just a delete, not a replace */
  1166.             return;
  1167.     }
  1168.  
  1169.     new = XtMalloc( cbs->text->length + 1 );
  1170.     strncpy( new, cbs->text->ptr, cbs->text->length ); /* just the new chars */
  1171.     new[cbs->text->length]=' ';
  1172.  
  1173.     if( passwd ) {
  1174.         /* open a hole for the new characters, and insert them
  1175.         /* in the proper place */
  1176.         passwd = XtRealloc( passwd, strlen(passwd) + cbs->text->length + 1 );
  1177.         memmove( &(passwd[cbs->startPos + cbs->text->length]),
  1178.                  &(passwd[cbs->startPos]),
  1179.                  strlen(passwd) - cbs->startPos + 1 );
  1180.         memcpy( &(passwd[cbs->startPos]), new, cbs->text->length );
  1181.     } else {
  1182.         passwd = new;
  1183.     }
  1184.  
  1185.     memset( cbs->text->ptr, '*', cbs->text->length ); /* makes it all stars */
  1186.  
  1187. }
  1188.  
  1189.  
  1190. Thanks to OM1_JDA@pki-nbg.philips.de (Joerg Danne) for alerting me to updating
  1191. this code sample. Thanks also to Russell Fink (rfink@polaris.umuc.edu) for
  1192. providing the Nov. 1996 code update.
  1193.  
  1194. -----------------------------------------------------------------------------
  1195. Subject: 102)  How can I best add a large piece of text to a scrolled text
  1196. widget?
  1197.  
  1198. [Last modified: Sept 94]
  1199.  
  1200. [NOTE: This problem is probably only relevant for Motif 1.0 which probably no
  1201. one is using anymore. If you know this to still be a problem, send mail to
  1202. ksall@cen.com. I'll probably remove this question otherwise.]
  1203.  
  1204. In some versions of Motif 1.0 even using XmTextSetString, it insists on adding
  1205. the text one line at a time, adjusting the scroll bar each time. It looks
  1206. awful and is slow.
  1207.  
  1208. Answer:  If you don't have this problem, use XmTextSetString to set all of the
  1209. text in the widget.  If you do have this slowdown problem even using
  1210. XmTextSetString, unmanage the widget, add the text and then manage it again.
  1211. This may cause the window to blink, but you have to put up with that or switch
  1212. to a different version of Motif.
  1213.  
  1214. -----------------------------------------------------------------------------
  1215. Subject: 103)  How can I highlight text in the Text widget?
  1216.  
  1217. Answer:  argv@zipcode.com (Dan Heller) wrote:
  1218.  
  1219. If you don't need font or color changes, you can do all this using a Text
  1220. widget very easily [in Motif 1.1, anyway].
  1221.  
  1222.         loop() {
  1223.             pos = offset_of_pattern_in_text_widget(pattern, text_w);
  1224.             search_len = strlen(pattern);
  1225.             XmTextSetHighlight(text_w, pos, pos+search_len,
  1226.                         XmHIGHLIGHT_SELECTED);
  1227.         }
  1228.  
  1229.  
  1230. There are two choices for highlighting: reverse video (HIGHLIGHT_SELECTED) and
  1231. underlined (HIGHLIGHT_SECONDARY_SELECTED).  Be careful that your users won't
  1232. confuse your highlights with actual selections!
  1233.  
  1234. -----------------------------------------------------------------------------
  1235. Subject: 104)  How can I select all of the text in a widget programmatically?
  1236. So that some initial text is displayed, but anything typed replaces it.
  1237.  
  1238. [Last modified: July 95]
  1239.  
  1240. Answer:  XmTextSetSelection(Text1, 0, XmTextGetLastPosition(Text1), event-
  1241. >xbutton.time);
  1242.  
  1243. where Text1 is the widget in question (obviously) and event is some event that
  1244. triggered this call.  You can use XtLastTimestampProcessed( display) instead
  1245. of xbutton.time if you don't happen to have an event pointer handy.
  1246.  
  1247. Jon A. Christopher (jac8792@tam2000.tamu.edu) writes:
  1248.  
  1249. I have had difficulty getting this to work as described (even though it agrees
  1250. with the documentation).  I believe that it may be because I usually change
  1251. the TextField to some value and then try to select it.  I haven't looked at
  1252. the internals of the TextField widget, but it must only select the text if the
  1253. text hasn't changed since the time specified.  Ususally the
  1254. "LastTimestampProcessed" will be be *before* you modify the text, and the
  1255. selection is therefore ignored.  I'd suggest using the CurrentTime variable.
  1256. This is an X variable which, if used will make sure that your text is always
  1257. selected.
  1258. -----------------------------------------------------------------------------
  1259. Subject: 105)  Can I customize the pointer cursor or insert position indicator
  1260. used by the text widget?
  1261.  
  1262. [Last modified: May 97]
  1263.  
  1264. Answer:  No.  These are hard coded.
  1265.  
  1266. Ken Lee, http://www.rahul.net/kenton/
  1267.  
  1268.  
  1269. -----------------------------------------------------------------------------
  1270. Subject: 106)  How can I change colours of text in the Text widget?  I want
  1271. some of the text in one colour, some in another.
  1272.  
  1273. [Last modified: June 95]
  1274.  
  1275. Answer:  In Motif 1.x, you can't.  Text stores an ordinary string, and points
  1276. where `highlights' of various types begin and end.  These highlights are all
  1277. the control you have over components of the text.
  1278.  
  1279. However, in Motif 2.0, XmStrings may be different colors in the same widget.
  1280.  
  1281. Ken Lee, http://www.rahul.net/kenton/, for the update.
  1282.  
  1283. -----------------------------------------------------------------------------
  1284. Subject: 107)  How can I change the font of text in the Text widget?  I want
  1285. some of the text in one font, some in another.
  1286.  
  1287. [Last modified: Sept 94]
  1288.  
  1289. Answer:  You can't in Text (see the previous question).  If you wanted
  1290. readonly text, you could do it by using a label instead.  Label uses
  1291. XmStrings, which can contain multiple character sets in the one string.
  1292.  
  1293. If you are using Motif 2.0, however, XmStrings are now permitted in XmText
  1294. widgets, which solves this particular problem.
  1295.  
  1296. -----------------------------------------------------------------------------
  1297. Subject: 108)  Is there an emacs binding for the text widget?
  1298.  
  1299. Answer:  This set is due to Kee Hinckley (nazgul@utopia.com):
  1300.  
  1301. *XmText.translations: #override\n\
  1302.         Ctrl <Key>b:            backward-character()\n\
  1303.         Alt <Key>b:             backward-word()\n\
  1304.         Meta <Key>b:            backward-word()\n\
  1305.         Shift Alt <Key>b:       backward-word(extend)\n\
  1306.         Shift Meta <Key>b:      backward-word(extend)\n\
  1307.         Alt <Key>[:             backward-paragraph()\n\
  1308.         Meta <Key>[:            backward-paragraph()\n\
  1309.         Shift Alt <Key>[:       backward-paragraph(extend)\n\
  1310.         Shift Meta <Key>[:      backward-paragraph(extend)\n\
  1311.         Alt <Key><:             beginning-of-file()\n\
  1312.         Meta <Key><:            beginning-of-file()\n\
  1313.         Ctrl <Key>a:            beginning-of-line()\n\
  1314.         Shift Ctrl <Key>a:      beginning-of-line(extend)\n\
  1315.         Ctrl <Key>osfInsert:    copy-clipboard()\n\
  1316.         Shift <Key>osfDelete:   cut-clipboard()\n\
  1317.         Shift <Key>osfInsert:   paste-clipboard()\n\
  1318.         Alt <Key>>:             end-of-file()\n\
  1319.         Meta <Key>>:            end-of-file()\n\
  1320.         Ctrl <Key>e:            end-of-line()\n\
  1321.         Shift Ctrl <Key>e:      end-of-line(extend)\n\
  1322.         Ctrl <Key>f:            forward-character()\n\
  1323.         Alt <Key>]:             forward-paragraph()\n\
  1324.         Meta <Key>]:            forward-paragraph()\n\
  1325.         Shift Alt <Key>]:       forward-paragraph(extend)\n\
  1326.         Shift Meta <Key>]:      forward-paragraph(extend)\n\
  1327.         Ctrl Alt <Key>f:        forward-word()\n\
  1328.         Ctrl Meta <Key>f:       forward-word()\n\
  1329.         Ctrl <Key>d:            kill-next-character()\n\
  1330.         Alt <Key>BackSpace:     kill-previous-word()\n\
  1331.         Meta <Key>BackSpace:    kill-previous-word()\n\
  1332.         Ctrl <Key>w:            key-select() kill-selection()\n\
  1333.         Ctrl <Key>y:            unkill()\n\
  1334.         Ctrl <Key>k:            kill-to-end-of-line()\n\
  1335.         Alt <Key>Delete:        kill-to-start-of-line()\n\
  1336.         Meta <Key>Delete:       kill-to-start-of-line()\n\
  1337.         Ctrl <Key>o:            newline-and-backup()\n\
  1338.         Ctrl <Key>j:            newline-and-indent()\n\
  1339.         Ctrl <Key>n:            next-line()\n\
  1340.         Ctrl <Key>osfLeft:      page-left()\n\
  1341.         Ctrl <Key>osfRight:     page-right()\n\
  1342.         Ctrl <Key>p:            previous-line()\n\
  1343.         Ctrl <Key>g:            process-cancel()\n\
  1344.         Ctrl <Key>l:            redraw-display()\n\
  1345.         Ctrl <Key>osfDown:      next-page()\n\
  1346.         Ctrl <Key>osfUp:        previous-page()\n\
  1347.         Ctrl <Key>space:        set-anchor()
  1348.  
  1349.  
  1350. ! If you'd like the Delete key to work like backspace instead of deleting
  1351. ! backwards, add the following definition to the lines above.
  1352. !       <Key>osfDelete: delete-previous-character()\n\
  1353.  
  1354. ! These aren't included because they could intefere with
  1355. | menu accelerators (or vice versa)
  1356. !       Alt <Key>p:             backward-paragraph()\n\
  1357. !       Meta <Key>p:            backward-paragraph()\n\
  1358. !       Shift Alt<Key>p:        backward-paragraph(extend)\n\
  1359. !       Shift Meta<Key>p:       backward-paragraph(extend)\n\
  1360. !       Alt <Key>w:             copy-clipboard()\n\
  1361. !       Meta <Key>w:            copy-clipboard()\n\
  1362. !       Ctrl Alt <Key>w:        cut-clipboard()\n\
  1363. !       Ctrl Meta <Key>w:       cut-clipboard()\n\
  1364. !       Alt <Key>y:             paste-clipboard()\n\
  1365. !       Meta <Key>y:            paste-clipboard()\n\
  1366. !       Alt <Key>f:             forward-word()\n\
  1367. !       Meta <Key>f:            forward-word()\n\
  1368. !       Alt <Key>n:             forward-paragraph()\n\
  1369. !       Meta <Key>n:            forward-paragraph()\n\
  1370. !       Shift Alt <Key>n:       forward-paragraph(extend)\n\
  1371. !       Shift Meta <Key>n:      forward-paragraph(extend)\n\
  1372. !       Shift Alt <Key>f:       forward-word(extend)\n\
  1373. !       Shift Meta <Key>f:      forward-word(extend)\n\
  1374. !       Alt <Key>d:             kill-next-word()\n\
  1375. !       Meta <Key>d:            kill-next-word()\n\
  1376. !       Alt <Key>h:             select-all()\n\
  1377. !       Meta <Key>h:            select-all()\n\
  1378.  
  1379. Similar sets of translations have been suggested by others.
  1380.  
  1381. -----------------------------------------------------------------------------
  1382. Subject: 109)  What if I have problems with the backspace/delete keys?
  1383.  
  1384. [Last modified: Dec 94]
  1385.  
  1386. Answer:  mclarnon@maths.ox.ac.uk (Gerald.McLarnon) writes:
  1387.  
  1388. I am running a precompiled program based on motif and am having some problems
  1389. with the backspace/delete keys. Following the instructions of the faq I put th
  1390. e following lines in my .Xdefaults file
  1391.  
  1392.      *XmText.translations: #override                    <Key>osfDelete:
  1393. delete-previous-character()
  1394.      *XmTextField.translations: #override                    <Key>osfDelete:
  1395. delete-previous-character()
  1396.   This meant that in dialogue boxes (such as 'Open File') the delete key
  1397.   deleted to the left, but not in the main application window.
  1398.  
  1399.   Any hints for someone who isn't much of an X-pert?
  1400.  
  1401. David Kaelbling <drk@x.org> replied:
  1402.  
  1403. There are a couple possibilities.  In addition to the precedence of loading
  1404. resource files (explained in section 2.3 of the X11R5 X Toolkit Intrinsics
  1405. manual), resource values in the database are chosen based on a "most explicit
  1406. match" algorithm (i.e. those with the most qualifiers on the left hand side
  1407. win -- see section 15.2 of the X11R5 Xlib - C Library manual).  So if this
  1408. application's app-defaults file or fallback resources says
  1409. *Foo*XmText.translations:... that value will be used instead of yours.
  1410.  
  1411. Find the app-defaults file for your application and look to see if it
  1412. specifies translations for text widgets in the main application; if it does
  1413. you'll need to make yours at least as explicit.
  1414.  
  1415. If the app-defaults file isn't the problem then the application may be hard-
  1416. wiring the translations.  If that's the case you'll probably have to change
  1417. your virtual key bindings so that the key you think of as osfDelete is really
  1418. osfBackSpace.  You can do that for an individual application by setting its
  1419. defaultVirtualBindings resource, or for all Motif applications with a
  1420. $HOME/.motifbind file ("man xmbind" and "man VirtualBindings" give more detail
  1421. and alternatives).  In either case you'll need to specify a complete list of
  1422. virtual key bindings; there is no equivalent to #override.  To find out your
  1423. current virtual key bindings run "xprop -root | fgrep BINDINGS" and clean up
  1424. the result.
  1425.  
  1426. -----------------------------------------------------------------------------
  1427. Subject: 110)  How can I use a file as the text source for a Text widget?
  1428.  
  1429. Answer:  You can't do it directly like you can with the Athena Text widget.
  1430. Instead, read the text from the file into a string (all of it!) and then use
  1431. XmTextSetString.  Alternatively, read blocks of characters and add them at the
  1432. end of the text using XmTextInsertString.  The following is an excerpt from
  1433. Dan Heller's "file_browser.c":
  1434.  
  1435.     /* file_browser.c -- use a ScrolledText object to view the
  1436.      * contents of arbitrary files chosen by the user from a
  1437.      * FileSelectionDialog or from a single-line text widget.
  1438.      */
  1439.  
  1440.     ...
  1441.     struct stat statb;
  1442.  
  1443.     /* make sure the file is a regular text file and open it */
  1444.     if (stat(filename, &statb) == -1 ||
  1445.             (statb.st_mode & S_IFMT) != S_IFREG ||
  1446.             !(fp = fopen(filename, "r"))) {
  1447.         if ((statb.st_mode & S_IFMT) == S_IFREG)
  1448.             perror(filename); /* send to stderr why we can't read it */
  1449.         else
  1450.             fprintf(stderr, "%s: not a regular file\n", filename);
  1451.         XtFree(filename);
  1452.         return;
  1453.     }
  1454.  
  1455.     /* put the contents of the file in the Text widget by allocating
  1456.      * enough space for the entire file, reading the file into the
  1457.      * allocated space, and using XmTextFieldSetString() to show the file.
  1458.      */
  1459.     if (!(text = XtMalloc((unsigned)(statb.st_size+1)))) {
  1460.         fprintf(stderr, "Can't alloc enough space for %s", filename);
  1461.         XtFree(filename);
  1462.         fclose(fp);
  1463.         return;
  1464.     }
  1465.  
  1466.     if (!fread(text, sizeof(char), statb.st_size+1, fp))
  1467.         fprintf(stderr, "Warning: may not have read entire file!\n");
  1468.  
  1469.     text[statb.st_size] = 0; /* be sure to NULL-terminate */
  1470.  
  1471.     /* insert file contents in Text widget */
  1472.     XmTextSetString(text_w, text);
  1473.  
  1474.  
  1475. -----------------------------------------------------------------------------
  1476. Subject: 111)  How can put Text in overstrike mode instead of insert?
  1477.  
  1478. [Last modified: Mar 95]
  1479.  
  1480. Answer:  (Be sure to read the update after the first answer. This is also a
  1481. second update which cautions against the approach.)
  1482.  
  1483. There is no direct way. This was posted by Edmond Pitt (ejp@bohra.cpg.oz) The
  1484. correct answer to the question is to put the following in a modifyVerify
  1485. callback, where 'mvcb' is the XmTextVerifyCallbackStruct, and 'overstriking'
  1486. is defined by you:
  1487.  
  1488.     if (overstriking && mvcb->text->length == 1)
  1489.     {
  1490.         _XmTextDisableRedisplay(w,FALSE);
  1491.         XtCallActionProc(w,"delete-next-character",mvcb->event,0);
  1492.         _XmTextEnableRedisplay(w);
  1493.     }
  1494.  
  1495. _XmText{Dis,En}ableRedisplay() are XmText{Dis,En}ableRedisplay() in 1.0, but
  1496. X11R3 has no XtCallActionProc() anyway. For this environment you need my 1.0.3
  1497. Text widget patches posted last year & available on request.
  1498.  
  1499. An update was provided by Ingeborg (inca@osf.org):
  1500.  
  1501. In 1.2 and later releases, there is an action function toggle-overstrike()
  1502.  
  1503.  
  1504. which will toggle between overstrike and insert mode. Before 1.2.3, there is
  1505. no visual difference, and at most one character will get overstruck. In 1.2.3,
  1506. a block cursor was added as a visual cue to that the widget is in overstrike
  1507. mode, and the code was fixed to overstrike the actual number of characters
  1508. input (this makes a difference if you have preediting - for example in
  1509. japanese).
  1510.  
  1511. There is no default binding in 1.2, but the recommended key is osfInsert
  1512. without modifiers.  No resource exists.
  1513.  
  1514.  
  1515. Ed Kaltenbach (kaltenba@ataway.aptec.com) wrote:
  1516.  
  1517.     I was simulating overstrike mode in the Text Field widget by using
  1518.     the delete_next_character solution listed in subject 71.
  1519.     When the software is compiled with Motif 1.2.2, the modifyVerify
  1520.     callback does not get called for the last character when XmNmaxLength
  1521.     is specified.  It seems that the check if maxLength has been reached
  1522.     is done before the modifyVerify gets called and it keeps the modifyVerify
  1523.     from being called.  Is this a Motif bug? Does anybody have a solution that
  1524.     will work with Versions 1.1 and 1.2 of Motif?
  1525.  
  1526.  
  1527. Phil Day <phil@cfmu.eurocontrol.be> responded to Ed (and apologized for only
  1528. sending pseudocode!):
  1529.  
  1530. I've had the same problem, and for my money it's a bug.  My workaround is to
  1531. make all text widgets (I don't use textfield because of some other problems in
  1532. the past) have XmNmaxLength > XmNcolumns, so that the modifyVerify callback
  1533. gets a chance to do its stuff.
  1534.  
  1535. If you only want to support overstrike for typing, 1 extra charater is enough,
  1536. but if you want to support cut-and-paste for any length string you need
  1537. maxLength = 2*columns.  In the modifyVerify you have to check the result is <
  1538. columns.
  1539.  
  1540. I've tried using the Motif 1.2 support for overstrike, but this just seems to
  1541. work on a kind of pending-delete and only works for the single charater
  1542. replacement caes (that's my main argument for calling it a bug).
  1543.  
  1544. I don't use delete-next-character (I can't remember why just now, but I know I
  1545. had some problem with it).  Instead I have something like the following:
  1546.  
  1547. modifyVerify()
  1548. {
  1549.         if (acceptable)
  1550.                 XmReplaceText(...)
  1551.  
  1552.         cd->doit = False;
  1553.         // we've just done it, we don't wnat Motif to !
  1554.  
  1555.     XtVaSetValues (w,
  1556.                    XmNverifyBell, False,
  1557.                    NULL);
  1558.         // Otherwise we'll get a beep.
  1559. }
  1560.  
  1561. valueChanged()
  1562. {
  1563.  
  1564.     XtVaSetValues (w,
  1565.                    XmNverifyBell, True,
  1566.                    NULL);
  1567.         // turned off in modifyVerify
  1568.  
  1569. }
  1570.  
  1571. Glenn Mandelkern <gmandel@Corp.Megatest.Com> writes about a problem with the
  1572. above solution.
  1573.  
  1574.  
  1575.     We have been running our software on Sparc 20's, under Motif 1.1
  1576.     and Motif 1.2, X11R5, Solaris 2.4.
  1577.     Unfortunately, some colleagues and I have found a disturbing side effect
  1578.     when following this suggestion.  Calling XtVaSetValues() in the
  1579.     modifyVerifyCallback causes the Text widget to flash.
  1580.  
  1581.     The O'Reilly guides say not to call XtVaSetValues() during text
  1582.     modification callbacks.  Motif Volume 6 has this on page 511 and
  1583.     Motif Volume 6A has it on page 496.
  1584.  
  1585.     I myself thought it would be fairly trivial to just switch the bell
  1586.     on and off.  But since XtVaSetValues() calls XmText's set_values() method,
  1587.     my guess is that its set_values() does something that causes this.
  1588.  
  1589.     So when you enter characters, the Text widget flashes.  It also slows
  1590.     down the performance of the Text widget.  You'll see this on a multi-line
  1591.     Text widget, especially with it occupying a full screen with text.
  1592.  
  1593.     If you want to see this, take the editor.c program in Volume 6 or 6A,
  1594.     then add a modifyVerifyCallback to the text_output widget.  Then inside
  1595.     that callback, call XtVaSetValues with the XmNverifyBell like above.
  1596.  
  1597.     This is a common "mistake", one which I've done more than once.
  1598.     I remember also that when I did not have the XtVaSetValues() in place,
  1599.     I got the beeps.
  1600.  
  1601.     So now we've reworked the application as follows:
  1602.         1.  The Text widget is initially created with XmNverifyBell
  1603.             set to False.
  1604.  
  1605.         2.  We ring the bell using XBell() when we detect a condition
  1606.             for which we want to veto text modifications.
  1607.  
  1608.     For our application, this provides the wanted feedback and gets rid
  1609.     of the flashes.
  1610.  
  1611.  
  1612. -----------------------------------------------------------------------------
  1613. Subject: 112)  How can I make the Delete key do a Backspace?  Related
  1614. question: How can I swap Delete and Backspace?
  1615.  
  1616. [Last modified: Oct 94]
  1617.  
  1618. Answer:  Put this in your .Xdefaults
  1619.  
  1620.     *XmText.translations: #override <Key>osfDelete: delete-previous-character()
  1621.  
  1622.  
  1623. Additional information from David Kaelbling <drk@x.org>:
  1624.  
  1625. You can also supply an arbitrary file name to xmbind (so you can conditionally
  1626. run xmbind from your .xinitrc file based on the hostname, architecture,
  1627. xdpyinfo output, or whatever).
  1628.  
  1629. Some people prefer to use xmodmap to swap the keysyms for all applications,
  1630. but what you're doing will work fine if you specify all of the virtual key
  1631. bindings.  The current bindings are stored on the root window -- use "xprop
  1632. -root" and look for a _MOTIF_BINDINGS or _MOTIF_DEFAULT_BINDINGS property.
  1633. OSF/Motif is also distributed with a "bindings" directory containing all the
  1634. fallback virtkey binding files.
  1635.  
  1636. There are several ways to do display-specific customization: make
  1637.  
  1638. -----------------------------------------------------------------------------
  1639. Subject: 113)  Can I change the tab stops in the XmText widget?
  1640.  
  1641. [Last modified: May 95]
  1642.  
  1643. Answer:  No.
  1644.  
  1645. Ken Lee, http://www.rahul.net/kenton/
  1646.  
  1647. -----------------------------------------------------------------------------
  1648. END OF PART FOUR
  1649.