Initial revision
[ssr] / StraySrc / Libraries / Steel / h / help
1 /*
2 * Help
3 * Provides support for the !Help application
4 *
5 * v. 1.00 (25 July 1991)
6 *
7 * © 1991-1998 Straylight
8 */
9
10 /*----- Licensing note ----------------------------------------------------*
11 *
12 * This file is part of Straylight's Steel library.
13 *
14 * Steel is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 2, or (at your option)
17 * any later version.
18 *
19 * Steel is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
23 *
24 * You should have received a copy of the GNU General Public License
25 * along with Steel. If not, write to the Free Software Foundation,
26 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27 */
28
29 #ifndef __help_h
30 #define __help_h
31
32 /*
33 * void help_startHelp(void)
34 *
35 * Use
36 * This call sets up a new message to bundle off to !Help.
37 */
38
39 void help_startHelp(void);
40
41 /*
42 * void help_addLine(char *line,...)
43 *
44 * Use
45 * This call adds a line of text to the current help message. If the
46 * message starts off blank, then the line will become the current message,
47 * otherwise the message will have a '|m' followed by the new line appended
48 * on the end.
49 *
50 * Parameters
51 * char *line == a printf()-style format string for what you want to say.
52 */
53
54 void help_addLine(char *line,...);
55
56 /*
57 * void help_endHelp(void)
58 *
59 * Use
60 * This call bundles off the current help message to the application.
61 */
62
63 void help_endHelp(void);
64
65 /*
66 * void help_readFromIcon(void)
67 *
68 * Use
69 * This call will read a help message from the icon the help system is
70 * interested in, and tack it on the end of the message. The help message
71 * should be stored in the icon's validation string with the command 'H'
72 * (e.g. validation string == "A0-9;B3;HType a number in this icon."
73 */
74
75 void help_readFromIcon(void);
76
77 /*
78 * BOOL help_wasHelp(void)
79 *
80 * Use
81 * Informs caller if the last event was a help request.
82 *
83 * Returns
84 * TRUE if it was.
85 */
86
87 BOOL help_wasHelp(void);
88
89 /*
90 * void help_readFromMenu(char *prefix,int hit[])
91 *
92 * Use
93 * Converts the menu hit structure into a message tag and then reads the
94 * message and adds it to the help message being constructed.
95 * The message tag is constructed from the prefix, followed by a character
96 * for each entry in the hit structure. The characters are in order (first
97 * to last) 0-9,A-Z,a-z, giving 62 entries. This WILL be enough for any
98 * *reasonable* menu...
99 *
100 * Parameters
101 * char *prefix ==
102 * int hit[] == a menu hit structure as passed to a menu handler.
103 */
104
105 void help_readFromMenu(char *prefix,int hit[]);
106
107 #endif