@databse HelpSysDoc
@node Introduction
FASTREAD.GC DOCUMENTATION
INTRODUCTION
FastRead.gc is a gui which provides an easy method to access
documentation either completely, in reader mode, or by fetching
selected patches of text for online help from within a Gui4Cli user's
own program.
This gives the Gui4Cli user an easier and quicker way than
AmigaGuide to write documentation about his program, and the same
document can also be used for quick help from within the user's own
program, although FastRead.gc can also do these things with AmigaGuide
documents as well as its own, just as easily.
FastRead.gc works in two modes. Firstly it is able to be used as a
document reader, and secondly as quick help from within a program,
fetching and displaying instructions on individual gadgets. It can do
this because it has a separate reader gui, ViewText.g, which displays
the text. FastRead.gc handles the preprocessing of documents and
displays the index, so is not needed when only online help is
required. ViewText.g handles this part.
@endnode
@node Requirements
REQUIREMENTS
The Gui4Cli help system needs no special support libraries or
files, and only needs Gui4Cli installed on the system. The work is
done by two binary files, GetNodes and WriteNode, which are a part of
the Gui4Cli distribution.
@endnode
@node "Where Things Are"
THE FASTREAD DIRECTORY TREE
Until you are familiar enough with FastRead.gc and its associated
programs to be able to take it and use it for your own purposes, you
may find it helpful to know where things are in relation to your
overall directory structure. You need Gui4Cli to be installed in your
system, and it will use the directory GUIS: as its home base. Within
that environment, FastRead.gc and its friends are located thus :
GUIS: ;Home base for Gui4Cli
|
|___Docs ;Gui4Cli directory for documents. eg,
| ;HelpSystem.txt (the file you are
| ;reading now), plus any further docs,
| ;guides, etc. which you collect or
| ;create.
|
|___C ;Gui4Cli directory for binaries. GetNodes
| ;and WriteNode are stored in here.
|
|___Tools ;Gui4Cli directory for global tools, such
| ;as FastRead.
|
|___FastRead ;FastRead.gc, ViewText.g, HelpDemo.gc
| ;and related icons.
|
|___Idx ;Directory to hold index files as
;created by FastRead.gc.
@endnode
@node "The GCHELP: Assign"
THE GCHELP: ASSIGN
For general convenience, the directory name GCHELP: is temporarily
assigned to whatever directory holds FastRead.gc or any of its
associated programs. The assignment is created by the FastRead.gc
suite of programs when any of them start up, and is removed again when
the programs end. The assign will have no effect on anything else you
@endnode
@node "Writing Your Docs"
WRITING A DOCUMENT
As with AmigaGuide, the doc file is written in any text editor.
The difference is that unlike AmigaGuide, the Gui4Cli help system does
not require the insertion of complex formatting codes. Only three
codes are used - '@node' and '@endnode', to mark the start and end of
various topics that the user wants to access, and a '@database'
header. These are the same markers as AmigaGuide uses. FastRead.gc
will strip out all other AmigaGuide formatting codes when reading
AmigaGuide. Text colours and styles are not supported, since the
handling of AmigaGuides by FastRead.gc is there merely to enable the
user to write his docs in either format and still have access to
online help.
A document which is intended for access by FastRead.gc needs some
preparatory editing. The file you are now reading has examples of such
editing included. Each section of text which you want to appear in the
index must begin with '@node' and end with '@endnode'. It's as simple
as that. A short title must be placed after '@node'. This is the
subject title which will appear in the FastRead lister. If the title
contains spaces, enclose it in double quotes. The same applies to the
database title.
For the purposes of this text, let the | character represent the
extreme left of your editing window. Then the layout of your document
might look like this :
|@database
|@node Introduction
|
|(Introductory text)
|
|@endnode
|
|@node "Contacting the author"
|
|(Text about the author)
|
|@endnode
The first line in a document must be a '@database' statement, and the
last line an endnode statement.
@endnode
@node "The Index File"
THE INDEX FILE
When your document has been written, and FastRead.gc reads this or
an AmigaGuide file for the first time, an index file will be created
automatically, and stored in the 'GUIS:Tools/FastRead/Lst' drawer.
The name of the index file will always be the same as the document
it belongs to, with a '.idx' filename extension added. For example, if
your document was called 'MyDoc.guide', the index file would be
created with the name 'MyDoc.guide.idx'.
The index file is used in the FastRead.gc lister, and it's
contents will look something like this...
Introduction 38 1047
Requirements 1114 245
The numbers are the start and length offsets of the subject text
in bytes, so that FastRead.gc will know where to go to retrieve the
text. These numbers are hidden in the lister, and are used also for
online help within the users program.
@endnode
@node " Index Format"
FORMATTING THE INDEX
If your text naturally divides itself into major topics and
subtopics, then subtopics can be indicated by preceding the node
title with, say, three spaces, placed INSIDE the double quotes which
enclose the node title, thus :
|@node " Requirements"
The exact number of spaces doesn't matter, but you must be consistent.
You can indicate sub-subtopics in a similar way. The number of
spaces must be more than the number used for the preceding level, and
should be consistent...
|@node Introduction
|(text .. any number of lines)
|@endnode
|@node Applications
|(text)
|@endnode
|@node " Application 1"
|(text)
|@endnode
|@node " Refinements A"
|(text)
|@endnode
|@node " Refinements B"
|(text)
|@endnode
|@node " Application 2"
|(text)
|@endnode
|@node Limitations
|(text)
|@endnode
Note that the subject titles that do not need formatting, and only
consist of one word, have no quotes enclosing them. It would do no
harm to put these node titles in quotes, but would be pointless. The
quotes MUST be there for the other titles in the above example.
@endnode
@node "The Programs"
THE PROGRAMS
FastRead.gc is the document reader itself, and can work in two
modes. Stand alone, which will read a whole doc file, and Online,
which fetches selected patches of text, or topics from the doc file.
In Stand Alone mode, FastRead.gc does not need the user's program to
be running, and becomes a text file reader. In Online mode, the
commands to fetch text are sent from the user's program instead of
FastRead.gc.
ViewText.g is the part of FastRead that actually displays the
text, and runs without FastRead.gc for online help, being controlled
from the user's program.
HelpDemo.gc is a 'mock up' of the user's program, intended to
demonstrate how FastRead.gc is used from within a Gui4Cli script to
obtain online help.
@endnode
@node " The Binaries"
THE BINARIES
GetNode: Usage: GetNodes