home *** CD-ROM | disk | FTP | other *** search
- /*
- This file contains the Help routine
-
- To invoke the help routine, hit the Help key!
-
- Written by Steve (Raz) Berry with help from Carol Schnepper
- (I stole the window spec and the code to wait for a keypress from
- her example program 'Timerwin.c')
-
- */
-
- #include "flist.h"
- #include <stdio.h>
-
- extern struct Screen *scrptr;
-
- struct NewWindow helpwin = {
- 40,0, /* LeftEdge and TopEdge */
- 500, 200, /* Width and Height */
- -1, -1, /* DetailPen and BlockPen */
- CLOSEWINDOW|VANILLAKEY, /* IDCMP Flags */
- WINDOWDEPTH|WINDOWDRAG|WINDOWCLOSE /* Flags */
- |SMART_REFRESH|ACTIVATE,
- NULL, NULL, /* Gadget and Image pointers */
- "Help", /* Title string */
- NULL, /* Screen ptr null (this screen) */
- NULL, /* BitMap pointer */
- 50, 20, /* MinWidth and MinHeight */
- 320, 200, /* MaxWidth and MaxHeight */
- WBENCHSCREEN /* Type of window */
- };
-
- /* Here is the text to be output */
-
- char *text[] = {
- "",
- "Key Command Description",
- "--- ------- -----------",
- "^A bring up the ARP Filerequestor.",
- "^C abort Flist.",
- "^D change to current Directory.",
- "^G re-Get the current directory.",
- "^K delete (Kill) current file.",
- "^L Repaint and restore screen.",
- "^N Make directory",
- "^P get Parent directory.",
- "^R Rename current file or directory",
- "^S sort list by Names.",
- "^T sort list by Time.",
- "^Z sort list by Size.",
- "^O sort by Pattern (ARP wildcards).",
- "^U Erase line.",
- "^X Execute REXX macro.",
- " Hitting the Esc key will insert the current filename into",
- " the command line.",
- " Hit any key or the close gadget to continue."
- };
-
- Help()
- {
- int i;
- struct Window *helptr;
- struct RastPort *hrp;
-
- helptr = OpenWindow(&helpwin);
- if (helptr == NULL)
- auto_req("Couldn't open Window!");
- else {
- hrp = helptr->RPort;
- Move(hrp,10L,20L);
-
- for (i=0;i<21;i++){
- Text(hrp,text[i],strlen(text[i]));
- Move(hrp,10,i+20+8*i);
- }
-
- wait_for_event(helptr);
- }
- }
-