home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / windows / x / motif / 5640 < prev    next >
Encoding:
Internet Message Format  |  1992-08-16  |  31.9 KB

  1. Path: sparky!uunet!sun-barr!cs.utexas.edu!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!ucbvax!ECHO.CANBERRA.EDU.AU!jan
  2. From: jan@ECHO.CANBERRA.EDU.AU (Jan Newmarch)
  3. Newsgroups: comp.windows.x.motif
  4. Subject: Motif FAQ (Part 1 of 5)
  5. Summary: This posting contains a list of Frequently Asked Questions and their answers about Motif.
  6. Keywords: FAQ question answer
  7. Message-ID: <9208162351.AA07818@pandonia.canberra.edu.au>
  8. Date: 17 Aug 92 14:51:50 GMT
  9. Expires: 17 Oct 92 04:31:40 GMT
  10. Sender: daemon@ucbvax.BERKELEY.EDU
  11. Reply-To: jan@ise.canberra.edu.au (Jan Newmarch)
  12. Followup-To: comp.windows.x.motif
  13. Distribution: inet
  14. Organization: The Internet
  15. Lines: 705
  16.  
  17. Archive-name: motif-faq/part1
  18. Last-modified: Tue July 14 1992
  19. Version: 2.6
  20.  
  21.  
  22.  
  23. [Last changed: 15 July 92]
  24.  
  25. This article contains the answers to some Frequently Asked Questions (FAQ) 
  26. often seen in comp.windows.x.motif. It is posted to help reduce volume in 
  27. this newsgroup and to provide hard-to-find information of general interest.
  28.  
  29.         Please redistribute this article!
  30.  
  31. This article includes answers to the following questions. Ones marked with
  32. a + indicate questions new to this issue; those with changes of content since
  33. the last issue are marked by *:
  34.  
  35.  0) TOPIC: WHAT ARE OTHER RELEVANT NEWSGROUPS?
  36.  1) TOPIC: FTP ARCHIVES
  37.  2) Is the FAQ list available for FTP anywhere?
  38.  3) Is this newsgroup archived?
  39.  4) Is the mail list motif-talk archived?
  40.  5) TOPIC: OSF AND MOTIF
  41.  6)  What versions of Motif are there?
  42.  7) Where can I get Motif?
  43.  8) Is there a list of Motif bugs?
  44.  9) Where can I get public domain Motif source?
  45. 10) Are the Motif examples publically available?
  46. 11)  Has anyone done a public domain Motif lookalike?
  47. 12) Does anyone from OSF pay attention to our questions/suggestions?
  48. 13) Does OSF have an application compliance validation service?  
  49. 14) What is the motif-talk mailing list?
  50. 15) What MIT patches do I use, and when do I use fix-osf?
  51. 16) How does Motif work with X11R5?
  52. 17)  How can I find which version of Motif I have?
  53. 18) TOPIC: LITERATURE
  54. 19)* What books should I read or do I need to program using Motif?
  55. 20) TOPIC: MWM
  56. 21) What is the difference between Motif and mwm?
  57. 22) Does anyone have an alternative set of 3-D defaults for a monochrome screen?
  58. 23)  How can I modify the Motif window manager decorations?
  59. 24)  How can I turn off the Motif window manager functions from the system menu?
  60. 25)  How can tell I if the user has selected the "Close" item on the system menu attached to the top-level shell?
  61. 26)+ Is there an mwm virtual desktop manager?
  62. 27) TOPIC: MOTIF GENERATORS
  63. 28)*  What prototyping tools are there to generate Motif code?
  64. 29) TOPIC: TEXT WIDGET
  65. 30) Why does  pressing  <return> in a text widget do nothing?
  66. 31) When I add text to a scrolling text widget how can I get the new text to show?
  67. 32) Does the text widget support 16 bit character fonts?
  68. 33) How can I stop the text widget from echoing characters typed?
  69. 34) How can I replace characters typed with say a `*'?
  70. 35) How can I best add a large piece of text to a scrolled text widget?
  71. 36) How can I highlight text in the Text widget?
  72. 37)  How can I select all of the text in a widget programmatically?
  73. 38) How can I change colours of text in the Text widget?
  74. 39) How can I change the font of text in the Text widget?
  75. 40) Is there an emacs binding for the text widget?
  76. 41) How can I use a file as the text source for a Text widget?
  77. 42) How can put Text in overstrike mode instead of insert?
  78. 43) How can I make the Delete key do a backspace?
  79. 44) TOPIC: LIST WIDGET
  80. 45) How do I best put a new set of items into a list?
  81. 46)  Can I have strings with different fonts in a list?
  82. 47) Can I get a bitmap to show in a list item like I can in a Label?
  83. 48) Can I have items with different colours in a list?
  84. 49) Can I grey out an item in a list?
  85. 50) TOPIC: FILE SELECTION BOX WIDGET
  86. 51) What is libPW.a and do I need it?
  87. 52) What are these compile errors: Undefined symbol _regcmp?
  88. 53) What's wrong with the Motif 1.0 File Selection Box?
  89. 54) TOPIC: FORM WIDGET
  90. 55) Why don't labels in a Form resize when the label is changed?
  91. 56) How can I center a widget in a form?
  92. 57) How do I line up two columns of widgets of different types?
  93. 58) TOPIC: PUSHBUTTON WIDGET
  94. 59) Why can't I use accelerators on buttons not in a menu?
  95. 60) TOPIC: LABEL WIDGET
  96. 61) How can I align the text in a label (button, etc) widget?
  97. 62) Why doesn't label alignment work in a RowColumn?
  98. 63)*  How can I set a multiline label?
  99. 64)  How can I have a vertical label?
  100. 65)+ How can I have a Pixmap in a Label?
  101. 66) TOPIC: DRAWING AREA WIDGET    
  102. 67) How can I send an expose event to a Drawing Area widget?
  103. 68) How can I know when a DrawingArea has been resized?
  104. 69) TOPIC: MENUS
  105. 70) What can I put inside a menu bar?
  106. 71) Can I have a cascade button without a submenu in a pulldown menu?
  107. 72) Should I have a cascade button without a submenu in a pulldown menu?
  108. 73) TOPIC: INPUT FOCUS
  109. 74) How can I direct the keyboard input to a particular widget?
  110. 75) How can I have a modal dialog which has to be answered before the application can continue?
  111. 76) TOPIC: MEMORY AND SPEED
  112. 77)* Why does my application grow in size?
  113. 78) Why does my application take a long time to start up?
  114. 79) My application is running too slowly. How can I speed it up?
  115. 80) TOPIC: XMSTRING
  116. 81) How can I get the Ascii text out of an XmString?
  117. 82) When can XmStrings used as resources be freed?
  118. 83) Why doesn't XmStringGetNextSegment() work properly?
  119. 84) TOPIC: DIALOGS
  120. 85) How do I stop my dialog disappearing when I press the help button?
  121. 86) How do I make my own dialog?
  122. 87) How come the title bars for my dialogs now have "_popup" or "<-popup" concatenated onto the widget name?
  123. 88) How can I force a dialog window to display?
  124. 89) How can I control placement of a popup widget?
  125. 90) TOPIC: LANGUAGE BINDINGS
  126. 91) Is there a C++ binding for Motif?
  127. 92) Is there a Common Lisp binding for Motif?
  128. 93)* Is there an Ada binding for Motif?
  129. 94) TOPIC: SPECIFIC PLATFORMS
  130. 95) Is it easy to build Motif for a Sun?
  131. 96) What compile errors/warnings might I get in both Sun 3 and Sun 4?
  132. 97) On a Sun 3, what are the mwm startup error messages about?
  133. 98) Are there problems making shared libraries on a Sun?
  134. 99) Has anyone made shared libraries on an IBM RS/6000?
  135. 100)  What is the error  "Unaligned access in XmString" under Ultrix?
  136. 101) TOPIC: KEYSYMS
  137. 102)* What is causing the messages "unknown keysym osfDown..."?
  138. 103) What happens if I can't install Motif Keysyms?
  139. 104) Why has OSF introduced Keysyms into Motif 1.1?
  140. 105) TOPIC: ICONS
  141. 106) How can I keep track of changes to iconic/normal window state?
  142. 107) How can I check if my application has come up iconic?
  143. 108) How can I start my application in iconic state?
  144. 109) How can an application iconify itself?
  145. 110) How can an application de-iconify itself?
  146. 111) TOPIC: MISCELLANEOUS
  147. 112)  What is IMUG and how do I join it?
  148. 113)+ How do I set the title of a top level window?
  149. 114)  Can I use editres with Motif?
  150. 115)  How can I put decorations on transient windows using olwm?
  151. 116) Why does an augment translation appear to act as replace for some widgets?
  152. 117) How do you "grey" out a widget so that it cannot be activated?
  153. 118) Why doesn't the Help callback work on some widgets?
  154. 119) Where can I get a Table widget?
  155. 120)*  Has anyone done a bar graph widget?
  156. 121)  Does anyone know of a source code of a graph widget
  157. 122)*  Is there a help system available, such as in Windows 3?
  158. 123) Can I specify a widget in a resource file?
  159. 124) Why are only some of my translations are being installed?
  160. 125)* Where can I get the PanHandler code?
  161. 126) What are these passive grab warnings?
  162. 127) How do I have more buttons than three in a box?
  163. 128)*  How do I create a "busy working cursor"?
  164. 129) TOPIC: ACKNOWLEDGEMENTS
  165.  
  166. If you have suggestions or corrections for any of these answers or any 
  167. additional information, please send them directly to jan@ise.canberra.edu.au;
  168. the information will be included in the next revision (or possibly the one 
  169. after that; thanks for the many suggestions which haven't been incorporated 
  170. yet).  The answers in this iteration are acknowledged to be partial.
  171.  
  172. This posting is intended to be distributed at approximately the beginning of 
  173. each month.
  174.  
  175. The information contained herein has been gathered from a variety of sources. In
  176. many cases attribution has been lost; if you would like to claim responsibility
  177. for a particular item, please let us know. 
  178.  
  179. Conventions used below: telephone numbers tend to be Bell-system unless 
  180. otherwise noted; prices on items are not included.
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188. -------------------------------------------------------------------------------
  189. Subject:  0) TOPIC: WHAT ARE OTHER RELEVANT NEWSGROUPS?
  190.  
  191. Answer: This newsgroup is comp.windows.x.motif.  The nearest related group is
  192. comp.windows.x.  It also maintains an FAQ, which deals in all sorts of X, Xlib
  193. and Xt questions. Look there for answers to questions such as "How do I get a
  194. screendump of my application?", "where do I get X11R4", etc.  Other groups which
  195. may have relevant information are comp.windows.news, comp.windows.misc and
  196. comp.windows.open-look.
  197.  
  198. -------------------------------------------------------------------------------
  199. Subject:  1) TOPIC: FTP ARCHIVES
  200.  
  201. -------------------------------------------------------------------------------
  202. Subject:  2) Is the FAQ list available for FTP anywhere?
  203.  
  204. Answer: A number of FAQ's (including this one) are available for anonymous ftp
  205. at pit-manager.mit.edu, 18.172.1.27 under the directory pub/usenet.  (Motif is
  206. under pub/usenet/comp.windows.x.motif) There is also a mail server called mail-
  207. server@pit-manager.mit.edu.  To retrieve a file send mail to the server with a
  208. subject or body similar to
  209.  
  210.         send usenet/comp.windows.x.motif/Frequently_Asked_Questions_About_Motif_(Part_1_of_3)
  211.  
  212. This service is looked after by Jonathan Kamens (jik@pit-manager.mit.edu).
  213.  
  214. It has also been placed in contrib/Motif-FAQ at export.lcs.mit.edu.
  215.  
  216. -------------------------------------------------------------------------------
  217. Subject:  3) Is this newsgroup archived?
  218.  
  219. Answer: A number of individuals are archiving the group for their own records,
  220. but no-one has set up an FTP-able archive yet.
  221. [Does anyone have a free 10Meg or so?]
  222.  
  223.  
  224. -------------------------------------------------------------------------------
  225. Subject:  4) Is the mail list motif-talk archived?
  226.  
  227. Answer: If you have purchased support from OSF then you have access to their
  228. archive server for motif-talk.
  229.  
  230. -------------------------------------------------------------------------------
  231. Subject:  5) TOPIC: OSF AND MOTIF
  232.  
  233. -------------------------------------------------------------------------------
  234. Subject:  6)  What versions of Motif are there?
  235.  
  236. Answer: Motif 1.0 is based on the R3 toolkit.  There are patch releases to 1.0:
  237. 1.0.1, 1.0.A, 1.0.2 and 1.0.3, 1.0.4, 1.0.5. 1.0.A was a fairly major patch, as
  238. it involved a complete re-engineering of UIL and Mrm.  Almost everyone who has
  239. 1.0.x has either 1.0.A or 1.0.3.  There are not expected to be further patches
  240. to 1.0.
  241.  
  242. Motif 1.1 is based on the R4 toolkit.  The current version is Motif 1.1.0, plus
  243. a couple of patches available to full support contract holders. Motif 1.1.1 has
  244. been released as a patch to licensees with Full Support or Technical Update
  245. service.  Motif 1.1.2 is a patch release which contains the necessary changes to
  246. fix over 80 bugs reported against Motif. It is available to support contract
  247. holders (including both full support and update service).  The 1.1.3 release
  248. fixes a further 150 bugs and is available from August 1991 to support contract
  249. holders (including both full support and update service).  1.1.4 offers X11R5
  250. support, but is not an X11R5 product.  Future 1.1 patch releases are tentatively
  251. scheduled as follows:
  252.  
  253.         1.1.5   1st half 1992
  254.  
  255.  
  256. Motif 1.2 was released in April 1992 and is based on the X11R5 toolkit.  It
  257. offers increased compatibility with international standards,  PC-style behavior
  258. and binary compatibility with OSF/Motif 1.1 applications.  New features include
  259. drag-and-drop, tear- off menus, toolkit enhancements and new documentation.
  260. toolkit.
  261.  
  262. From dbrooks@osf.org: "Motif 2.0 will ship well before the sun burns out, unless
  263. we decide to change the name first, and will contain a free plastic spaceman in
  264. every box."
  265.  
  266. -------------------------------------------------------------------------------
  267. Subject:  7) Where can I get Motif?
  268.  
  269. Answer:
  270.     Various hardware vendors produce developer's toolkits of binaries, header
  271. files, and documentation; check your hardware vendor, particularly if that
  272. vendor is an OSF member. Systems known to be shipping now: HP (sans UIL), Apollo
  273. (sans UIL), SCO, ICS, Mips (RISCwindows=X11R3 + full Motif), IBM, Data General
  274. for AViioNs (includes UIL), Bull (?), Concurrent Computer Corporation 5000,
  275. 6000, 8000 series machines, Convex, Sequent.
  276.  
  277.     In addition, independent binary vendors produce Motif toolkits . ICS makes
  278. several binary kits, notably for Sun, DEC, Apple; Quest (408-988-8880) sells
  279. kits for Suns, as well; IXI (+44 223 462 131) offers kits for Sun3 (SunOS 3.5 or
  280. later, and Sun4 (SunOS 4.0.1 or later). Unipalm XTech (+44 954211797; or Aurora
  281. Technologies 617-577-1288 in USA) offers a binary kit for Suns based on Motif
  282. 1.1, with shared libraries.  NSL (+33 (1) 43 36 77 50; requests@nsl.fr) offers
  283. kits for the Sun 3 and Sun 4.  [An FAQ is for "personal opinions" on these
  284. toolkits.  I don't think it is appropriate to give such opinions through this
  285. particular posting, so I haven't included any.] In Australia, Information
  286. Technology Consultants Pty Ltd has Motif 1.1.2 for Sun Sparc 4.1 ( phone on (02)
  287. 360 6999, fax on (02) 360 6695 or e-mail to motif@itcsyd.itc.oz.au)
  288.  
  289.  
  290.   The kits include varied levels of bug-fixing and support for shared libraries.
  291. BIM (Fax : +32(2)759.47.95) offer Motif 1.1 for Sun-3, Sun-4, Sun-386i. Includes
  292. shared libraries.  Metrolink Inc. (+1-305-566-9586, sales@metrolink.com; in
  293. Europe contact ADNT, (33 1) 3956 5333) ships an implementation of X11R4 and
  294. Motif 1.1 for several 386 systems.
  295.  
  296.     An OSF/Motif source license must be obtained from OSF before source can be
  297. obtained from the Open Software Foundation. Call the Direct Channel Desk at OSF
  298. at 617-621-7300 or email direct@osf.org for ordering information.  In addition
  299. to the full Motif source, "option C" allows you to purchase source for the
  300. window manager mwm to run on X terminals.
  301.  
  302.  
  303. -------------------------------------------------------------------------------
  304. Subject:  8) Is there a list of Motif bugs?
  305.  
  306. Answer: With each patch release of Motif shipped, there is a list of known bugs
  307. provided.  The filename on the tape is "./OPENBUGS".  There is also a list of
  308. all the issues closed/resolved in that patch.  That is found as part of the
  309. "./README-1.1.n" (where n is the patch number) file.
  310.  
  311. These are the only OSF published lists.
  312.  
  313. No-one else seems to publish a list.
  314.  
  315.  
  316. -------------------------------------------------------------------------------
  317. Subject:  9) Where can I get public domain Motif source?
  318.  
  319. Answer: You cannot.  Motif source is not publically available.
  320.  
  321.  
  322. -------------------------------------------------------------------------------
  323. Subject: 10) Are the Motif examples publically available?
  324.  
  325. Answer: OSF has produced a list of which of the example programs can be
  326. distributed. Call OSF Direct for a copy of it.  Most of the example programs
  327. have been freed from distribution limitations so should be available.
  328.  
  329. In addition to these, many programs on export.lcs.mit.edu in the contrib
  330. directory use Motif.  Source code posted to comp.sources.x often uses Motif.
  331. The examples from Dan Heller's book are on export in
  332. /contrib/OReilly/motif/examples.tar.Z.  The examples from Doug Young's book are
  333. on export in /contrib/young.motif.Z The examples from Thomas Berlages's book are
  334. on export in /contrib/berlage.motif.Z The examples from Donald L. McMinds's book
  335. are on export in /contrib/mastering.motif.tar.Z
  336.  
  337.  
  338.  
  339. -------------------------------------------------------------------------------
  340. Subject: 11)  Has anyone done a public domain Motif lookalike?
  341.  
  342. Answer: Not yet.  The specification is available (AES), and the validation suite
  343. can be bought, but no-one has taken up the challenge.  There are some commercial
  344. lookalikes (Looking Glass and Neuron Data), but no workalikes.  Tcl is available
  345. for ftp from allspice.berkeley.edu, and although implemented without Xt, is
  346. reported to look like Motif.  Strom Sytems (18666 Redmond Way o-2118, Redmond,
  347. WA 98052-6725) have a Simple Toolkit for X-Windows (sic) that appears to follow
  348. the AES even though it doesn't quite look like Motif.  MOOLIT is a USL product
  349. that can be runtime switched between the Sun Open Look and Motif appearance.  It
  350. is based on  OLIT 4i.
  351.  
  352.  
  353. -------------------------------------------------------------------------------
  354. Subject: 12) Does anyone from OSF pay attention to our questions/suggestions?
  355.  
  356. Answer: Yes, and they quite often post answers too. But they may not respond to
  357. *your* problem because they have other things to do as well.  This newsgroup is
  358. not run by OSF, and has no formal connection with OSF.  OSF is a member-driven
  359. company.  The membership (and anyone can be a member) provides the primary input
  360. for future development of Motif.
  361.  
  362. -------------------------------------------------------------------------------
  363. Subject: 13) Does OSF have an application compliance validation service?
  364.  
  365. Answer: They have a checklist and a certification process which you can request
  366. from them.  Ask for the Level One Certification Checklist.  The process is one
  367. of self-certification.  It tests only the appearance and behavior of the
  368. application against Motif style.  The product will also be put in the OSF
  369. reference listing.  There's a one-time fee of $250.  According to the master
  370. license agreement, you can't use any OSF identifying mark unless you have done a
  371. certification.
  372.  
  373.  
  374. -------------------------------------------------------------------------------
  375. Subject: 14) What is the motif-talk mailing list?
  376.  
  377. Answer: The motif-talk mailing list is only for those who have purchased a Motif
  378. source code license. You can be placed on this list by emailing to motif-talk-
  379. request@osf.org, citing your Company name and source license number.
  380.  
  381.  
  382.  
  383. -------------------------------------------------------------------------------
  384. Subject: 15) What MIT patches do I use, and when do I use fix-osf?
  385.  
  386. Answer: The Motif 1.1.0 tape contains MIT patches 1-14. Apply these and any
  387. others you can get.  If your MIT patch level only goes up to fix-16, you also
  388. need to apply fix-osf.  Fix-osf was an emergency patch for a problem that
  389. existed when the Motif 1.1 tape was cut, The MIT fix-17 completely superseded
  390. osf-fix, so if you have applied fix-17 do not apply fix-osf.  The 1.1.1 tape
  391. contains MIT fixes 15-18, as well as an OSF-developed fix that deals with a
  392. subtle bug in the Selection mechanism of the Intrinsics.  Most people will have
  393. fix-15 to 18 by now; if you don't have them:
  394.  
  395.         Back out fix-osf if you have applied it
  396.         Apply fix-15 to 18
  397.         Apply fix-osf-1.1.1
  398.  
  399. The Selection fix was submitted to MIT, who came up with a different fix.  It
  400. will not be made into an R4 fix but should be in R5. The MIT fix was posted to
  401. motif-talk.
  402.  
  403.  
  404. -------------------------------------------------------------------------------
  405. Subject: 16) How does Motif work with X11R5?
  406.  
  407. Answer: Motif 1.1.X is only intended to be built with X11R4.  Motif 1.2.X is for
  408. X11R5.  however, Motif 1.1.4 has been set to also work with X11R5.
  409.  
  410. For Motif 1.1.1, 1.1.2 and 1.1.3 you will need to compile Xlib and Xt with a
  411. MOTIF_BC flag set to YES (page 8, section 3.3 of the R5 release notes), or
  412. you'll also have a link problem (LowerCase) and a fatal run time problem
  413. (XContext manager).  If your applications come up with "Unknown keysym name:
  414. osfActivate" errors, check the variable ProjectRoot. The name
  415. /$PROJECTROOT/lib/XKeysymDB will have been wired into your Xlib.
  416.  
  417. In Motif 1.1.0, XtCallCallback uses NULL as the first argument instead of a
  418. widget ID. This was ok under R4, but must be changed in the source for R5. It
  419. was changed by OSF from Motif 1.1.1 onward.
  420.  
  421. Mrm won't work at all (can't link since it uses an X private variable that has
  422. disappeared in R5).  Thre is an MIT patch that may fix this??  [I confess
  423. ignorance of Mrm and UIL].
  424.  
  425. -------------------------------------------------------------------------------
  426. Subject: 17)  How can I find which version of Motif I have?
  427.  
  428. Answer: The macro XmVERSION gives you the version number.  The macro XmREVISION
  429. gives you the major revision number.  The macro XmVersion combines these e.g. a
  430. value of 1002 is Motif 1.2.
  431.  
  432. To find the minor revision number is not easy.  From Motif 1.1.3 onwards, try
  433. this:
  434.  
  435.    'strings `which mwm` | grep OSF'.
  436.  
  437. to get the full version number e.g. 1.1.3.
  438.  
  439.  
  440. -------------------------------------------------------------------------------
  441. Subject: 18) TOPIC: LITERATURE
  442.  
  443. -------------------------------------------------------------------------------
  444. Subject: 19)* What books should I read or do I need to program using Motif?
  445.  
  446. Answer: Ken Lee of the DEC Western Software Laboratory (klee@wsl.dec.com)
  447. regularly posts to comp.windows.x and ba.windows.x a list of reference books and
  448. articles on X and X programming.  In FAQ comp.windows.x an extract of his list
  449. appears. Specifically for Motif programming, though:
  450.  
  451. OSF/Motif Programmers Guide, Prentice-Hall 13-640525-8 (Motif 1.0) ISBN 0-13-
  452. 640681-5 (Motif 1.1) (NB: This makes use of the demo programs that you get with
  453. a Motif source license.  The programs are not included and may or may not be
  454. available on your system.)
  455.  
  456. OSF/Motif Programmers Reference Manual, Prentice-Hall 13-640517-17 (Motif 1.0)
  457.  ISBN 0-13-640616-5 (Motif 1.1) You will need this for the system calls.
  458.  
  459. OSF/Motif Style Guide, Prentice-Hall 13-640491-X (Motif 1.0) ISBN 0-13-640673-4
  460. (Motif 1.1) You will need this to get some idea of how to write programs with
  461. the correct `look and feel'.
  462.  
  463. You should read at least one of the the non-OSF books on Motif:
  464.  
  465. Young, Doug. "The X Window System: Applications and Programming with Xt (Motif
  466. Version)," Prentice Hall, 1989 (ISBN 0-13-497074-8). The excellent tutorial "X
  467. Window Systems Programming and Applications with Xt," (ISBN 0-13-972167-3)
  468. updated for Motif. [The examples from the Motif version are available on export
  469. in ~ftp/contrib/young.motif.tar.Z]
  470.  
  471. Marshall Brain at brain@adm.csc.ncsu.edu posted a set of simple and useful Motif
  472. tutorials.
  473.  
  474. Berlage, Thomas Berlage, OSF/Motif: Concepts and Programming, Addison-Wesley,
  475. UK, 1991. ISBN 0-201-55792-4.
  476.  
  477. Johnson, Eric F. and Kevin Reichard, Power Programming Motif, MIS: Press,
  478. Portland, OR, 1991. ISBN 1-55828-059-6. Book with disk, ISBN 1-55828-061-8.
  479.  
  480. Heller, Dan, The Motif Programming Manual, Volume 6 of the O'Reilly series on X.
  481. This is the most complete volume on Motif programming available.
  482.  
  483. Barkakati, Nabajyoti, W Window System Programming, SAMS. ISBN 0-672-22750-9.
  484. This contains a section on Motif.
  485.  
  486. You will also need books and references on Xt such as:
  487.  
  488. Asente, Paul J., and Swick, Ralph R., "X Window System Toolkit, The Complete
  489. Programmer's Guide and Specification", Digital Press, 1990.  The bible on Xt. A
  490. treasury of information, excellent and invaluable.  Distributed by Digital
  491. Press, ISBN 1-55558-051-3, order number EY-E757E-DP; and by Prentice- Hall, ISBN
  492. 0-13-972191-6.
  493.  
  494. Nye, Adrian, and Tim O'Reilly, "X Toolkit Programming Manual, Volume 4,"
  495. O'Reilly and Associates, 1989. The folks at O'Reilly give their comprehensive
  496. treatment to programming with the MIT Intrinsics; R4 versions are now available,
  497. as is a Motif 1.1 version (Volume 4M).
  498.  
  499.  
  500. Flanagan, David, ed.,  "X Toolkit Reference Manual, Volume 5," O'Reilly and
  501. Associates, 1992a, Third Edition. A professional reference manual for the MIT
  502. X11R4 and X11R5 Xt.
  503.  
  504. Books and reference manuals on Xlib may also be useful.
  505.  
  506.  
  507.  
  508. -------------------------------------------------------------------------------
  509. Subject: 20) TOPIC: MWM
  510.  
  511. -------------------------------------------------------------------------------
  512. Subject: 21) What is the difference between Motif and mwm?
  513.  
  514. Answer: mwm is a window manager. Motif itself is made up of four parts: a User-
  515. Interface Guideline, an API toolkit of `C' routines which helps in the building
  516. of applications which conform to the Guideline, the window manager mwm, and a
  517. language UIL which is designed to ease user interface development.  In general
  518. mwm will run an application built with any X-windows API, and in general an
  519. application built using the Motif toolkit will run under any window manager.
  520.  
  521.  
  522. -------------------------------------------------------------------------------
  523. Subject: 22) Does anyone have an alternative set of 3-D defaults for a
  524. monochrome screen?
  525.  
  526. Answer: This is obviously a matter of taste. Some alternatives suggested include
  527.  
  528. !Benjamin Schreiber, bs@osf.osf.org, bs@cs.brandeis.edu
  529. Mwm*foreground:                 black           ! Actually, when a window is
  530. Mwm*background:                 white           ! deactivated, the background
  531. Mwm*backgroundPixmap:           50_foreground   ! becomes white, insted of
  532. Mwm*topShadowPixmap:            white           ! 50% foreground (grey)
  533.  
  534. Mwm*activeForeground:           black
  535. Mwm*activeBackground:           white
  536. Mwm*activeBackgroundPixmap:     50_foreground
  537. Mwm*activeTopShadowPixmap:      white
  538.  
  539. Mwm*menu*backgroundPixmap:      background
  540. Mwm*menu*topShadowPixmap:       50_foreground
  541.  
  542. Mwm*title*foreground:                   black
  543. Mwm*title*background:                   white
  544. Mwm*title*backgroundPixmap:             white
  545. Mwm*title*topShadowPixmap:              50_foreground
  546. Mwm*title*activeForeground:             white
  547. Mwm*title*activeBackground:             black
  548. Mwm*title*activeBackgroundPixmap:       black
  549. Mwm*title*activeBottomShadowPixmap:     50_foreground
  550.  
  551. Mwm*feedback*backgroundPixmap:          white
  552.  
  553. or
  554.  
  555. ! From: tsang@isi.com (Kam C. Tsang)
  556. Mwm*background:                      White
  557. Mwm*activeBackground:                White
  558. Mwm*activeBackgroundPixmap:          25_foreground
  559. Mwm*foreground:                      Black
  560. Mwm*activeForeground:                Black
  561. Mwm*menu*background:                 white
  562. Mwm*menu*foreground:                 black
  563. xterm*Foreground:                    black
  564. xterm*Background:                    white
  565.  
  566.  
  567. or
  568.  
  569. ! From: ucsd.edu!usc!snorkelwacker!paperboy!yee  (Michael K. Yee)
  570. Mwm*cleanText:                          True
  571.  
  572. Mwm*activeBackground:           white
  573. Mwm*activeForeground:           black
  574. Mwm*background:                 white
  575. Mwm*foreground:                 black
  576.  
  577. Mwm*client*activeBackgroundPixmap:      50_foreground
  578. Mwm*client*activeTopShadowPixmap:       foreground
  579. Mwm*client*activeBottomShadowPixmap:    background
  580.  
  581. !Mwm*client*background:                 white
  582. !Mwm*client*foreground:                 black
  583. Mwm*client*backgroundPixmap:            75_foreground
  584. Mwm*client*topShadowPixmap:             foreground
  585. Mwm*client*bottomShadowPixmap:          background
  586.  
  587. !Mwm*feedback*background:               white
  588. !Mwm*feedback*foreground:               black
  589. Mwm*feedback*backgroundPixmap:          50_foreground
  590. !Mwm*feedback*topShadowPixmap:          25_foreground
  591. !Mwm*feedback*bottomShadowPixmap:       background
  592.  
  593. !Mwm*menu*background:                   white
  594. !Mwm*menu*foreground:                   black
  595. Mwm*menu*backgroundPixmap:              foreground
  596. !Mwm*menu*topShadowPixmap:              foreground
  597. !Mwm*menu*bottomShadowPixmap:           background
  598.  
  599. !Mwm*icon*background:                   white
  600. !Mwm*icon*foreground:                   black
  601. Mwm*icon*activeBackgroundPixmap:        50_foreground
  602. Mwm*icon*activeBottomShadowPixmap:      foreground
  603. Mwm*icon*backgroundPixmap:              75_foreground
  604.  
  605.  
  606.  
  607. -------------------------------------------------------------------------------
  608. Subject: 23)  How can I modify the Motif window manager decorations?
  609.  
  610. Answer: In resource files, use the window manager's client resource (which is
  611. the application) and the resource clientDecoration:
  612.  
  613. Mwm*XClock.clientDecoration:   none
  614.  
  615. turns off all clock decorations.  See the mwm(1) entry for other possibilities.
  616.  
  617. Programmatically, set the VendorShell resource XmNmwmDecorations to appropriate
  618. values: MWM_DECOR_NONE (or a bitwise or of values).
  619.  
  620. -------------------------------------------------------------------------------
  621. Subject: 24)  How can I turn off the Motif window manager functions from the
  622. system menu?
  623.  
  624. Answer: The user of an application can control functions in the system menu for
  625. an application using the mwm resource clientFunctions:
  626.  
  627.         mwm.application_name.clientFunctions: -resize -close
  628.  
  629.  
  630. Answer: The writer of an application can only remove items.  Be warned that your
  631. users will probably gnash their teeth, swear furiously at your product and stop
  632. using it if they discover that you have done this.  (Especially if you have
  633. removed the Close button, your application has hung and it has taken up all of
  634. memory and swap so it can't be killed.) Much better is to catch the action
  635. gracefully as in the next question.
  636.  
  637.         XtVaGetValues(shell, XmNmwmFunctions, &int_val, NULL);
  638.         int_val &= ~MWM_FUNC_CLOSE;
  639.         XtVaSetValues(shell, XmNmwmFunctions, int_val, NULL);
  640.  
  641.  
  642.  
  643. -------------------------------------------------------------------------------
  644. Subject: 25)  How can tell I if the user has selected the "Close" item on the
  645. system menu attached to the top-level shell?  I need to do some clean up before
  646. exiting.
  647.  
  648. Answer:          This works with R4 Intrinsics
  649.  
  650.         void FinalCleanupCB(w, client_data, call_data)
  651.         Widget   w;
  652.         caddr_t  client_data, call_data;
  653.         {
  654.                 /* tidy up stuff here */
  655.                 ...
  656.                 /* exit if you want to */
  657.                 exit (0);
  658.         }
  659.  
  660.         main()
  661.         {
  662.                 Atom wm_delete_window;
  663.  
  664.                 ...
  665.                 XtRealizeWidget(toplevel);
  666.                 ...
  667.                 wm_delete_window =
  668.                         XmInternAtom(XtDisplay(toplevel),
  669.                                 "WM_DELETE_WINDOW", False);
  670.                 XmAddWMProtocolCallback(toplevel, wm_delete_window,
  671.                         FinalCleanupCB, NULL);
  672.                 XtMainLoop();
  673.         }
  674.  
  675. This will still kill the application.  To turn this behaviour off so that the
  676. application is not killed, set the shell resource XmNdeleteResponse to
  677. XmDO_NOTHING.  This means that users cannot kill your application via the system
  678. menu, and may be a bad thing.
  679.  
  680. If you are running R3, Bob Hays (bobhays@spss.com) has suggested this: "Trapping
  681. on the delete window atom does not work as I cannot force my action routine to
  682. the top of the action list for the activity desired, so the window manager kills
  683. my window anyway BEFORE I can do anything about it.  And, to make matters worse,
  684. the window manager (Motif in this case) tacks its atoms and handlers onto the
  685. window at some unknown point down the line after the creation of the shell
  686. widget as far as I can tell.  So....
  687.  
  688. I have a procedure as an action routine for ClientMessage.  Then, if I get a
  689. property change event on the window manager protocols, I then tack on
  690. WM_SAVE_YOURSELF.  If I get this request, I clean up (it seems to happen on
  691. WM_DELETE_WINDOW, BTW, if you remove WM_DELETE_WINDOW from the WM protocols
  692. atom) and exit.  Works great and is less filling overall:-)."
  693.  
  694.  
  695. -------------------------------------------------------------------------------
  696. Subject: 26)+ Is there an mwm virtual desktop manager?
  697.  
  698. Answer: Peter E. Wagner (pew@cs.brown.edu): Imagine that your "desktop" extends
  699. beyond the view provided by your monitor.  A virtual window manager gives you
  700. access to the space beyond your viewport (i.e. your screen) by allowing you to
  701. move the viewport to other areas of the extended desktop.
  702.  
  703. The first one is Solbourne's swm, which spawned vtwm/tvtwm/olvwm.
  704.  
  705. David B. Lewis created one.  suresh@unipalm.co.uk has further developed it into
  706. the UniPalm product DOORS, which is only available as a source code extension to
  707. the MOTIF window manager.  The price of the source and unlimited right to
  708. distribute binaries is 10,000 pounds Sterling.  Alternately, source and right to
  709. use within one company is 2,000 pounds Sterling.  Contact Peter Dawe
  710.  
  711. Unipalm Limited                         Voice: +44 (0) 223 420002
  712. 216 The Science Park                    Fax:   +44 (0) 223 426868
  713. CAMBRIDGE
  714. CB4 4WA
  715.  
  716.  
  717.  
  718. An enhancement request for such an object has been filed with OSF.
  719.  
  720. -------------------------------------------------------------------------------
  721. END OF PART ONE
  722.