TextView documentation
~~~~~~~~~~~~~~~~~~~~~~
version 0.4 (Beta) - released 26/9/94

General information
~~~~~~~~~~~~~~~~~~~
     This is my attempt at writing a text viewing program.  TextView has been programmed with the features that I wanted to see in a program of this type.  I hope that TextView is easy and straight forward to use.  It is fully multi-tasking, and only uses a measurable amount of CPU time while scrolling the text and during disk access.  TextView is also, as far as I know, compatible with all Amigas.  The size of display is dependant on whether the system is PAL or NTSC, this text viewer will automatically detect this and create it's display accordingly.  TextView was programmed using Blitz 2, from Acid Software.

     Note that this is still a beta-test version of the program, so I can not in any way guarantee the stability or operation, and I therefore can not be held responsible for any loss of data caused by the use of this program.  (Although I can't see how it could delete or corrupt any data anyway.)

     This program is freely distributable, provided that it remains in it's complete and unaltered form and that no charge is made for it other than a reasonable amount to cover the media, duplication and any postage costs involved.  Copyright remains with Stewart Adcock.

     If you regularly use this program or place it on your harddrive / workbench disk please post to me a small gift e.g. a P.D. disk.  This will encourage me to continue devoting much of my time towards further development of this and my other programs (When, no doubt, I should be doing something more important instead.)  In fact, I will gladly accept a letter containing constructive criticisms and suggested improvements along with general chat as the gift for this beta-version.  On receipt of an additional blank disk, I will return it with the latest versions of this and possibly other programs.

     My address can be found at the bottom of this text file.

System Requirements
~~~~~~~~~~~~~~~~~~~
     To the best of my knowledge, TextView will work on any Amiga, with any version of Kickstart. (If you have information to the contrary please contact me.)  It will work as a completely stand-alone program except that to print a text file the print-handler and a suitable printer driver must be present on your system disk.

Usage
~~~~~~
     TextView can be started from either WorkBench or the CLI.

WorkBench Start-up:

     Simple `double-clicking' on the TextView icon will load TextView.  If you wish to select a file to be loaded automatically, this can be done by selecting the text file to be read (i.e. `single-click').  Then, while holding down the shift key, `double-clicking' on the TextView icon.

     Alternatively, select the text file then select information item from the WorkBench icon menu.  Set the files default tool to TextView.  Remember to enter the complete path though, e.g.

          :c/TextView
       or HD1:TextView/TextView

     Now when you `double-click' on the text file's icon, TextView will be executed automatically.

     In future versions of TextView, the WorkBench Tooltypes will be exploited to enable the options which are presently only available through the CLI parameters to be accessed from WorkBench.

CLI Start-up:

     When started from the CLI, TextView can have a few of it's options set on start-up.

Command syntax: TextView [options] [filename]

     The options are as follows:
       -n auto-tidy function turned off (See features, below)
       -s case-sensitive searches turned on (See features, below)
       -c close WorkBench, useful for low memory systems.

e.g. TextView -n -s Adisk:Docs/doc.doc

     As default, the auto-tidy function will be turned on, the searches will not be case-sensitive and WorkBench will remain open.  Further options will be implemented in future versions.

The Features
~~~~~~~~~~~~
     Control is via a row of gadgets at the bottom of the screen, and to a lesser extent by the menu accessed by the right mouse button (plus the corresponding keyboard shortcuts.)  Any error or information messages are displayed in the black bar immediately above the gadgets.  When no messages are being displayed the current line, total number of lines and name of the text file are displayed on this bar.

The Menu:
     Project/Load         will load an ASCII text file.  A file requester will appear ready for your selection to be made.  Please note that this version of TextView does not support Powerpacked files, or any crunched file for that matter.  If anybody can send me documentation / include files for any version of the Decrunch.library and possibly some example code (C or assembler preferred), then I would be extremely grateful.  I would consider using this library for any decrunching processes.  My address is listed at the bottom of this text file.  Shortcut: Right-Amiga + L

     Project/Print        will print the current text file to the PRT: device, provided that a printer driver and the print-handler can be accessed by TextView.  Shortcut: Right-Amiga + P

     Project/Info         displays an information screen.  Shortcut: Right-Amiga + I

     Project/Quit         Guess!  Shortcut: Right-Amiga + Q

     Options/Auto-tidy    Selected as default.  When a new text file is loaded, with auto-tidy selected, words at the ends of lines will not be split in half, instead the words will begin on the next line down.  This makes the text more readable, however as a consequence, the file's own page formatting may be disrupted which could make it look really awful.  Also, (slightly) more memory will be used due to the increased number of lines that the file contains.  This option only takes effect when a new file is loaded.

     Options/CS search    With this option selected, the search routine will perform case-sensitive searches.  This function is turned off as default, thus characters will be matched with both their upper and lower case forms.

e.g.
With `CS search' not selected,
     Hello will match Hello, hello and hELLo.
With `CS search' selected,
     Hello will ONLY match Hello.
(For more details see the `Find' gadget, below.)

     Further additions to the options menu are likely to be incorporated in future revisions of this program.

The Gadgets:
     Here is a run down of the gadgets and their functions, from left to right:
Up,Down,Prev,Next,Top and End - These first six gadgets control which part of the file is to be displayed.  Up and down scroll the text one line at a time.  Prev and Next scroll the text one page at a time (i.e. 25 lines on PAL Amigas and 18 lines and NTSC Amigas.)  Top and End will jump directly to the top and bottom of the text file respectively.  The Up and Down gadgets will continue scrolling the text until the left mouse button is released.  The other gadgets, on the other hand, will not repeat their actions until the mouse button is released and pressed again.

Find - This gadget enables the user to enter a string, and will perform a search in order to find the next occurrence of this string in the file.  Whether or not the search is case-sensitive depends upon the state of the `CS search' menu item (See above for more details.)  The gadgets are replaced by the prompt `Enter string:' and a gadget box where the string should be entered.  If this facility has already been used the previous search string will be displayed, and so by just pressing the enter key (That's the big one on the right-hand side of the keyboard!) the next occurrence of the string can be located.  Should the string be found, the line containing it will become the top line of the displayed text.  If the string does not occur below the current line, then the message, "String not found." will be displayed in the message bar.  At present the search routine is not perfect, strings split at the end of a line will be missed.  I hope to rectify this in a future update of TextView.

Jump - The `Jump' gadget can be used to display the page starting with a particular line.  Like the `Find' gadget, the gadgets are replaced with a prompt and a gadget box ready for entry of the required line.

Prnt - The function of this gadget is identical to that of the Project/Print menu item.

Info - Selection of the `Info' gadget will display the information screen exactly as the Project/Info menu item does.

Quit - I will leave you to figure the purpose of this one...

The Scroll Bar:
      As an alternative to scrolling through the text by using the gadgets, along the left-hand side of the screen is a scroll bar.  By placing the mouse pointer over the black slider and holding the left mouse button, it can be dragged either up or down thus enabling control over which text is shown.  Clicking on the scroll bar above or below the slider will have the same effect as selection of the `Prev' and `Next' gadgets.

Possible Enhancements for Future Revisions
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
· Improved search.
· Support for crunched files.
· Scrolling also controlled by cursor keys.
· Improved print routines.
· Optimized disk access routines.
· Smoother scrolling.
· Better memory handling (I'm working dynamic memory allocation for the next version.)

Summary and Contact Address
~~~~~~~~~~~~~~~~~~~~~~~~~~~
     I hope that you find this small utility some use.  When it has Powerpacker support, I believe that it will be a worthy rival to the multitude of text viewers presently available.

     So far I have only been able to test TextView on three different systems, and it behaved favourably on each.  These systems were:

A500 with 1/2 meg chip mem and 8 1/2 meg fast mem, GVP harddrive, external disk drive and a Commodore (R.I.P.) dot-matrix printer.

A600 with external disk drive, Canon BJ10sx and Hewlett Packard Thinkjet printers (not at the same time, obviously!).  With and without an additional 1 meg and clock.

A1200 with external disk drive and a Canon BJ10sx printer.

     If TextView does not work correctly on your system, please contact me at the address below, describing your hardware and set-up.  I am also eager to hear from the users of TextView with bug reports, constructive criticisms and suggestions for improvement.  Remember that if you send me a blank disk I am prepared to send you the latest version of TextView, along with possibly some other programs.

Contact: Mr S. A. Adcock,
         1 Stile Close,
         Mulbarton,
         Norwich NR14 8BH

(Or, during term-time I can be emailed at S.A.Adcock@sheffield.ac.uk)

History
~~~~~~~
     0.1ß    Released 18/8/94.  Initial `skeleton' version of TextView.  It worked but only had the facilities to scroll through the text and print it.  Did not accept any CLI parameters and required the ASL.library. PAL only.  Control through gadgets only.  No documentation yet.

     0.2ß    Released 13/9/94.  Re-written using routines from version 0.1ß.  Search, jump gadgets incorporated.  Load routine improved (about 50% faster).  Pull-down menu added.  NTSC compatible (Although this hasn't been tested on a true NTSC machine)  Use of ASL.library made optional so compatibility with pre-WB 2.0 Amigas improved.  Optional auto-tidy of text and case-sensitive search and corresponding CLI parameters incorporated.  Option to close workbench added at last minute.  Release with documentation, however still only beta-test version.

     0.3ß    Released 28/9/94.  Minor bug causing program exit upon trying to scroll above top of text fixed.  Powerpacker support added (Hooray!).  Colours altered slightly.  Problem with `missing filerequesters' solved.  Current text no longer removed from memory if a new text file can not be opened.

     0.4ß    Released 26/6/95.  Powerpacker decrunch routine unstable and inefficient so removed until better decrunch routines can be developed.  Minor `tweaking' of code.

I have already started programming version 0.5ß, which will make better use of memory.  Hopefully this version will also have crunched file support.