1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Listing Documents in the Help Menu</title><meta name="generator" content="DocBook XSL Stylesheets V1.40"><link rel="home" href="index.html" title="The GNOME Handbook of Writing Software Documentation"><link rel="up" href="index.html" title="The GNOME Handbook of Writing Software Documentation"><link rel="previous" href="indexs06.html" title="Writing Application and Applet Manuals"><link rel="next" href="indexs08.html" title="Application Help Buttons"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Listing Documents in the Help Menu</th></tr><tr><td width="20%" align="left"><a href="indexs06.html">Prev</a>�</td><th width="60%" align="center">�</th><td width="20%" align="right">�<a href="indexs08.html">Next</a></td></tr></table><hr></div><div class="sect1"><a name="listingdocsinhelpmenu"></a><div class="titlepage"><div><h2 class="title" style="clear: both"><a name="listingdocsinhelpmenu"></a>Listing Documents in the Help Menu</h2></div></div><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title"><a name="id2939869"></a>Developer Information</h3><p>
2        This section is for developers.  Documentation authors
3        generally do not need to know this material.
4      </p></div><p>
5      Typically the application manual and possibly additional help
6      documents will be made available to the user under the
7      Help menu at the top right of the
8      application. To do this, you must first write a
9      <tt>topic.dat</tt> file. The format for this file is:
10      <pre class="programlisting">
11One line for each 'topic'.
12
13Two columns, as defined by perl -e 'split(/\s+/,$aline,2)'
14
15First column is the HTML file (and optional section) for the topic,
16relative to the app's help file dir.
17
18Second column is the user-visible topic name.
19      </pre>
20      For example, Gnumeric's
21      <tt>topic.dat</tt> file is:
22      <pre class="programlisting">
23gnumeric.html   Gnumeric manual
24function-reference.html Gnumeric function reference
25      </pre>
26      When the application is installed, the
27      <tt>topic.dat</tt> file should be placed in the
28      <tt>$prefix/share/gnome/help/<i><tt>appname</tt></i>/C/</tt> directory
29      where <i><tt>appname</tt></i> is replaced by the
30      application's name.  The application documentation (converted
31      from SGML into HTML with <b>db2html</b>) should be
32      placed in this directory too.
33    </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title"><a name="id2940058"></a>Note</h3><p>
34       If the help files are not present in the correct directory, the
35       menu items will NOT appear when the program is run. 
36      </p></div><p>
37      The <tt>topic.dat</tt> file is used by the GNOME
38      menu building code to generate the Help
39      menu. When you define your menu:  
40<pre class="programlisting">
41GnomeUIInfo helpmenu[] = {
42              {GNOME_APP_UI_ITEM, 
43               N_("About"), N_("Info about this program"),
44               about_cb, NULL, NULL, 
45               GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_ABOUT,
46               0, 0, NULL},
47               GNOMEUIINFO_SEPARATOR,
48               GNOMEUIINFO_HELP("<i>appname</i>"),
49               GNOMEUIINFO_END
50        };
51</pre>
52      the line specifying <tt>GNOMEUIINFO_HELP</tt> causes
53      GNOME to create a menu entry which is tied to the documentation
54      in the directory mentioned above. Also, all the topics in the
55      <tt>topic.dat</tt> file will get menu entries in the
56      Help menu. When the user selects any of these
57      topics from the Help menu, a help browser
58      will be started with the associated HTML documentation.
59    </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a href="indexs06.html">Prev</a>�</td><td width="20%" align="center"><a href="index.html">Home</a></td><td width="40%" align="right">�<a href="indexs08.html">Next</a></td></tr><tr><td width="40%" align="left">Writing Application and Applet Manuals�</td><td width="20%" align="center"><a href="index.html">Up</a></td><td width="40%" align="right">�Application Help Buttons</td></tr></table></div></body></html>
60