[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3. Integrated Help

3.1 The Help Menu  
3.2 Adding New Help Files  

By default when you start GPS, the working area contains a help window displaying HTML help files. On-line help for the GNAT tools is available from the Help menu item.

Since HTML pages can contain lots of complex information, resizing the help window can take some time, making the user interface less responsive. It is therefore recommended to close the Help window when not using it. You can reopen this window at any time using the Help menu item.

For the best use of the integrated help, it is recommended to load small HTML pages each time instead of long pages which will be slow to load and display.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1 The Help Menu

The Help menu item provides the following entries:

Contents
This opens a special HTML file that contains links for all the documentation files currently registered in GPS, See section 3.2 Adding New Help Files.

Zoom in
Increase the size of the font used to display the help file.

Zoom out
Decrease the size of the font used to display the help file.

Open HTML file...
Open a file selection dialog to load an HTML file.

About
Display a dialog giving information about the versions of GPS and GNAT used:

about

This menu contains a number of additional entries, depending on what documentation packages were installed on your system. See the next section to see how to add new help files.

The help window also provides a contextual menu that gives the possibility to copy the current selection to the clipboard.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.2 Adding New Help Files

GPS will search for the help files in the list of directories set in the environment variable GPS_DOC_PATH (a colon-separated list of directories on Unix systems, or semicolon-separated list of directories on Windows systems). If this variable is not set, the default directory <prefix>/doc/gps/html is searched. If the file cannot be found in any of these directories, the corresponding menu item will be disabled.

The environment variable GPS_DOC_PATH can either be set by each user in his own environment, or can be set system-wide by modifying the small wrapper script `gps' itself on Unix systems.

It can also be set programmatically through the GPS shell or any of the scripting languages. This is done with

 
add_doc_path "/home/foo"

The specific list of files shown in the menus is set by reading the index files in each of the directories in GPS_DOC_PATH. These index files must be called `gps_index.xml', and their format can be see in the following example:

 
<?xml version="1.0"?>
<index>
   <file>
      <name>file.html</name>
      <descr>Tooltip text</descr>
      <category>name</category>
      <menu>/Help/item</menu>
   </file>
</index>

There should be one <file> tag per help file. This tag contains four children tags:

name
This is the name of the file. It can be either an absolute file name, or a file name relative to one of the directories in GPS_DOC_PATH.

This name can contain a reference to a specific anchor in the html file, using the standard HTML syntax.

 
  <name>file#anchor</name>

descr
This is the description for this help file. It appears in a tool tip for the menu item.

category
This is used in the Help->Contents menu to organize all the documentation files.

menu
This is the full path to the menu. It behaves like a UNIX path, except it reference the various menus, starting from the menu bar itself. The first character of this path must be "/". The last part of the path is the name of the new menu item. If not set, no menu is displayed for this file, although it will still appear in the Help->Contents menu


[ << ] [ >> ]           [Top] [Contents] [Index] [ ? ]

This document was generated by Mail Server on November, 9 2003 using texi2html