packages icon
/*
 *  NXHelp - README
 *
 *      Version 2.0
 *      by Lance Lovette
 *      Code and Display Copyright (C) 1993 by Lance Lovette
 *      All Rights Reserved
 *
 *      Lance Lovette (lovette@iftech.com)
 *      North Carolina State University
 *      Engineering Computer Operations
 *      Department of Computer Science
 *      Raleigh, NC 27607
 *
 *  $RCSfile: README,v $
 *  $Revision: 1.4 $
 *  $Date: 1993/12/08 19:49:00 $
 */

Overview:

	NXHelp is a general help facility that can be added to any Motif program.
	Once NXHelp has been added to a program, the program can activate the
	facility at any time. Once activated the user will see a window
	displaying a list of available help topics. When the user selects a
	topic, the appropriate text is then displayed.

	To use NXHelp within a program, you will first create a text file
	containing the help information that you wish to display to the user
	(see below for a format description for this file). You will call an
	NXhelp initialization function, probably in main. You will then add a
	help button into your program (probably using the menu help facility).
	The callback for that button will call the NXhelp callback routine, and
	NXhelp will do everything else.

Description of the NXHelp File:

	The first line of a help file must contain the following:

		[-NXHelpFile <program name> <helpfile version>-]

	where the program name and helpfile version are substitued in by you.
	The program name is used as the help window title and as the icon title.
	Before you use the XnHelpCB you must call XnInitializeHelp with the
	required parameters.  Which include the help filename (and path) a widget
	(the toplevel shell of your program), an application context from
	XtAppInitialize, and a Boolean variable.  The variable is used to let the
	help callback know if you want it to change the icon to a watch (on your
	toplevel) while it is creating its window.  To use XnHelpCB just declare
	it as an XmNhelpCallback or whatever and send it a string containing the
	keyword as client data. For example,

		XtAddCallback(widget, XmNhelpCallback, XnHelpCB, "Index");
		XtAddCallback(widget, XmNhelpCallback, XnHelpCB, "Overview");

	A keyword is denoted by brackets '<' and '>'.  Sending XnHelpCB the
	keyword 'Index' creates an index of the help file and displays it.  An
	index contains all the keywords in a selection box.  The user selects a
	keyword and the text after the keyword until the next keyword or END is
	loaded.  There are some special keywords the callback recognizes:

		- If the keyword is a '!' a space is inserted into the index.

		- If the first character of a keyword is '.' then that
			keyword is not used as an index selection.

		- If the keyword is followed by an '=' the keyword following
			the '=' is used as the search keyword, and the text is
			searched again.

		- If the last character in the keyword is a '-' then this
			keyword is not selectable in the index list.

		- END as a keyword signals the end of the help text.

	Some examples would be:

	<Overview> 			 Keyword 
	<File Menu->			 Not selectable
	<!>				 Blank selection
	<.  Startup Dialog>		 Invisible selection
	<Labels>=Making Labels		 Deferred selection
	<END>

	If a keyword is sent to XnHelpCB as client data then the text
	for that keyword is loaded automatically.  The special index
	character '.' is not part of the keyword, just a prefix.

About the Author:

	Lance Lovette received his BS in Computer Science from North Carolina
	State University in December, 1993.  He has developed several highly
	successful Motif applications for the Eos computing environment at NCSU,
	several of which are used by thousands of users daily.  He is also the
	author of "Appendix D: PostScript Printing" in "Motif Programming: The
	Essentials ... and More" by Marshall Brain, published by Digital Press.

About NXHelp:

	NXHelp Help Facility Library
	Version 2.0

	Created, Developed, and Programmed by Lance Lovette

	Engineering Computer Operations
	North Carolina State University
	Department of Computer Science

	Copyright (C) 1993 by Lance Lovette
	All Rights Reserved.

	Comments, suggestions, and bug reports can be sent to lovette@iftech.com