Common Desktop Environment: Help System Author's and Programmer's Guide

To Display a Help Topic

  1. Create a help dialog.

  2. Set the following resources for the help dialog:

    DtNhelpType

    Set to DtHELP_TYPE_TOPIC.

    DtNhelpVolume

    Set to the volume name for your application.

    DtNlocationId

    Set to the topic ID that you want to display.

    You can also set other values for the dialog, such as its size and title.

  3. Manage the dialog using XtManageChild().

Example

This program segment displays a topic with the ID getting-started in the volume MyVolume.

ac = 0;
XtSetArg (al[ac], DtNhelpType,   DtHELP_TYPE_TOPIC);  ac++;
 XtSetArg (al[ac], DtNhelpVolume,  "MyVolume");         ac++;
 XtSetArg (al[ac], DtNlocationId,  "getting-started");  ac++;
 XtSetArg (al[ac], DtNcolumns,    40);                  ac++;
 XtSetArg (al[ac], DtNrows,       12);                  ac++;
 XtSetValues (helpDialog, al, ac);
 XtManageChild (helpDialog);

If the help volume MyVolume is not registered, then a complete path to the MyVolume.sdl file is required for the value of DtNhelpVolume.