home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Interactive Guide
/
c-cplusplus-interactive-guide.iso
/
c_ref
/
csource1
/
program2
/
ahp140.ins
/
AHELP.DOC
next >
Wrap
Text File
|
1993-09-08
|
19KB
|
428 lines
AHELP.LIB - ADVANCED HELP SYSTEM FOR CLIPPER (SUMMER '87) APPLICATIONS
Version 1.4 Copyright (C) 1990-1993, Capella Inc.
For a printed copy of this user guide, copy this file to your printer.
Introduction
------------
Welcome to AHELP! This help system, for use with your Clipper applications
(Summer '87), provides both context-sensitive and generalized help windows.
Features of AHELP version 1 (be sure to see version 3, p.7):
* You control whether help windows have no border, a single-line border, or
a double-line border.
* You control whether the cross-bars drawn inside the help windows have no
line, a single line, or a double line.
* AHELP automatically determines the appropriate intersections.
* You control what colors AHELP will use for the help window border, title,
content, and highlight bar in the help index window.
* You control whether or not the end user has the ability to create or
modify help windows.
* You control whether or not the help windows have drop shadows.
* AHELP automatically positions the help window immediately below the screen
position of the input variable (e.g., a GET variable) if the window will fit
there; otherwise, the window appears immediately above the input variable.
* AHELP provides a help index; whenever any help window is on the screen,
the user may press F1 to see the help index. The help index is another
window with a scrolling alphabetic listing of help subjects. The user
uses the cursor control keys to highlight the subject of interest, and
presses Enter to see the corresponding help window. The user may also
type the first letter of the subject to move the highlight bar immediately
to the first occurrence of that letter.
* AHELP is sensitive to the Clipper environment. If the cursor is off when
help is invoked, it will be off when control returns to your application.
Conversely, if the cursor is on when help is invoked, it will be on when
control returns to your application. The same principle applies to colors,
function keys, insert status, work area, and the status of SET CONSOLE,
DELETED, ESCAPE, and SCOREBOARD.
* AHELP does not use any "wait state" commands (READ, WAIT, ACCEPT, INPUT,
MENU TO), to avoid conflicts with any pending GETs. It uses the INKEY()
function for all keyboard input, with two exceptions: it calls DBEDIT() for
the help index window and MEMOEDIT() for displaying/editing help text.
What do you have to do in order to use AHELP? Three things:
1. Insert a call to AHELP in your application with the setup parameters you
want to use as described in the next section.
2. Insert the command SET KEY XX TO AHELP in your application.
3. Compile your application and link, specifying AHELP.LIB as one of the
LIB files (AHELP requires both CLIPPER.LIB and EXTEND.LIB).
That's all. The rest is transparent to your application.
Setup
-----
The application must call AHELP with four parameters before starting the user
interface, in order to initialize the help system. During initialization,
AHELP declares four PUBLIC memory variables:
HELPFILE - the name of the application's help file
HELPOPTN - a character string of application options
HELPCODE - a character string for use by the application when no input
variable is waiting -- AHELP uses the content of `HELPCODE' as
its third parameter if the Clipper-passed third parameter is
empty
and
HELPACTIVE - a logical variable set to true when AHELP is executing, and
false otherwise.
Also during initialization, AHELP checks for the existence of the help file
(and creates it if it is missing), and for the existence of the two index
files needed (and creates them if they are missing).
Setup Syntax:
DO AHELP WITH <expC1>, <expN>, <expC2>, <expA>
where
<expC1> is the name of the application's Help File (one to eight characters)
<expN> is any value (ignored by AHELP)
<expC2> is a string of switch values: /Bn/Cn/Dn/En
/Bn defines the help window Border: n=0 means no lines
n=1 means single line
n=2 means double line
/Cn defines the window crossbar: n=0 means no lines
n=1 means single line
n=2 means double line
/Dn defines drop shadows: n=0 means shadows are off
n=1 means shadows are on
/En defines Edit capability: n=0 means edit is off
n=1 means edit is on
These switches may appear in any order. No other switches are defined
in version 1.x. If any switch is missing, default values are:
B = 2 (double line border)
C = 1 (single line crossbar)
D = 0 (drop shadows off)
E = 1 (edit on)
<expA> is the name of a four-element character array containing screen
color values:
element 1 = foreground/background colors, help window content
element 2 = foreground/background colors, help index highlight bar
element 3 = foreground/background colors, help window title and
bottom-row message
element 4 = foreground/background colors, help window border
This array is not needed after AHELP returns.
Example 1:
DECLARE HCOLOR[4]
HCOLOR[1] = "N/W" && content
HCOLOR[2] = "W+/B" && highlight
HCOLOR[3] = "B/W" && title
HCOLOR[4] = "W+/W" && border
DO AHELP WITH "MYAPHELP",0,"/B2/C1/D1/E0",HCOLOR
| | | | | |
filename | | | | color
double | | | array
border | | | name
| | |
single | |
crossbar | |
| |
drop |
shadows |
on |
|
edit
off
Example 2:
<declare color array and values as above>
DO AHELP WITH "MYAPHELP",0,"",HCOLOR && use default switch options
After making this setup call, activate the "hotkey" that will invoke AHELP
with the SET KEY command. Examples:
SET KEY 28 TO AHELP && F1 is the help key
SET KEY 291 TO AHELP && Alt-H is the help key
SET KEY -9 TO AHELP && F10 is the help key
Execution
---------
When the user presses the help key while your application is in any wait
state, Clipper automatically calls AHELP with three parameters: the name of
the procedure in control when the key was pressed, the line number that was
executing, and the name of the wait state input variable. AHELP uses the
first and third parameters only (not all applications are compiled with line
numbers) to construct a "seek key". It opens the help file and performs a
seek for that key.
If the key is found, AHELP opens a help window and displays the help text; the
window is opened as close as possible to the input variable screen position.
If the key is not found, AHELP opens a smaller help window in the center of
the screen and notifies the user that no help is available.
Either window will show available options at the bottom of the window: Escape
to cancel help, F1 to call up the help index, and F4 to edit or create the
help display (if editing is enabled).
Cancel: If the user presses Escape, AHELP closes the help window and returns
to y