Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP Help System Developer's Guide > Chapter 5 Creating and Managing Help Dialogs

The General Help Dialog

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Glossary

 » Index

The menu bar contains several commands, including commands that display these additional dialogs:

  • Choose Print from the File menu to display the Print dialog. This dialog lets the user choose which topics are to be printed: "All," "Current," and "Current and Down." (Current and Down prints the current topic and all of its subtopics.)

  • Choose Keyword from the Search menu to display the Keyword Index dialog. This dialog lists all the words and phrases that the author has marked as index entries. Selecting a keyword, then one of the topics where the keyword occurs, displays that topic in the general help dialog.

  • Choose History from the Search menu to display the History dialog. This dialog lists the topic titles for each topic the user has visited. To return to any topic in the list, select its title.

  • Choose Using Help from the Help menu to display the Help On Help dialog. This help information describes how to use the help system itself.

To create a general help dialog

  1. Include the appropriate header files:

       #include Xvh.h
    
       #include HelpDialog.h
    
  2. Create an instance of the general help dialog widget:

    • Use the XvhCreateHelpDialog() convenience function.

    • Or, use the XtCreateManagedWidget() function.

  3. Add a callback for handling hyperlink events that occur within the dialog. (This is described in more detail in “Responding to Hyperlink Events”.)

  4. Add a close callback for handling the Close command.

Example. The following code segment creates a general help dialog (as a child of parent) using the convenience function. The dialog is left unmanaged -- presumably it is managed elsewhere in the application when a help request is made.

   Widget   mainHelpDialog, moreButton, helpButton;



   ac = 0;

   XtSetArg (al[ac], XmNtitle, "My Application - Help");  ac++;

   mainHelpDialog = XvhCreateHelpDialog (parent, "mainHelpDialog", al, ac);

The following two calls add the hyperlink and close callbacks to the dialog. Presumably, the functions HyperlinkCB() and CloseHelpCB() are declared elsewhere in the application.

   XtAddCallback (mainHelpDialog, XmNhyperLinkCallback, HyperlinkCB, (XtPointer)NULL);

   XtAddCallback (mainHelpDialog, XmNcloseCallback, CloseHelpCB, (XtPointer)NULL);

See Also. 

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1988 Hewlett-Packard Development Company, L.P.