home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 543b.lha / MEGABALL2.0_rel2 / STV.docs < prev    next >
Text File  |  1991-08-11  |  10KB  |  267 lines

  1.                   ***************************************
  2.                   *                                     *
  3.                   *   STV - Simple Text Viewer v1.00    *
  4.                   *   © Copyright 1990 by Timm Martin   *
  5.                   *                                     *
  6.                   ***************************************
  7.  
  8.  
  9. This program is freeware.  It may be distributed alone or in conjunction with
  10. any program, commercial or otherwise, with no compensation to the author.
  11.  
  12.  
  13. ******************
  14. *  INTRODUCTION  *
  15. ******************
  16.  
  17. As the name implies, STV is a very simple text viewer.  It does not:
  18.  
  19.   -- display ANSI codes
  20.   -- use blitter text for high-speed scrolling
  21.   -- have word wrap or scroll horizontally
  22.  
  23. However, STV:
  24.  
  25.   -- has word search
  26.   -- has the ability to read multiple documents
  27.   -- runs from an icon (Workbench)
  28.   -- runs on the Workbench or ANY custom screen
  29.   -- allows you to specify its position and size
  30.   -- accommodates both mouse and keyboard input
  31.   -- works great with Workbench v2.0 (and v1.3) and all custom fonts
  32.  
  33. The main purpose of this program is to display program docs and README files.
  34. Because you can specify the window specifications in the icon's ToolTypes,
  35. STV is perfect for PD and computer club disks.  STV also has a programming
  36. hook that allows you to call it from within your program and use it as a file
  37. viewer.
  38.  
  39.  
  40. ****************
  41. *  PARAMETERS  *
  42. ****************
  43.  
  44. You can specify five parameters when running STV:
  45.  
  46.   LeftEdge
  47.     The left edge of the STV window.  This is relative to the screen in which
  48.     it will appear.  The default is 0.
  49.  
  50.   TopEdge
  51.     The top edge of the STV window.  This is relative to the screen in which
  52.     it will appear.  The default is 2.  This gives you access to the screen's
  53.     depth gadgets.
  54.  
  55.   Width
  56.     The width of the STV window in pixels.  The default is the maximum width
  57.     of the screen.
  58.  
  59.   Height
  60.     The height of the STV window in pixels.  The default is the maximum
  61.     height of the screen.
  62.  
  63.   Screen
  64.     The DECIMAL address of the screen in which STV will appear.  CAUTION!
  65.     STV does not verify that this address is valid.  If you specify an
  66.     invalid address, the system will likely crash.  If no screen address is
  67.     provided, STV will open its window on the Workbench screen.
  68.  
  69. STV will not allow you to specify an invalid LeftEdge, TopEdge, Width, or
  70. Height.  It will try to accommodate your specifications as best as possible.
  71.  
  72.  
  73. *************************
  74. *  TO RUN FROM THE CLI  *
  75. *************************
  76.  
  77. To run STV from the CLI, type:
  78.  
  79.   STV [parameters] file1 [file2...]
  80.  
  81. where the parameters are:
  82.  
  83.   -h<number> ... Height
  84.   -l<number> ... LeftEdge
  85.   -t<number> ... TopEdge
  86.   -w<number> ... Width
  87.   -!<number> ... Screen
  88.  
  89. The parameter characters h,l,t,w may be either upper or lower case.  The
  90. parameters must be preceeded by a hyphen so that STV knows they are not file
  91. names.  Each parameter must be followed by the corresponding number.
  92. Embedded blanks are not permitted.
  93.  
  94. Note that you can specify more than one file name.  If the desired file is
  95. not in the current directory, be sure to specify its complete path as well.
  96. File names with embedded blanks should be enclosed in quotes.
  97.  
  98. Parameters and file names may be mixed up in any order.
  99.  
  100. For example:
  101.  
  102.   stv s:shell-startup -h120 -L45 -!237890 -T16 -w400 readme
  103.  
  104. will open a 400 x 120 pixel STV window at location 45,16 in the custom screen
  105. whose address is decimal 237890 and load the "shell-startup" file in the s:
  106. directory and the "readme" file in the current directory,
  107.  
  108.  
  109. ***************************
  110. *  TO RUN FROM WORKBENCH  *
  111. ***************************
  112.  
  113. Create a project icon for the text files you want to read (you can copy the
  114. icon used for this file if you like).  Click on the icon once to highlight
  115. it.  Select "Info" from the Workbench menu.  Enter the name "STV" in the
  116. "Default Tool" field.  If you place STV in a different directory such as c:,
  117. be sure to specify the entire path name such as "c:stv".
  118.  
  119. You can specify the parameters listed above by adding Tool Types.  The
  120. following tool types are accepted:
  121.  
  122.   HEIGHT= ... Height
  123.   LEFT= ..... LeftEdge
  124.   TOP= ...... TopEdge
  125.   WIDTH= .... Width
  126.  
  127. There is no tool type for the Screen.  Note that the tool types must be in
  128. capital letters (this restiction has been lifted under WB 2.0) and must be
  129. followed immediately by an equal sign.
  130.  
  131. As an example, the following tool types:
  132.  
  133.   HEIGHT=80
  134.   TOP=100
  135.   WIDTH=400
  136.  
  137. will open a 400 x 80 pixel screen at location 0,100 (0 is the default left
  138. edge as listed above).
  139.  
  140. To read more than one file at a time from the Workbench, click on all of the
  141. corresponding icons and select "Open" from the Workbench menu.  The files will
  142. be loaded in the order you clicked their icons.
  143.  
  144.  
  145. ***************
  146. *  OPERATION  *
  147. ***************
  148.  
  149. STV can be operated from the keyboard or with the mouse.
  150.  
  151.  
  152. SCROLLING THE DISPLAY
  153.  
  154.   UpArrow key ........... scroll up one line, displaying the previous line
  155.   DownArrow key ......... scroll down one line, displaying the next line
  156.   Alt-UpArrow key ....... scroll up one page, displaying the previous page
  157.   Alt-DownArrow key ..... scroll down one page, displaying the next page
  158.   Shift-UpArrow key ..... display beginning of file
  159.   Shift-DownArrow key ... display end of file
  160.  
  161.   As with the program "More", the Space Bar will also scroll down one page,
  162.   displaying the next page.
  163.  
  164.   You can also scroll the display by clicking the left mouse button on the
  165.   slider bar in the right edge of the window.  If you click on the bar and
  166.   hold down the left mouse button, the display will scroll with the movement
  167.   of the mouse.  Clicking above the bar will scroll the display up one page;
  168.   clicking below the bar will scroll the display down one page.
  169.  
  170.   You can also scroll the display by clicking the left mouse button anywhere
  171.   else in the window.  Clicking and holding the left mouse button while the
  172.   mouse pointer is above the center of the window will cause the display to
  173.   scroll up one line at a time.  Clicking below the center of the window will
  174.   cause the display to scroll down one line at a time.  As you move the mouse
  175.   closer to the center of the window, the scrolling will slow down.  The
  176.   farther away from the center the pointer is, the faster the display will
  177.   scroll.  If you move the pointer to the top or above the window, the
  178.   display will begin to page backward.  If you move the pointer to the bottom
  179.   or below the window, the display will page forward.
  180.  
  181.  
  182. FILE SELECTION
  183.  
  184.   STV loads and displays only one file at a time and in the order you
  185.   specify them.  To display the next file, press the 'N' key or select "Next
  186.   File" from the menu.  To display the previous file, press the 'P' key or
  187.   select "Previous File" from the menu.  These menu options will be disabled
  188.   (ghosted) if there are no previous or next files to display.
  189.  
  190.  
  191. WORD SEARCH
  192.  
  193.   To search for a word in the displayed file, select "Search" from the menu
  194.   or press the 'S' key.  The prompt "Search for:" and a cursor will appear in
  195.   the middle of the STV window.  Type up to 20 characters and press RETURN.
  196.   The normal Amiga string gadget commands are available here:  Right-Amiga-X
  197.   to delete the contents, etc.  To cancel the search, delete the contents and
  198.   press RETURN.
  199.  
  200.   The search is case insensitive, meaning that the search string "program"
  201.   will find "Program", "PROGRAM", and "programming".  Of course, you can also
  202.   include embedded blanks to search for a phrase, such as "C Programming".
  203.  
  204.   STV will always start its search from the beginning of the file and will
  205.   search forward.  If the string of words you entered is found, STV will
  206.   display the string at the top of the window and will highlight the string.
  207.   If the string is not found, the display will flash.
  208.  
  209.   To continue searching from the current search position (in other words,
  210.   from the point where the last search word was found), select "Search Again"
  211.   from the menu or press the 'A', RETURN, or ENTER key.
  212.  
  213.   NOTE: Searching in binary files will not work correctly.
  214.  
  215.  
  216. LET ME OUTTA HERE!
  217.  
  218.   To quit the program, select "Quit" from the menu or press the 'Q' or ESCape
  219.   key.  You don't have to read all of the specified files to quit.
  220.  
  221.  
  222. ***************************
  223. *  TECHNICAL INFORMATION  *
  224. ***************************
  225.  
  226. To open the STV window on a custom screen from within a C program, consider
  227. the following example:
  228.  
  229.   /* using these variable definitions */
  230.   char buffer[100];       /* a scratch buffer for use with Execute() */
  231.   char *file_name;        /* contains the name of the file to be displayed */
  232.   struct Screen *screen;  /* pointer to an opened custom screen */
  233.  
  234.   /* use this code to run STV */
  235.   sprintf( buffer, "c:STV -!%ld %s", (long)screen, file_name );
  236.   Execute( buffer, NULL, NULL );
  237.  
  238. See the AmigaDOS docs for more information on how to use the Execute()
  239. command.  It's often not quite as simple as listed above.  If you want STV to
  240. run asynchronously (in other words, you don't want your program to "sleep"
  241. while STV is running), add the "run" command before "c:STV".
  242.  
  243.  
  244. ****************
  245. *  THE FUTURE  *
  246. ****************
  247.  
  248. This program is about as simple as you can get.  I suppose someday I may
  249. attempt to write "the ultimate text reader," but right now I really have no
  250. idea just what that would be.  Have any suggestions?  Then let me know.
  251.  
  252.  
  253. ********************
  254. *  CORRESPONDENCE  *
  255. ********************
  256.  
  257.   Timm Martin
  258.   P.O. Box 10084
  259.   Largo, FL  34643
  260.   U.S.A.
  261.  
  262.  
  263. STV Docs v1.00 09/28/90
  264. © Copyright 1990 Timm Martin
  265.  
  266. /*-- END --*/
  267.