117283Sopcode /*
2*17646Sopcode * @(#)help.c 1.2 01/03/85
317283Sopcode *
417283Sopcode * Routines to provide help screens for the SUN Gremlin picture editor.
517283Sopcode *
617283Sopcode * Mark Opperman (opcode@monet.BERKELEY)
717283Sopcode *
817283Sopcode */
917283Sopcode
1017283Sopcode #include <suntool/tool_hs.h>
1117283Sopcode #include "gremlin.h"
1217283Sopcode #include "icondata.h"
1317283Sopcode
1417283Sopcode /* imports from main.c */
1517283Sopcode
1617283Sopcode extern struct pixwin *pix_pw;
1717283Sopcode extern struct rect pix_size;
1817283Sopcode extern struct pixrect *scratch_pr;
1917283Sopcode extern struct pixfont *text_pf;
2017283Sopcode extern pix_fd;
2117283Sopcode extern menu_fd;
2217283Sopcode extern text_fd;
2317283Sopcode extern tool_fd;
2417283Sopcode
2517283Sopcode /* imports from sun.c */
2617283Sopcode
2717283Sopcode extern get_any_button();
2817283Sopcode
2917283Sopcode /* locals */
3017283Sopcode
3117283Sopcode static help_x, help_y; /* current position on help screen */
3217283Sopcode
3317283Sopcode #define help_dy (text_pf->pf_defaultsize.y)
3417283Sopcode #define HELP_LEFT 8
3517283Sopcode #define HELP_SKIP 16
3617283Sopcode
3717283Sopcode
3817283Sopcode /*
3917283Sopcode * Display a help screen consisting of a pixrect, a title and some text.
4017283Sopcode * The current picture is saved in the scratch pixrect before displaying
4117283Sopcode * the help screen. After the user presses a mouse button, the picture
4217283Sopcode * is restored and processing continues.
4317283Sopcode */
4417283Sopcode static
4517283Sopcode help_screen(icon_pr, title, text)
4617283Sopcode struct pixrect *icon_pr;
4717283Sopcode char *title, *text;
4817283Sopcode {
4917283Sopcode /* save current display */
5017283Sopcode pw_read(scratch_pr, 0, 0, pix_size.r_width, pix_size.r_height, PIX_SRC,
5117283Sopcode pix_pw, 0, 0);
5217283Sopcode
5317283Sopcode /* clear picture subwindow before help screen display */
5417283Sopcode pw_writebackground(pix_pw, 0, 0, 2000, 2000, PIX_SRC);
5517283Sopcode
5617283Sopcode help_x = HELP_LEFT;
5717283Sopcode help_y = 8;
5817283Sopcode
5917283Sopcode /* display icon if not a NULL pointer */
6017283Sopcode if (icon_pr != NULL) {
6117283Sopcode pw_write(pix_pw, help_x, help_y, icon_pr->pr_size.x, icon_pr->pr_size.y,
6217283Sopcode PIX_SRC, icon_pr, 0, 0);
6317283Sopcode help_x += icon_pr->pr_size.x + HELP_SKIP;
6417283Sopcode help_message(title);
6517283Sopcode help_y += icon_pr->pr_size.y + HELP_SKIP;
6617283Sopcode }
6717283Sopcode else {
6817283Sopcode help_message(title);
6917283Sopcode help_y += help_dy + HELP_SKIP;
7017283Sopcode }
7117283Sopcode
7217283Sopcode help_x = HELP_LEFT;
7317283Sopcode help_message(text);
7417283Sopcode
7517283Sopcode help_y += HELP_SKIP;
7617283Sopcode help_x = HELP_LEFT;
7717283Sopcode help_message("Press a mouse button to continue.");
7817283Sopcode
7917283Sopcode /* wait for mouse button in any subwindow or tool border */
8017283Sopcode get_any_button();
8117283Sopcode
8217283Sopcode /* restore picture subwindow */
8317283Sopcode pw_write(pix_pw, 0, 0, pix_size.r_width, pix_size.r_height, PIX_SRC,
8417283Sopcode scratch_pr, 0, 0);
8517283Sopcode }
8617283Sopcode
8717283Sopcode
8817283Sopcode /*
8917283Sopcode * A simple text display tool for help messages.
9017283Sopcode * Text is displayed at the current help location (help_x, help_y).
9117283Sopcode * Newlines within the text string are handled appropriately.
9217283Sopcode * Maximum line length (between newlines) is 80 characters, although
9317283Sopcode * only about 64 can be displayed on the default Gremlin screen.
9417283Sopcode */
9517283Sopcode static
help_message(text)9617283Sopcode help_message(text)
9717283Sopcode char *text;
9817283Sopcode {
9917283Sopcode char buf[80];
10017283Sopcode register i;
10117283Sopcode
10217283Sopcode while (*text != '\0') {
10317283Sopcode i = 0;
10417283Sopcode
10517283Sopcode while ((*text != '\n') && (*text != '\0'))
10617283Sopcode buf[i++] = *text++;
10717283Sopcode buf[i] = '\0';
10817283Sopcode
10917283Sopcode if (*text == '\n')
11017283Sopcode text++;
11117283Sopcode
11217283Sopcode pw_text(pix_pw, help_x, help_y + TEXT_BASELINE + 2, PIX_SRC,
11317283Sopcode text_pf, buf);
11417283Sopcode help_y += help_dy;
11517283Sopcode }
11617283Sopcode }
11717283Sopcode
11817283Sopcode
11917283Sopcode static char help_HELP[] = "\
12017283Sopcode The three subwindows in Gremlin are used for text entry,\n\
12117283Sopcode menu display and command selection, and picture display.\n\
12217283Sopcode In addition, the normal tool manager pop-up menu is available\n\
12317283Sopcode from the tool borders.\n\
12417283Sopcode \n\
12517283Sopcode In the menu subwindow, the left mouse button is used to\n\
12617283Sopcode invoke commands after selecting the appropriate icon, the\n\
12717283Sopcode middle mouse button is used to effect the same command on\n\
12817283Sopcode only the current set (where appropriate), and the right mouse\n\
12917283Sopcode button provides a help screen for the icon.\n\
13017283Sopcode \n\
13117283Sopcode In the picture subwindow, the left mouse button is used to\n\
13217283Sopcode lay down points, the middle mouse button erases points in the\n\
13317283Sopcode opposite order from which they were layed down, and the right\n\
13417283Sopcode mouse button provides a help screen.\n\
13517283Sopcode \n\
13617283Sopcode In the text subwindow, command arguments (when required)\n\
13717283Sopcode are entered from the keyboard. Arguments must be entered\n\
13817283Sopcode before the command is selected. Simple editing commands\n\
13917283Sopcode (backspace, line and word delete) can be used to modify the\n\
14017283Sopcode argument. Again, the right mouse button provides a help\n\
14117283Sopcode screen display.";
14217283Sopcode
help()14317283Sopcode help()
14417283Sopcode {
14517283Sopcode help_screen(&question_pr, "Help ('?')", help_HELP);
14617283Sopcode }
14717283Sopcode
14817283Sopcode
14917283Sopcode static char justify_HELP[] = "\
15017283Sopcode Select text justification by moving marker to one of nine\n\
15117283Sopcode positioning points within the JUSTIFY icon and pressing the\n\
15217283Sopcode left mouse button.\n\
15317283Sopcode \n\
15417283Sopcode Modify justification of text in the current set by moving the\n\
15517283Sopcode marker as above and then pressing the middle mouse button.\n\
15617283Sopcode \n\
15717283Sopcode When text is displayed in the current set, its justification\n\
15817283Sopcode mode is indicated by a small dot.";
15917283Sopcode
justify_help()16017283Sopcode justify_help()
16117283Sopcode {
16217283Sopcode help_screen(&justify_pr, "Text Justification", justify_HELP);
16317283Sopcode }
16417283Sopcode
16517283Sopcode
16617283Sopcode static char size1_HELP[] = "\n\
16717283Sopcode Set the default font size to one with the left mouse button.\n\
16817283Sopcode \n\
16917283Sopcode Modify text in the current set to size one with the middle\n\
17017283Sopcode mouse button.";
17117283Sopcode
size1_help()17217283Sopcode size1_help()
17317283Sopcode {
17417283Sopcode help_screen(&size1_pr, "Set Text Size One", size1_HELP);
17517283Sopcode }
17617283Sopcode
17717283Sopcode
17817283Sopcode static char roman_HELP[] = "\
17917283Sopcode Set the default font to Roman with the left mouse button.\n\
18017283Sopcode \n\
18117283Sopcode Modify text in the current set to Roman font with the middle\n\
18217283Sopcode mouse button.";
18317283Sopcode
roman_help()18417283Sopcode roman_help()
18517283Sopcode {
18617283Sopcode help_screen(&roman_pr, "Set Roman Text Font", roman_HELP);
18717283Sopcode }
18817283Sopcode
18917283Sopcode
19017283Sopcode static char scale_HELP[] = "\
19117283Sopcode Scaling uses three points to define a transformation.\n\
19217283Sopcode The current set is scaled by the ratio of the distances\n\
19317283Sopcode between the first and second and the first and third points.";
19417283Sopcode
scale_help()19517283Sopcode scale_help()
19617283Sopcode {
19717283Sopcode help_screen(&scale_pr, "Scale Current Set ('s')", scale_HELP);
19817283Sopcode }
19917283Sopcode
20017283Sopcode
20117283Sopcode static char move_HELP[] = "\
20217283Sopcode Translation uses two points to define a transformation.\n\
20317283Sopcode The current set is translated through the relative distance\n\
20417283Sopcode between the two points.";
20517283Sopcode
move_help()20617283Sopcode move_help()
20717283Sopcode {
20817283Sopcode help_screen(&move_pr, "Translate Current Set ('t')", move_HELP);
20917283Sopcode }
21017283Sopcode
21117283Sopcode
21217283Sopcode static char hmirror_HELP[] = "\
21317283Sopcode Mirroring uses one point to define a transformation.\n\
21417283Sopcode The current set is reflected about the horizontal line\n\
21517283Sopcode containing the point.";
21617283Sopcode
hmirror_help()21717283Sopcode hmirror_help()
21817283Sopcode {
21917283Sopcode help_screen(&hmirror_pr, "Horizontal Mirror", hmirror_HELP);
22017283Sopcode }
22117283Sopcode
22217283Sopcode
22317283Sopcode static char vmirror_HELP[] = "\
22417283Sopcode Mirroring uses one point to define a transformation.\n\
22517283Sopcode The current set is reflected about the vertical line\n\
22617283Sopcode containing the point.";
22717283Sopcode
vmirror_help()22817283Sopcode vmirror_help()
22917283Sopcode {
23017283Sopcode help_screen(&vmirror_pr, "Vertical Mirror", vmirror_HELP);
23117283Sopcode }
23217283Sopcode
23317283Sopcode
23417283Sopcode static char include_HELP[] = "\
23517283Sopcode The current set is selected by points. Using the left mouse\n\
23617283Sopcode button, the current set will include ONLY those elements near\n\
23717283Sopcode the points. With the middle mouse button, those elements near\n\
23817283Sopcode the points will be ADDED to the current set.";
23917283Sopcode
include_help()24017283Sopcode include_help()
24117283Sopcode {
24217283Sopcode help_screen(&include_pr, "Define Current Set ('d')", include_HELP);
24317283Sopcode }
24417283Sopcode
24517283Sopcode
24617283Sopcode static char put_HELP[] = "\
24717283Sopcode The current set is copied into the specified set buffer for\n\
24817283Sopcode possible later retrieval. An optional positioning point may\n\
24917283Sopcode be specified for use in positioning the set when it is later\n\
25017283Sopcode copied into a picture. With no positioning point specified,\n\
25117283Sopcode a point is selected from among the reference points of the\n\
25217283Sopcode current set.";
25317283Sopcode
put1_help()25417283Sopcode put1_help()
25517283Sopcode {
25617283Sopcode help_screen(&put1_pr, "Save Current Set in Buffer One ('1')", put_HELP);
25717283Sopcode }
25817283Sopcode
25917283Sopcode
put2_help()26017283Sopcode put2_help()
26117283Sopcode {
26217283Sopcode help_screen(&put2_pr, "Save Current Set in Buffer Two ('2')", put_HELP);
26317283Sopcode }
26417283Sopcode
26517283Sopcode
put3_help()26617283Sopcode put3_help()
26717283Sopcode {
26817283Sopcode help_screen(&put3_pr, "Save Current Set in Buffer Three ('3')", put_HELP);
26917283Sopcode }
27017283Sopcode
27117283Sopcode
put4_help()27217283Sopcode put4_help()
27317283Sopcode {
27417283Sopcode help_screen(&put4_pr, "Save Current Set in Buffer Four ('4')", put_HELP);
27517283Sopcode }
27617283Sopcode
27717283Sopcode
27817283Sopcode static char horizontal_HELP[] = "\
27917283Sopcode Horizontal adjustment forces each point laid down to lie on\n\
28017283Sopcode a horizontal line from the previous point. The left mouse\n\
28117283Sopcode button toggles this drawing mode.";
28217283Sopcode
horizontal_help()28317283Sopcode horizontal_help()
28417283Sopcode {
28517283Sopcode help_screen(&horizontal_pr, "Horizontal Adjustment", horizontal_HELP);
28617283Sopcode }
28717283Sopcode
28817283Sopcode
28917283Sopcode static char vertical_HELP[] = "\
29017283Sopcode Vertical adjustment forces each point laid down to lie on a\n\
29117283Sopcode vertical line from the previous point. The left mouse button\n\
29217283Sopcode toggles this drawing mode.";
29317283Sopcode
vertical_help()29417283Sopcode vertical_help()
29517283Sopcode {
29617283Sopcode help_screen(&vertical_pr, "Vertical Adjustment", vertical_HELP);
29717283Sopcode }
29817283Sopcode
29917283Sopcode
30017283Sopcode static char stipple_HELP[] = "\
30117283Sopcode Select the stipple pattern used for drawing polygons with\n\
30217283Sopcode the left mouse button.\n\
30317283Sopcode \n\
30417283Sopcode Modify polygons in the current set to the specified stipple\n\
30517283Sopcode pattern with the middle mouse button.";
30617283Sopcode
stipple1_help()30717283Sopcode stipple1_help()
30817283Sopcode {
30917283Sopcode help_screen(&white_pr, "Set Stipple Pattern One", stipple_HELP);
31017283Sopcode }
31117283Sopcode
31217283Sopcode
stipple2_help()31317283Sopcode stipple2_help()
31417283Sopcode {
31517283Sopcode help_screen(&gray_pr, "Set Stipple Pattern Two", stipple_HELP);
31617283Sopcode }
31717283Sopcode
31817283Sopcode
stipple3_help()31917283Sopcode stipple3_help()
32017283Sopcode {
32117283Sopcode help_screen(&_50_pr, "Set Stipple Pattern Three", stipple_HELP);
32217283Sopcode }
32317283Sopcode
32417283Sopcode
stipple4_help()32517283Sopcode stipple4_help()
32617283Sopcode {
32717283Sopcode help_screen(&black_pr, "Set Stipple Pattern Four", stipple_HELP);
32817283Sopcode }
32917283Sopcode
33017283Sopcode
stipple5_help()33117283Sopcode stipple5_help()
33217283Sopcode {
33317283Sopcode help_screen(&stipple5_pr, "Set Stipple Pattern Five", stipple_HELP);
33417283Sopcode }
33517283Sopcode
33617283Sopcode
stipple6_help()33717283Sopcode stipple6_help()
33817283Sopcode {
33917283Sopcode help_screen(&stipple6_pr, "Set Stipple Pattern Six", stipple_HELP);
34017283Sopcode }
34117283Sopcode
34217283Sopcode
stipple7_help()34317283Sopcode stipple7_help()
34417283Sopcode {
34517283Sopcode help_screen(&stipple7_pr, "Set Stipple Pattern Seven", stipple_HELP);
34617283Sopcode }
34717283Sopcode
34817283Sopcode
stipple8_help()34917283Sopcode stipple8_help()
35017283Sopcode {
35117283Sopcode help_screen(&stipple8_pr, "Set Stipple Pattern Eight", stipple_HELP);
35217283Sopcode }
35317283Sopcode
35417283Sopcode
35517283Sopcode static char size2_HELP[] = "\n\
35617283Sopcode Set the default font size to two with the left mouse button.\n\
35717283Sopcode \n\
35817283Sopcode Modify text in the current set to size two with the middle\n\
35917283Sopcode mouse button.";
36017283Sopcode
size2_help()36117283Sopcode size2_help()
36217283Sopcode {
36317283Sopcode help_screen(&size2_pr, "Set Text Size Two", size2_HELP);
36417283Sopcode }
36517283Sopcode
36617283Sopcode
36717283Sopcode static char italics_HELP[] = "\
36817283Sopcode Set the default font to Italics with the left mouse button.\n\
36917283Sopcode \n\
37017283Sopcode Modify text in the current set to Italics font with the middle\n\
37117283Sopcode mouse button.";
37217283Sopcode
italics_help()37317283Sopcode italics_help()
37417283Sopcode {
37517283Sopcode help_screen(&italics_pr, "Set Italics Text Font", italics_HELP);
37617283Sopcode }
37717283Sopcode
37817283Sopcode
37917283Sopcode static char copy_HELP[] = "\
38017283Sopcode Copying uses two or more points. A copy of the current set\n\
38117283Sopcode is made and translated by a relative distance between the\n\
38217283Sopcode first and each additional point. The last copy becomes\n\
38317283Sopcode the new current set.";
38417283Sopcode
copy_help()38517283Sopcode copy_help()
38617283Sopcode {
38717283Sopcode help_screen(©_pr, "Copy Current Set ('c')", copy_HELP);
38817283Sopcode }
38917283Sopcode
39017283Sopcode
39117283Sopcode static char erase_HELP[] = "\
39217283Sopcode The current set is erased. See also the undo command.";
39317283Sopcode
erase_help()39417283Sopcode erase_help()
39517283Sopcode {
39617283Sopcode help_screen(&erase_pr, "Erase Current Set ('e')", erase_HELP);
39717283Sopcode }
39817283Sopcode
39917283Sopcode
40017283Sopcode static char movepoint_HELP[] = "\
40117283Sopcode This command uses one or more points. The element of the\n\
40217283Sopcode current set which contains the point closest to the first of\n\
40317283Sopcode these points is redrawn with that point replaced by the\n\
40417283Sopcode remaining points, or deleted if there is only one point.";
40517283Sopcode
movepoint_help()40617283Sopcode movepoint_help()
40717283Sopcode {
40817283Sopcode help_screen(&movepoint_pr, "Move Point", movepoint_HELP);
40917283Sopcode }
41017283Sopcode
41117283Sopcode
41217283Sopcode static char rotate_HELP[] = "\
41317283Sopcode Three points are used to define a rotation. The rotation is\n\
41417283Sopcode performed relative to the first point, through an angle formed\n\
41517283Sopcode by the lines between points one and two and points one and\n\
41617283Sopcode three, respectively.";
41717283Sopcode
rotate_help()41817283Sopcode rotate_help()
41917283Sopcode {
42017283Sopcode help_screen(&rotate_pr, "Rotate Current Set ('r')", rotate_HELP);
42117283Sopcode }
42217283Sopcode
42317283Sopcode
42417283Sopcode static char filecabinet_HELP[] = "\
42517283Sopcode This icon produces a pop-up menu to select commands for\n\
42617283Sopcode manipulating files: Edit, Path, Read, Write and Save Set.\n\
42717283Sopcode With each command, parameters should be specified in the\n\
42817283Sopcode text subwindow before invocation.\n\
42917283Sopcode \n\
43017283Sopcode The Edit command causes a new file to be opened for editing.\n\
43117283Sopcode Picture sets saved in the buffers are preserved across edits.\n\
43217283Sopcode The file name will be displayed in the Gremlin tool border.\n\
43317283Sopcode \n\
43417283Sopcode The Path command is used to set the directory search path\n\
43517283Sopcode for the Edit and Read commands. Directory names should be\n\
43617283Sopcode separated by colons and may include the ~ notation. If a file\n\
43717283Sopcode cannot be found using any of the paths, a final check will be\n\
43817283Sopcode made in the Gremlin library, /usr/local/lib/gremlin.\n\
43917283Sopcode \n\
44017283Sopcode The Read command is used to add elements from the specified\n\
44117283Sopcode file into the current picture. The new elements become the\n\
44217283Sopcode current set. A point may be specified to position the file\n\
44317283Sopcode in the picture.\n\
44417283Sopcode \n\
44517283Sopcode The Write command saves the entire picture in a file. If no\n\
44617283Sopcode file name is specified in the text subwindow, the current Edit\n\
44717283Sopcode file name is used. An optional point may be specified to aid\n\
44817283Sopcode in Reading the picture later.\n\
44917283Sopcode \n\
45017283Sopcode The Save Set command is similar to the Write command with two\n\
45117283Sopcode exceptions: only the current set is written, and a file name\n\
45217283Sopcode must be specified.";
45317283Sopcode
filecabinet_help()45417283Sopcode filecabinet_help()
45517283Sopcode {
45617283Sopcode help_screen(&filecabinet_pr, "File Commands", filecabinet_HELP);
45717283Sopcode }
45817283Sopcode
45917283Sopcode
46017283Sopcode static char boxinc_HELP[] = "\
461*17646Sopcode Two points must be placed that define a rectangular area\n\
46217283Sopcode (the endpoints of the diagonal of the rectangle).\n\
46317283Sopcode \n\
46417283Sopcode With the left mouse button, all elements contained within the\n\
46517283Sopcode the rectangle become the current set.\n\
46617283Sopcode \n\
46717283Sopcode With the middle mouse button, those same elements are ADDED\n\
46817283Sopcode to the current set.";
46917283Sopcode
boxinc_help()47017283Sopcode boxinc_help()
47117283Sopcode {
47217283Sopcode help_screen(&boxinc_pr, "Select Area for Current Set ('f')", boxinc_HELP);
47317283Sopcode }
47417283Sopcode
47517283Sopcode
47617283Sopcode static char manhattan_HELP[] = "\
47717283Sopcode Manhattan adjustment forces each point laid down to be either\n\
47817283Sopcode directly horizontal or vertical with respect to the previous\n\
47917283Sopcode point, whichever it is closer to. The left mouse button\n\
48017283Sopcode toggles this drawing mode.";
48117283Sopcode
manhattan_help()48217283Sopcode manhattan_help()
48317283Sopcode {
48417283Sopcode help_screen(&horvert_pr, "Manhattan Adjustment ('z')", manhattan_HELP);
48517283Sopcode }
48617283Sopcode
48717283Sopcode
48817283Sopcode static char gravity_HELP[] = "\
48917283Sopcode This command toggles each time it is selected. When on,\n\
49017283Sopcode gravity forces a point to coincide with the nearest existing\n\
49117283Sopcode point or reference point. It will only take affect, however,\n\
49217283Sopcode if the point is near enough to an element to be gravitiated\n\
49317283Sopcode to it.";
49417283Sopcode
gravity_help()49517283Sopcode gravity_help()
49617283Sopcode {
49717283Sopcode help_screen(&gravity_pr, "Set Gravity ('g')", gravity_HELP);
49817283Sopcode }
49917283Sopcode
50017283Sopcode
50117283Sopcode static char size3_HELP[] = "\n\
50217283Sopcode Set the default font size to three with the left mouse button.\n\
50317283Sopcode \n\
50417283Sopcode Modify text in the current set to size three with the middle\n\
50517283Sopcode mouse button.";
50617283Sopcode
size3_help()50717283Sopcode size3_help()
50817283Sopcode {
50917283Sopcode help_screen(&size3_pr, "Set Text Size Three", size3_HELP);
51017283Sopcode }
51117283Sopcode
51217283Sopcode
51317283Sopcode static char bold_HELP[] = "\
51417283Sopcode Set the default font to Bold with the left mouse button.\n\
51517283Sopcode \n\
51617283Sopcode Modify text in the current set to Bold font with the middle\n\
51717283Sopcode mouse button.";
51817283Sopcode
bold_help()51917283Sopcode bold_help()
52017283Sopcode {
52117283Sopcode help_screen(&bold_pr, "Set Bold Text Font", bold_HELP);
52217283Sopcode }
52317283Sopcode
52417283Sopcode
52517283Sopcode static char brush_HELP[] = "\
52617283Sopcode The left mouse button sets the current brush style.\n\
52717283Sopcode \n\
52817283Sopcode The middle mouse button modifies all elements in the current\n\
52917283Sopcode set (except text) to the selected brush style.";
53017283Sopcode
brush1_help()53117283Sopcode brush1_help()
53217283Sopcode {
53317283Sopcode help_screen(&dotted_pr, "Set Dotted Line Style", brush_HELP);
53417283Sopcode }
53517283Sopcode
53617283Sopcode
brush2_help()53717283Sopcode brush2_help()
53817283Sopcode {
53917283Sopcode help_screen(&broken_pr, "Set Broken Line Style", brush_HELP);
54017283Sopcode }
54117283Sopcode
54217283Sopcode
brush3_help()54317283Sopcode brush3_help()
54417283Sopcode {
54517283Sopcode help_screen(&thick_pr, "Set Thick Line Style", brush_HELP);
54617283Sopcode }
54717283Sopcode
54817283Sopcode
brush4_help()54917283Sopcode brush4_help()
55017283Sopcode {
55117283Sopcode help_screen(&dashed_pr, "Set Dashed Line Style", brush_HELP);
55217283Sopcode }
55317283Sopcode
55417283Sopcode
brush5_help()55517283Sopcode brush5_help()
55617283Sopcode {
55717283Sopcode help_screen(&narrow_pr, "Set Narrow Line Style", brush_HELP);
55817283Sopcode }
55917283Sopcode
56017283Sopcode
brush6_help()56117283Sopcode brush6_help()
56217283Sopcode {
56317283Sopcode help_screen(&medium_pr, "Set Medium Line Style", brush_HELP);
56417283Sopcode }
56517283Sopcode
56617283Sopcode
56717283Sopcode static char arrow_HELP[] = "\
56817283Sopcode This command requires two points. The first point indicates\n\
56917283Sopcode the tip of the arrow. The second point indicates the\n\
57017283Sopcode direction from which the arrow points.";
57117283Sopcode
arrow_help()57217283Sopcode arrow_help()
57317283Sopcode {
57417283Sopcode help_screen(&arrow_pr, "Draw Arrowhead ('w')", arrow_HELP);
57517283Sopcode }
57617283Sopcode
57717283Sopcode
57817283Sopcode static char text_HELP[] = "\
57917283Sopcode Text is positioned using one or two points. If two points\n\
58017283Sopcode are used, the text is positioned relative to their locus.\n\
58117283Sopcode The text specified in the text subwindow is displayed using\n\
58217283Sopcode the current font, size and justification.\n\
58317283Sopcode \n\
58417283Sopcode See the text subwindow help display for an explanation of\n\
58517283Sopcode quick text entry.";
58617283Sopcode
text_help()58717283Sopcode text_help()
58817283Sopcode {
58917283Sopcode help_screen(&text_pr, "Display Text", text_HELP);
59017283Sopcode }
59117283Sopcode
59217283Sopcode
59317283Sopcode static char misc_HELP[] = "\
59417283Sopcode This command invokes a pop-up menu of infrequently used\n\
59517283Sopcode commands: Clear Points, Show Points, Gripe (rarely used)\n\
59617283Sopcode and Point.\n\
59717283Sopcode \n\
59817283Sopcode Clear Points will clear all positioning points and reference\n\
59917283Sopcode points from the display.\n\
60017283Sopcode \n\
60117283Sopcode Show Points will display the reference points of those\n\
60217283Sopcode elements in the current set.\n\
60317283Sopcode \n\
60417283Sopcode Gripe displays a message indicating the mail address of\n\
60517283Sopcode the current Gremlin maintainer.\n\
60617283Sopcode \n\
60717283Sopcode Point can be used to lay down a point at a specific location.\n\
60817283Sopcode The coordinates of the point must first be entered in the\n\
60917283Sopcode text subwindow.";
61017283Sopcode
misc_help()61117283Sopcode misc_help()
61217283Sopcode {
61317283Sopcode help_screen(&misc_pr, "Miscellaneous Commands", misc_HELP);
61417283Sopcode }
61517283Sopcode
61617283Sopcode
61717283Sopcode static char get_HELP[] = "\
61817283Sopcode This command retrieves a set from the specified buffer and\n\
61917283Sopcode copies it into the picture. At least one point must be\n\
62017283Sopcode specified, indicating the position(s) in the picture where\n\
62117283Sopcode the set is to be copied.";
62217283Sopcode
get1_help()62317283Sopcode get1_help()
62417283Sopcode {
62517283Sopcode help_screen(&get1_pr, "Add Buffer One To Picture", get_HELP);
62617283Sopcode }
62717283Sopcode
62817283Sopcode
get3_help()62917283Sopcode get3_help()
63017283Sopcode {
63117283Sopcode help_screen(&get3_pr, "Add Buffer Three To Picture", get_HELP);
63217283Sopcode }
63317283Sopcode
63417283Sopcode
get2_help()63517283Sopcode get2_help()
63617283Sopcode {
63717283Sopcode help_screen(&get2_pr, "Add Buffer Two To Picture", get_HELP);
63817283Sopcode }
63917283Sopcode
64017283Sopcode
get4_help()64117283Sopcode get4_help()
64217283Sopcode {
64317283Sopcode help_screen(&get4_pr, "Add Buffer Four To Picture", get_HELP);
64417283Sopcode }
64517283Sopcode
64617283Sopcode
64717283Sopcode static char linestyle_HELP[] = "\
64817283Sopcode This command toggles symbolic line display. When highlighted,\n\
64917283Sopcode this icon indicates that elements will be drawn using their\n\
65017283Sopcode true line style (or brush). When not highlighted, all\n\
65117283Sopcode elements are drawn using the narrow brush, decreasing display\n\
65217283Sopcode times.";
65317283Sopcode
linestyle_help()65417283Sopcode linestyle_help()
65517283Sopcode {
65617283Sopcode help_screen(&linestyle_pr, "Toggle Line Style Mode", linestyle_HELP);
65717283Sopcode }
65817283Sopcode
65917283Sopcode
66017283Sopcode static char align_HELP[] = "\
66117283Sopcode This command forces points to be aligned on pixel boundaries\n\
66217283Sopcode as specified in the icon. Alignment occurs in powers of two.\n\
66317283Sopcode To select the next alignment value use the left mouse button,\n\
66417283Sopcode and to select the previous value use the middle mouse button.\n\
66517283Sopcode \n\
66617283Sopcode The precedence of point positioning modifiers is as follows:\n\
66717283Sopcode gravity will override alignment, and adjustment (vertical,\n\
66817283Sopcode horizontal or manhattan) will be applied to the point to which\n\
66917283Sopcode the point has been gravitated.";
67017283Sopcode
align_help()67117283Sopcode align_help()
67217283Sopcode {
67317283Sopcode help_screen(&align_pr, "Set Point Alignment", align_HELP);
67417283Sopcode }
67517283Sopcode
67617283Sopcode
67717283Sopcode static char size4_HELP[] = "\n\
67817283Sopcode Set the default font size to four with the left mouse button.\n\
67917283Sopcode \n\
68017283Sopcode Modify text in the current set to size four with the middle\n\
68117283Sopcode mouse button.";
68217283Sopcode
size4_help()68317283Sopcode size4_help()
68417283Sopcode {
68517283Sopcode help_screen(&size4_pr, "Set Text Size Four", size4_HELP);
68617283Sopcode }
68717283Sopcode
68817283Sopcode
68917283Sopcode static char special_HELP[] = "\
69017283Sopcode Set the default font to Special with the left mouse button.\n\
69117283Sopcode \n\
69217283Sopcode Modify text in the current set to Special font with the middle\n\
69317283Sopcode mouse button.";
69417283Sopcode
special_help()69517283Sopcode special_help()
69617283Sopcode {
69717283Sopcode help_screen(&special_pr, "Set Special Text Font", special_HELP);
69817283Sopcode }
69917283Sopcode
70017283Sopcode
70117283Sopcode static char arc_HELP[] = "\
70217283Sopcode This command requires two points to draw a full circle or\n\
70317283Sopcode three points to draw an arc. The first point determines the\n\
70417283Sopcode center of a circle. The second is a point on the circle,\n\
70517283Sopcode thus defining the radius. An optional third point determines\n\
70617283Sopcode a counter-clockwise angle from the second point which is the\n\
70717283Sopcode extent of the arc.";
70817283Sopcode
arc_help()70917283Sopcode arc_help()
71017283Sopcode {
71117283Sopcode help_screen(&arc_pr, "Draw Circle or Arc ('a')", arc_HELP);
71217283Sopcode }
71317283Sopcode
71417283Sopcode
71517283Sopcode static char curve_HELP[] = "\
71617283Sopcode A curve is determined by a number of points distributed along\n\
71717283Sopcode its trajectory. Two points yield a straight line. If the\n\
71817283Sopcode first and last points of a spline are the same, a smooth\n\
71917283Sopcode closed figure will be drawn. Curves are drawn with the left\n\
72017283Sopcode mouse button using the current brush style.\n\
72117283Sopcode \n\
72217283Sopcode With the middle mouse button, vectors and polygons in the\n\
72317283Sopcode current set are modified to become curves.";
72417283Sopcode
curve_help()72517283Sopcode curve_help()
72617283Sopcode {
72717283Sopcode help_screen(&curve_pr, "Draw Curve ('b')", curve_HELP);
72817283Sopcode }
72917283Sopcode
73017283Sopcode
73117283Sopcode static char vector_HELP[] = "\
73217283Sopcode With the left mouse button, a line is drawn connecting each\n\
73317283Sopcode of the points layed down in order. The current brush (narrow,\n\
73417283Sopcode dotted, etc) is used.\n\
73517283Sopcode \n\
73617283Sopcode With the middle mouse button, curves and polygons in the\n\
73717283Sopcode current set are modified to become vectors.";
73817283Sopcode
vector_help()73917283Sopcode vector_help()
74017283Sopcode {
74117283Sopcode help_screen(&vector_pr, "Draw Vector ('v')", vector_HELP);
74217283Sopcode }
74317283Sopcode
74417283Sopcode
74517283Sopcode static char box_HELP[] = "\
74617283Sopcode Two points are used to define the endpoints of the diagonal\n\
74717283Sopcode of a rectangle. A box is drawn in the current brush which\n\
74817283Sopcode forms the rectangle.";
74917283Sopcode
box_help()75017283Sopcode box_help()
75117283Sopcode {
75217283Sopcode help_screen(&box_pr, "Draw Box ('x')", box_HELP);
75317283Sopcode }
75417283Sopcode
75517283Sopcode
75617283Sopcode static char grid_HELP[] = "\
75717283Sopcode This command toggles the display of a grid used to aid in\n\
75817283Sopcode laying down points. The grid is displayed on 32 pixel\n\
75917283Sopcode boundaries.";
76017283Sopcode
grid_help()76117283Sopcode grid_help()
76217283Sopcode {
76317283Sopcode help_screen(&grid_pr, "Toggle Grid Display ('q')", grid_HELP);
76417283Sopcode }
76517283Sopcode
76617283Sopcode
76717283Sopcode static char littlepoint_HELP[] = "\
76817283Sopcode This command toggles the style of points displayed. When the\n\
76917283Sopcode icon is highlighted, points are indicated by a small circle\n\
77017283Sopcode and are numbered from zero. When the icon is unhighlighted,\n\
77117283Sopcode points are displayed as a small diamond.";
77217283Sopcode
littlepoint_help()77317283Sopcode littlepoint_help()
77417283Sopcode {
77517283Sopcode help_screen(&littlepoint_pr, "Toggle Point Style", littlepoint_HELP);
77617283Sopcode }
77717283Sopcode
77817283Sopcode
77917283Sopcode static char undo_HELP[] = "\
78017283Sopcode This command undoes the last command which modified the\n\
78117283Sopcode picture contents.";
78217283Sopcode
undo_help()78317283Sopcode undo_help()
78417283Sopcode {
78517283Sopcode help_screen(&undo_pr, "Undo Last Command", undo_HELP);
78617283Sopcode }
78717283Sopcode
78817283Sopcode
78917283Sopcode static char pan_HELP[] = "\
79017283Sopcode With the left mouse button this command requires one point.\n\
79117283Sopcode The entire picture and current set are translated such that\n\
79217283Sopcode the specified point is located at the center of the display.\n\
79317283Sopcode \n\
79417283Sopcode With the middle mouse button no point is required. The\n\
79517283Sopcode picture is translated such that its absolute center is\n\
79617283Sopcode brought to the center of the display.";
79717283Sopcode
pan_help()79817283Sopcode pan_help()
79917283Sopcode {
80017283Sopcode help_screen(&pan_pr, "Panning", pan_HELP);
80117283Sopcode }
80217283Sopcode
80317283Sopcode
80417283Sopcode static char polygon_HELP[] = "\
80517283Sopcode Polygons can be drawn either bordered or unbordered. At\n\
80617283Sopcode least three points are required to draw a polygon. If the\n\
80717283Sopcode first and the last points are not the same, that line\n\
80817283Sopcode segment will be added automatically. With the left mouse\n\
80917283Sopcode button, a filled polygon will be added to the display in the\n\
81017283Sopcode current stipple style. If a border is to be drawn, this\n\
811*17646Sopcode will be added in the current line style.\n\
81217283Sopcode \n\
81317283Sopcode The middle mouse button is used to modify curves, vectors and\n\
81417283Sopcode other polygons in the current set to be polygons of the\n\
81517283Sopcode selected type (bordered or unbordered).";
81617283Sopcode
bpolygon_help()81717283Sopcode bpolygon_help()
81817283Sopcode {
81917283Sopcode help_screen(&bpolygon_pr, "Fill Bordered Polygon", polygon_HELP);
82017283Sopcode }
82117283Sopcode
82217283Sopcode
polygon_help()82317283Sopcode polygon_help()
82417283Sopcode {
82517283Sopcode help_screen(&polygon_pr, "Fill Polygon", polygon_HELP);
82617283Sopcode }
82717283Sopcode
82817283Sopcode
82917283Sopcode static char textsw_HELP[] = "\
83017283Sopcode Command arguments (when required) are entered here from the\n\
83117283Sopcode keyboard. Arguments must be entered before the command is\n\
83217283Sopcode selected. Simple editing commands (backspace, line and word\n\
833*17646Sopcode delete) can be used to modify the argument. The middle mouse\n\
834*17646Sopcode button is used to display the previous text string.\n\
83517283Sopcode \n\
83617283Sopcode The quick form of the TEXT command is invoked by pressing\n\
83717283Sopcode RETURN after entering a string to be displayed in the picture.\n\
83817283Sopcode The string is displayed at the LAST point layed down (using\n\
83917283Sopcode the current justification mode), and this point is removed\n\
84017283Sopcode from the display.";
84117283Sopcode
textsw_help()84217283Sopcode textsw_help()
84317283Sopcode {
84417283Sopcode help_screen(NULL, "Text Subwindow Help", textsw_HELP);
84517283Sopcode }
84617283Sopcode
84717283Sopcode
84817283Sopcode static char pixsw_HELP[] = "\
84917283Sopcode The left mouse button is used to lay down points. The middle\n\
85017283Sopcode mouse button erases points in the opposite order from which\n\
85117283Sopcode they were layed down.";
85217283Sopcode
pixsw_help()85317283Sopcode pixsw_help()
85417283Sopcode {
85517283Sopcode help_screen(NULL, "Picture Subwindow Help", pixsw_HELP);
85617283Sopcode }
85717283Sopcode
85817283Sopcode
menusw_help()85917283Sopcode menusw_help()
86017283Sopcode {
86117283Sopcode /* keeps getting invoked by mistake - not useful anyway */
86217283Sopcode }
863