Files correlati : cg0.exe cg0700a.msk cg0700b.msk cg3.exe cg4.exe Bug : Commento: Merge 1.0 libraries
60 lines
4.3 KiB
Plaintext
60 lines
4.3 KiB
Plaintext
<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>
|
||
This section is for developers. Documentation authors
|
||
generally do not need to know this material.
|
||
</p></div><p>
|
||
Typically the application manual and possibly additional help
|
||
documents will be made available to the user under the
|
||
Help menu at the top right of the
|
||
application. To do this, you must first write a
|
||
<tt>topic.dat</tt> file. The format for this file is:
|
||
<pre class="programlisting">
|
||
One line for each 'topic'.
|
||
|
||
Two columns, as defined by perl -e 'split(/\s+/,$aline,2)'
|
||
|
||
First column is the HTML file (and optional section) for the topic,
|
||
relative to the app's help file dir.
|
||
|
||
Second column is the user-visible topic name.
|
||
</pre>
|
||
For example, Gnumeric's
|
||
<tt>topic.dat</tt> file is:
|
||
<pre class="programlisting">
|
||
gnumeric.html Gnumeric manual
|
||
function-reference.html Gnumeric function reference
|
||
</pre>
|
||
When the application is installed, the
|
||
<tt>topic.dat</tt> file should be placed in the
|
||
<tt>$prefix/share/gnome/help/<i><tt>appname</tt></i>/C/</tt> directory
|
||
where <i><tt>appname</tt></i> is replaced by the
|
||
application's name. The application documentation (converted
|
||
from SGML into HTML with <b>db2html</b>) should be
|
||
placed in this directory too.
|
||
</p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title"><a name="id2940058"></a>Note</h3><p>
|
||
If the help files are not present in the correct directory, the
|
||
menu items will NOT appear when the program is run.
|
||
</p></div><p>
|
||
The <tt>topic.dat</tt> file is used by the GNOME
|
||
menu building code to generate the Help
|
||
menu. When you define your menu:
|
||
<pre class="programlisting">
|
||
GnomeUIInfo helpmenu[] = {
|
||
{GNOME_APP_UI_ITEM,
|
||
N_("About"), N_("Info about this program"),
|
||
about_cb, NULL, NULL,
|
||
GNOME_APP_PIXMAP_STOCK, GNOME_STOCK_MENU_ABOUT,
|
||
0, 0, NULL},
|
||
GNOMEUIINFO_SEPARATOR,
|
||
GNOMEUIINFO_HELP("<i>appname</i>"),
|
||
GNOMEUIINFO_END
|
||
};
|
||
</pre>
|
||
the line specifying <tt>GNOMEUIINFO_HELP</tt> causes
|
||
GNOME to create a menu entry which is tied to the documentation
|
||
in the directory mentioned above. Also, all the topics in the
|
||
<tt>topic.dat</tt> file will get menu entries in the
|
||
Help menu. When the user selects any of these
|
||
topics from the Help menu, a help browser
|
||
will be started with the associated HTML documentation.
|
||
</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>
|