[comp.windows.x] Help widget for MOTIF

stockett@quartz.jpl.nasa.gov (Mike Stockett) (04/13/90)

Could anyone out there tell me if there is a Public Domain Help
widget available for MOTIF? Some of the people here would like to find
one that is context sensitive and provides hierarchical access to
help. Seems that they heard that there is no help widget available
with MOTIF, and are not really excited about having to "roll their
own".

Please respond by e-mail, thanks.

/\/\ike Stockett
Jet Propulsion Laboratory	| TEL:		+1 818 397 7210
4800 Oak Grove Drive		| FAX:		+1 818 397 7275
Pasadena, CA 91109		| Internet:	stockett@quartz.jpl.nasa.gov
MS 510-264

laymon@nepal.crd.ge.com (Marc A. Laymon) (04/13/90)

In article <3378@jato.Jpl.Nasa.Gov> stockett@quartz.jpl.nasa.gov (Mike Stockett) writes:
>Could anyone out there tell me if there is a Public Domain Help
>widget available for MOTIF? 

I sent E-mail in response to this query, but in case any one else is
interested:

I don't know if there is a public domain help box, but it
isn't hard to write your own using a PushButton widget and a
Message Dialog Box widget.  There is an example on P. 119 of
Doug Young's book (The X window system- OSF/Motif edition)
which shows how to do this.  Basically, you create a help
string consisting of multiple levels of help messages
separated by blank lines.  You create a help push button in
your top level, add a callback to the help push button and
pass it the help string.  The callback routine parses the
multi-level help.  It pops up a message dialog box which
contains the first level of help, plus a done button and
another help button by default.  The callback
routine recursively calls itself when the help button on the
message dialog is pressed.  This continues until there are
no more levels of help to display.  The whole example is
less than 2 pages of code.



 Marc Laymon	         E-MAIL: laymon@nepal.crd.ge.com
 GE R&D
 Schenectady, NY