home *** CD-ROM | disk | FTP | other *** search
Text File | 1980-01-01 | 52.4 KB | 1,492 lines |
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- BOX
-
- A Program for Creating
- and Editing Screen Images
-
- version 1.3
-
- (C) Copyright 1986,1987,1988 by Nescatunga Software
- All Rights Reserved
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- =======================================================
- BOX USER GUIDE PAGE 2
- =======================================================
-
-
- TABLE OF CONTENTS
-
-
- License and Registration Information..................3
- Introduction..........................................4
- Making Backup Copies..................................5
- Running BOX on a Floppy-Based System..................5
- Installing BOX on a Hard Disk.........................5
- Running BOX on a Hard Disk System.....................6
- The Main Menu.........................................6
- Draw Menu...........................................7
- Load from Disk......................................8
- Save to Disk........................................8
- ASCII File Format...................................9
- Memory File Format..................................9
- Packed File Format.................................10
- Path/Directory.....................................11
- Clear Screen.......................................11
- Exit Program.......................................11
- The Draw Menu Functions..............................12
- Type Labels........................................12
- Insert Mode (Ins)................................12
- Delete Line (F9).................................13
- Insert Line (F10)................................13
- Draw Boxes.........................................13
- Move...............................................14
- Color Change.......................................14
- Block Functions....................................15
- Select Box Drawing Style...........................16
- Repeat.............................................16
- Paint Areas........................................17
- Erase..............................................18
- On the Fly Changes.................................19
- ASCII Table.......................................19
- Turbo Pascal Programming Considerations..............20
- Displaying ASCII Format Screens....................20
- Displaying Memory Format Screens...................20
- Displaying Packed Format Screens...................21
- Using BOX Screens for Context Sensitive Help.......21
- Capturing screens from other programs with GRAB......23
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- =======================================================
- BOX USER GUIDE PAGE 3
- =======================================================
-
-
- LICENSE AND REGISTRATION
-
- Box is not a public domain program. Rather it is being
- distributed under the User Supported Software concept.
- The program has been copyrighted by the author who
- reserves all rights. You are granted a limited license
- to use and copy the program according to the terms
- below.
-
- As an individual you may freely copy the BOX program
- and its associated files for your evaluation and the
- evaluation of others so long as no price or other
- consideration is charged.
-
- Shareware distribution organizations may copy the BOX
- diskette and share it with their members so long as no
- price is charged other than a reasonable distribution
- fee not to exceed the cost of a diskette and handling.
-
- The program, associated files and documentation must
- always be distributed together. You may not modify the
- program or the documentation. You may not reprint the
- program manual in any way.
-
- Schools are granted permission by the author to copy
- BOX as many times as needed so long as the registration
- fee has been paid for each building the program will be
- used in.
-
-
- REGISTRATION FEE
-
- If you find BOX useful we ask that you register as a
- BOX user by sending $20.00 to:
-
- Nescatunga Software
- Box 5942
- Katy, TX 77450
-
- Although BOX is relatively small and tightly focused in
- its purpose, it represents many, many hours of work.
- We can continue to enhance BOX and develop other
- shareware products ONLY if you support the product and
- the shareware concept.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- =======================================================
- BOX USER GUIDE PAGE 4
- =======================================================
-
- INTRODUCTION
-
- Congratulations. You now have at your service the
- world's best screen designing tool. With BOX you can
- create in minutes the kind of flashy, professional-
- looking data entry screens and menus that would take
- hours with most editors.
-
- BOX is a screen editor. You start with a blank screen
- and, using special screen editing functions, type
- headings and text, paint, shade or erase in any color
- combination you desire. BOX has special functions such
- as REPEAT, PAINT and ASCII-Table-Selection which are
- tailored specifically to screen creation and far exceed
- what is available in other text editors. Drawing
- intricate intersecting boxes on the screen with the
- special box-drawing characters is literally child's
- play.
-
- After you have used BOX's screen editor to create a
- colorful, snazzy screen you then save the image using
- BOX's SAVE function. SAVE creates a disk file of your
- screen that you may load directly onto the screen from
- a Pascal or C program. Later if you have changes to
- make to the screen it is a snap to LOAD it back into
- BOX's editor and make the changes.
-
- Although BOX may sound like a graphics program, it is
- not. BOX uses regular ASCII characters so that any
- BOX-created screen may be displayed on any color or
- monochrome monitor.
-
- Applications for BOX include but are not limited to:
-
- Input screens for data base entry
- Menus
- Help Screens
- Program Logo screens
- Demonstration Screens
- Program Prototyping
- Computer "doodling"
-
- In addition to the BOX program the diskette contains
- sample routines you can incorporate in your Turbo
- Pascal programs. When you use these routines, the
- screens you create pop onto the monitor virtually
- instantaneously. These routines are not large or
- complicated and could easily be translated into other
- languages such as C.
-
-
-
-
-
-
-
-
-
-
-
-
-
- =======================================================
- BOX USER GUIDE PAGE 5
- =======================================================
-
-
- BOX will run on any IBM PC under DOS. Although BOX
- does use color to advantage (CGA or EGA adapters) it
- will also run on monochrome systems as well. We have
- tested BOX on several IBM compatible PCs and have
- discovered no problems. Be aware however that BOX
- incorporates several low-level functions which may not
- work on some IBM near-compatibles. Please let us know
- the nature of any problems you discover on your system.
-
- MAKING BACKUP COPIES
-
- BOX is not copy protected so make as many back-up
- copies as you think you will need. To make back-up
- copies or distribution copies for other users first
- boot up your computer with DOS. Place the BOX diskette
- in the A drive and a blank, formatted diskette in the B
- drive. At the A prompt type the following command to
- copy all files from the A diskette to the B diskette:
-
- A> COPY A:*.* B:
-
-
- RUNNING BOX ON A FLOPPY-BASED SYSTEM
-
- To use BOX on a floppy disk system first boot up your
- computer with DOS. Put the BOX diskette in the A drive
- and type the following command at the A prompt:
-
- A> BOX
-
- The BOX program should start by displaying a logo with
- a large word BOX outlined on the screen. Remember that
- BOX looks for its logo file and its help files on the
- same drive where it is started. So starting the
- program from another drive, as shown in the example
- below is wrong.
-
- B> A:BOX (Wrong)
-
-
- After you have started BOX you may change the data
- drive and/or directory where BOX stores and retrieves
- its data files.
-
- INSTALLING BOX ON A HARD DISK
-
- To install BOX on a hard disk first make a directory to
- hold the BOX program and associated files. Then, with
-
-
-
-
-
-
-
-
-
-
-
-
-
- =======================================================
- BOX USER GUIDE PAGE 6
- =======================================================
-
- the BOX diskette in the A drive, copy all BOX files to
- the directory:
-
- C> MD\BOXX
- C> CD\BOXX
- C> COPY A:*.* C:
-
- The three commands above will create a new directory
- named BOXX, change to that directory and copy all BOX
- files from the BOX diskette to the BOXX directory on
- the hard disk. If you would prefer to leave the BOX
- example programs on the disk then substitute the
- following COPY statements for the one above:
-
- C> COPY A:BOX.EXE C:
- C> COPY A:BOXHELP.* C:
- C> COPY A:BOXLOGO. C:
-
-
-
- RUNNING BOX ON A HARD DISK SYSTEM
-
- To start the BOX program, issue the following two
- commands to change to the BOXX directory and initiate
- the program:
-
- C> CD\BOXX
- C> BOX
-
- Remember that BOX must be started from the same
- directory and drive as its associated files. The drive
- and directory where screen-image files are stored and
- retrieved can be changed from BOX's Path/Directory
- command.
-
-
- THE MAIN MENU
-
- Even if you have limited experience with PC software
- you will find BOX a snap to use. BOX uses the
- following conventions which are standard with many
- popular software products:
-
- "Point and Shoot" Menus
- "Escape" for Menu
- "F1" for Help
-
- In fact, if you're in a hurry to try BOX, go ahead and
- fire it up. The program's user interface is intuitive
-
-
-
-
-
-
-
-
-
-
-
-
-
- =======================================================
- BOX USER GUIDE PAGE 7
- =======================================================
-
- and you will likely be using all of BOX's features
- (except for BOX's "on the fly" drawing changes which
- are well hidden) without reading this manual. However
- to get the most from BOX it is a good idea to come back
- and read this manual later to see if you may have
- missed a trick or two.
-
- If you get stuck running BOX just hit F1 for help.
- When you use BOX's help screens it is interesting to
- note that they were created with BOX and are displayed
- by Pascal routines similar to the routines shown later
- in this guide.
-
- The Main Menu appears when you start BOX. You will
- return to it to SAVE and LOAD files, to change the data
- PATH, to CLEAR the screen and to EXIT.
-
- To select the desired menu item move the reverse-video
- cursor with the up and down arrow keys. When you have
- selected the action you want hit the enter key to
- activate it.
-
- As an alternative you may select an item from the menu
- by hitting the first letter of the description. For
- example just hit the letter S if you want to select
- SAVE FILE from the main menu. Hitting the letter S is
- equivalent to placing the bar cursor on SAVE FILE and
- hitting enter. After you become familiar with the
- commands you will find this approach more efficient
- because it requires fewer keystrokes.
-
- Please note that the Esc key has special meaning under
- BOX's menus. Hitting Esc is the same as placing the
- bar cursor on the last item and hitting enter. Usually
- this will cause an EXIT to a higher menu. On the main
- menu however, hitting the Esc key will Exit the BOX
- program (after a safety prompt).
-
-
- DRAW MENU
-
- If you select DRAW MENU from the main menu, another
- menu will appear with a list of selections for drawing
- and painting boxes on the screen. From the DRAW menu
- you may :
-
- Type labels and text on the screen
- Draw boxes like an etch-a-sketch
- Move around the screen without drawing
-
-
-
-
-
-
-
-
-
-
-
-
-
- =======================================================
- BOX USER GUIDE PAGE 8
- =======================================================
-
- Change background and foreground colors
- Choose between four box drawing styles
- Repeat any character in any direction
- Paint the boxes any color (including blink)
- Erase lines drawn in error
-
-
- These seven functions make it easy, even fun, to create
- a screen image and draw and edit boxes and line shapes
- using the PC's special box drawing characters. I'll
- return to the DRAW menu later and cover each of the
- functions in detail. But first let's cover the other
- functions on the main menu.
-
- LOAD FROM DISK
-
- The Load function loads a screen image file you have
- saved previously with the SAVE TO DISK function
- described in the next section. To load a file first
- select the file format the original screen was saved
- under; either ASCII or Memory (see description under
- SAVE below). BOX will then display a directory of
- files on the current drive/path and prompt you for the
- file name. Type the file name you want to load and hit
- enter.
-
- If the file you want to load is not on the current
- drive/path you have two options. First you may hit
- escape to return to the main menu and there select
- PATH/DIRECTORY to change the drive/path then return to
- the LOAD screen to load the file. Or you may simply
- type the drive and directory prefix to the file name at
- the bottom of the LOAD screen.
-
- You may LOAD standard ASCII files created with other
- editors (including Turbo Pascal's) and word processors.
- But BOX will LOAD only the left most 80 characters of
- the first 25 lines. Take care not to LOAD a file
- longer than 25 lines then SAVE it with the same name.
- BOX will overwrite the original file but save only the
- first 25 lines. Any additional lines will be lost.
-
-
- SAVE TO DISK
-
- The save function writes a disk file containing the
- screen image you have created and edited with BOX's
- DRAW and TYPE functions. To use SAVE you must first
- select the file format and, when prompted, provide a
-
-
-
-
-
-
-
-
-
-
-
-
-
- =======================================================
- BOX USER GUIDE PAGE 9
- =======================================================
-
- file name. Please note that BOX remembers the last
- file name you used so if you LOADED a file, BOX will
- SAVE the modified screen under that same file name
- unless you change it.
-
-
- ASCII FILE FORMAT
-
- With BOX you may store a screen image in one of three
- different formats; the ASCII format, the Memory format
- and the Packed format.
-
- The ASCII format is the simpler and more standard of
- the three because it saves the screen in a text format
- that most word processors and editors (including Turbo
- Pascal's editor) recognize. ASCII files may therefore
- be further edited and printed with many other editors
- and word processors or included directly in you
- program's source code.
-
- However saving a BOX screen image in the ASCII format
- has some disadvantages. First, ASCII files lose all of
- the color attributes you may have drawn or painted on
- the screen. In addition ASCII screen images must be
- displayed line-by-line with write statements resulting
- in a slower display.
-
-
- MEMORY FILE FORMAT
-
- Memory format files, because they are essentially a
- snapshot "dump" of the video memory buffer, retain all
- color attributes (including blink) and can be instantly
- flashed on the screen using the code examples later in
- this manual. But unlike ASCII format files, memory
- files will look like gibberish to most editors and word
- processors. Usually this will present no problem since
- you can always edit memory format files with BOX.
-
- Many of the commonly available screen-capture programs
- use the Memory format. GRAB.COM, a program contained
- on the BOX disk, is a TSR (memory resident) screen-
- capture program which you can use to capture screen
- from other programs. When activated with ALT-PrtSc,
- GRAB saves the current screen image to the current disk
- drive in a Memory format. There are more instructions
- for using GRAB later in this documentation.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- =======================================================
- BOX USER GUIDE PAGE 10
- =======================================================
-
- PACKED FILE FORMAT
-
- Except for one difference, Packed format files are
- identical to Memory format files in that they retain
- all color attributes and can be popped on the display
- instantly. The difference is that Packed format files
- use a simple run-length-encoding algorithm to compress
- the size of the file when it is written to the disk.
- You can save considerable space by using Packed format
- files if your screens have several blank lines or
- bordered boxes.
-
- Memory format files always require 4000 bytes of
- storage. A typical Packed format file will require
- around 2000 bytes. You should be aware, however, that
- in extreme cases (where every other character is
- different for example) a Packed format file can
- actually be larger than 4000 characters. If you are
- not sure which format to use, save your screen under
- both formats with a different name then examine the
- size of the files with a Directory command.
-
- Another consideration of using Packed format files is
- that the Pascal screen loading procedure you must
- include in your program, because it must decode and
- expand the packed file, is more complicated than the
- simple procedure for a loading Memory format file. It
- takes just a trifle more time to load a Packed file,
- but not so much time as to make this a major
- consideration.
-
- You must decide which of the three formats gives the
- greatest advantage to your requirements.
-
- In saving BOX files you may use any file names you
- wish. Please note, however, that if you do not add
- file extensions (a period followed by three characters
- at the end of your file name) BOX will add them for you
- using the following conventions:
-
- ASCII files xxxxxxxx.ASC
- Memory files xxxxxxxx.MEM
- Packed files xxxxxxxx.PAK
-
- If you choose to use the conventions above for your
- file names, BOX will highlight any file names that
- match the format you are using when it displays the
- directory of files during LOADing.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- =======================================================
- BOX USER GUIDE PAGE 11
- =======================================================
-
- PATH/DIRECTORY
-
- With the PATH/DIRECTORY facility, which is available
- from the Main menu, you can see the current path and
- change the drive/path where BOX will store or retrieve
- screen-image files. BOX will display a directory of
- files on the selected drive/path when you enter the new
- drive/path. After you have typed in the drive/path
- where you want BOX files to be stored hit escape to set
- that path and return to the main menu.
-
-
- CLEAR SCREEN
-
- The CLEAR SCREEN choice on the main menu brings up a
- menu of CLEAR functions.
-
- CLEAR
-
- The CLEAR function erases all characters on the
- screen and sets the colors to those chosen. Use it
- when you have just saved a screen image and want to
- start with a fresh screen on another image or when
- you want to change the background from the default
- blue.
-
- COLOR CHANGE
-
- This choice on the CLEAR menu brings up a color
- smorgasbord for selecting the colors you wish to
- have on the cleared screen.
-
- FILL
-
- Select FILL to fill the entire screen with a
- character. An ASCII character selector box will pop
- up to allow you to select any of the 255 ASCII
- characters. With these characters you can create
- many interesting patterns.
-
- PAINT SCREEN
-
- PAINT changes the background and foreground colors
- on the screen but does not erase the characters.
-
-
- X EXIT
-
- Select EXIT on the main menu to leave the BOX program.
- If your last step was to SAVE a file, BOX will return
-
-
-
-
-
-
-
-
-
-
-
-
- =======================================================
- BOX USER GUIDE PAGE 12
- =======================================================
-
- control to DOS immediately. However if your last
- operation was not a SAVE, BOX will ask you if you
- really want to EXIT.
-
-
- THE DRAW MENU FUNCTIONS
-
- Now let's return to the DRAW MENU and examine each of
- its functions in more detail. When you select DRAW
- from the main menu, BOX will display a list of
- selections for drawing and painting boxes on the screen
- including:
-
- Type labels and text on the screen
- Draw boxes like an etch-a-sketch
- Move the cursor around the screen without drawing
- Change background and foreground colors
- Move or paint blocks on the screen
- Select from among four box drawing styles
- Repeat any character in any direction
- Paint the boxes any color (including blink)
- Erase lines drawn in error
-
-
- Let's cover each of these functions in order:
-
- TYPE LABELS
-
- TYPE, which is the first function on the DRAW Menu, is
- a simple, full-screen text editor you can use to type
- text on a screen image. After you have selected TYPE
- simply locate the cursor where you want it on the
- screen and type whatever text you need. Since BOX
- works with only one screen at a time the limits of the
- typing area is 80 characters wide by 25 lines long -- a
- full screen in 80 character text mode.
-
-
- INSERT MODE
-
- In the TYPE function you may toggle the insert mode on
- and off by hitting the Ins. key. A large block cursor
- indicates that Insert is on, a small line cursor
- indicates that Insert is off. If Insert is on, all
- characters to the right of the cursor will be pushed to
- the right when you type. BOX does not word wrap nor
- does it save the characters that you push off the
- screen. Please remember that if you have the insert
- mode on and you hit the enter key you will break the
-
-
-
-
-
-
-
-
-
-
-
-
-
- =======================================================
- BOX USER GUIDE PAGE 13
- =======================================================
-
- line at the cursor location and carry the tail of the
- line to a new line below. If insert mode is off the
- cursor will jump to the next line but it will not carry
- the tail of the line.
-
-
- DELETE LINE => F9
-
- To delete a line, place the cursor on the line you wish
- to delete and hit F9. All lines below the deleted line
- are brought up one line and a blank line will be
- inserted at the bottom of the screen. The blank line
- will be in the current color scheme.
-
-
- INSERT LINE => F10
-
- To insert a blank line, place the cursor just below the
- location you want the line inserted and hit F10. All
- lines below the inserted line will be pushed down one
- and the last line of the screen will be lost.
-
-
- DRAW BOXES
-
- Select DRAW BOXES from the DRAW MENU to draw lines and
- boxes using the arrow keys on the cursor control pad.
- Boxes will be drawn with the box drawing characters
- which are part of the extended ASCII character set
- which have codes between 179 and 218. There are 40
- different characters with which you can draw single and
- double-line boxes. If you have ever designed a screen
- by entering the characters one at a time you know how
- tedious and time consuming it is. BOX allows you to
- throw away the list of ASCII codes and draw precise,
- colorful boxes with one finger.
-
- Think of DRAW as lowering a drawing pen onto the
- drawing pad (the screen). Lines will follow wherever
- you direct the cursor--up, down, left or right. DRAW
- will use whatever colors and box style you have
- previously selected. So you may wish to select COLOR
- CHANGE and BOX CHANGE from the DRAW MENU before you
- select DRAW. The entire screen of 80 characters wide
- by 25 lines high is available to you.
-
- One of the most interesting routines in the BOX program
- examines the screen around the line you are drawing to
- determine if a special intersection character is needed
-
-
-
-
-
-
-
-
-
-
-
-
-
- =======================================================
- BOX USER GUIDE PAGE 14
- =======================================================
-
- to patch the box you are currently drawing with other
- boxes you may have previously drawn. There are 40 box
- drawing characters to cover nearly every conceivable
- intersection combination. However you should be
- advised that there are some intersections you can
- create for which there is no available ASCII character.
- We have tested BOX thoroughly and believe that BOX will
- find the proper intersection character if one exists.
-
-
- MOVE
-
- MOVE is the opposite of DRAW. MOVE lifts the box-
- drawing pen so that you may move the cursor with the
- arrow keys to a new location without trailing a line
- behind you. When you have moved the cursor to the new
- location, select DRAW to start drawing again. You may
- also move the cursor without drawing if you select the
- TYPE function from the menu.
-
-
- COLOR CHANGE
-
- When you select COLOR CHANGE from the DRAW MENU a color
- selection smorgasbord will appear on the screen. To
- select the colors you want simply use the up and down
- arrow keys to select Foreground or Background and the
- left and right arrow keys to select the color. A small
- arrow will move over the chart showing you which color
- you have picked and a sample of the colors will appear
- to the right of the display.
-
- Note that you may select from sixteen foreground and
- sixteen background colors. The second eight background
- colors are not really colors but cause the foreground
- characters to blink by turning on the blink bit in the
- color attribute byte. A little bit of blink, like hot
- pepper sauce, goes a long way.
-
- The color combination you select will stay in effect
- for the rest of the BOX session or until you change it
- regardless of whether you are typing text, drawing
- boxes or painting. If you want the background of the
- screen a different color than it is you may return to
- the main menu and select CLEAR or you may use the PAINT
- function from the DRAW menu.
-
- Be sure you don't select the same background and
- foreground colors. If you do everything you draw or
-
-
-
-
-
-
-
-
-
-
-
-
-
- =======================================================
- BOX USER GUIDE PAGE 15
- =======================================================
-
- type will be invisible. If this happens hit Esc. to
- start again.
-
-
- BLOCK FUNCTIONS
-
- When you select BLOCK from the Draw menu, your first
- step is to identify the portion of the screen, or the
- block, you want to work with. Do this by moving the
- cursor to one corner of the block and hitting enter,
- then moving the cursor to the opposite corner of the
- block and hitting enter again. After you anchor the
- cursor on the first corner the program will highlight
- the block area by displaying it in reverse video.
-
- After you have identified the block size, the program
- will display a submenu of functions.
-
- MOVE BLOCK
-
- If you select MOVE BLOCK from the BLOCK menu simply
- use the cursor keys to move the identified block
- around the screen until you have placed it where you
- want it. Hit enter to position the block. The area
- where the original block was located is blanked out.
-
- CLONE BLOCK
-
- CLONE BLOCK is the same as MOVE BLOCK except that
- the original block is not blanked out but is left
- intact. So if you have created a fancy small
- pattern in one area of the screen that you want to
- repeat at other locations, use CLONE to move it.
-
- PAINT BLOCK
-
- PAINT allows you to change the background and
- foreground colors of the selected block area of the
- screen. Other PAINT functions are semi-automatic
- and operate on the interior of box lines, for
- example. But BLOCK PAINT allows great control over
- the PAINTing process.
-
- BLANK BLOCK
-
- This function blanks the selected area of the
- screen.
-
- DEFINE NEXT BLOCK
-
-
-
-
-
-
-
-
-
-
-
-
-
- =======================================================
- BOX USER GUIDE PAGE 16
- =======================================================
-
-
- Use DEFINE to select another area of the screen for
- block operations.
-
-
- SELECT BOX-DRAWING STYLE
-
- Returning now to functions available from the main DRAW
- menu, the SELECT BOX TYPE facility allows you to select
- from among double line, single line or combination
- single/double line boxes. Simply pick the one you
- like. The box type you select will stay in effect
- until you change it even if you are not drawing. One
- small quirk in using the SELECT menu is that if you hit
- Esc while in the menu, you will have selected box type
- 4, the last on the list. So use the numbers to select
- the type you want or put the cursor on the box type and
- hit enter.
-
-
- REPEAT
-
- The REPEAT function has two parts. First REPEAT will
- allow you to enter the character you want to repeat.
- Then REPEAT will pause while you position the cursor
- anywhere on the screen. When you have positioned the
- cursor where you want it, hit enter to trigger the
- REPEAT function. You may now "draw" the repeat
- character any direction using the arrow keys. REPEAT
- works just like DRAW except you get to select any of
- the PC's 255 characters to draw with.
-
- You have the option of entering the repeat character
- from the keyboard or selecting the character from an
- ASCII Table. If the character you want to repeat is on
- the keyboard it is more efficient to enter it from
- there. But if the character you want is not on the
- keyboard you may select the character from the ASCII
- Table.
-
- When you select the ASCII Table option a window will
- pop up on the right side of the screen which contains
- 64 of the PC's 255 characters. A small box will
- surround the currently selected character. Move the
- small box with the arrow keys to select the character
- you want to repeat. Use the Up and Down arrow keys and
- PageDown and PageUp keys to scroll the ASCII table.
- Hit enter to select a character or escape to abort the
- REPEAT function.
-
-
-
-
-
-
-
-
-
-
-
-
-
- =======================================================
- BOX USER GUIDE PAGE 17
- =======================================================
-
-
- Note that the character you have selected from the
- ASCII Table stays at-the-ready for later Repeat-Drawing
- if you need it. Just hit ALT-R to invoke the on-the-
- fly repeat function and you can "draw" the last-
- selected ASCII character in any direction. The ASCII
- Table can also be brought up On-the-fly by hitting ALT-
- A.
-
-
- PAINT AREAS
-
- The PAINT function contains several choices for
- painting parts or all of the screen different colors.
-
- COLOR
-
- Before selecting any of the paint functions it is
- necessary to choose the background and foreground
- colors you want the painted area to be. The COLOR
- smorgasbord allows the color selection.
-
- INTERIOR PAINT
-
- This function paints the interior of boxes the
- selected color but stops painting on the box
- boundary. To use the function move the cursor
- inside the box to be painted and hit enter. PAINT
- will start from the cursor position painting in
- every direction until it hits the box lines. Make
- sure there are no gaps in the box because PAINT will
- leak through the gap and paint the entire screen.
-
- LINE PAINT
-
- This function will follow any boxes or lines you
- have drawn and paint them the color you have
- selected. Put the cursor on the line you want to
- paint and hit enter.
-
- SCREEN PAINT
-
- Choose this function to change the colors of the
- entire screen.
-
- FILL
-
- The FILL function fills the area selected with a
- character of your choice. When you select the
-
-
-
-
-
-
-
-
-
-
-
-
-
- =======================================================
- BOX USER GUIDE PAGE 18
- =======================================================
-
- function an ASCII selector table will pop up for
- character selection and you will be prompted to move
- the cursor inside the area to be filled. FILL will
- not leak into or out of boxes. The function is
- often used to create attractive background patterns
- around windows on the screen.
-
- These PAINT functions sounds complicated but play with
- them a while and you will get the hang of them right
- away. Just remember that if you select the same
- background color that you have in the box to start
- with, PAINT will appear as if it is not working if
- there are no typed labels in the box.
-
- With the exception of the FILL function, the PAINT
- functions do not destroy characters you have typed on
- the screen. They simply change the color attributes.
- This fact can be used to advantage if you want to leave
- the background color the same but change the
- foreground. For example if you have white characters
- on a blue background and you wish to have yellow
- characters on the same blue background then simply
- select yellow on blue and paint the area you want to
- change.
-
- The PAINT functions test to see if they have completed
- their tasks by looking at the colors all around where
- they starts. If the colors there are the desired PAINT
- colors the function thinks it is done and does no
- further processing. So be sure to move the cursor into
- an area that is not the paint color to start.
-
- If you have several areas to paint the same color move
- the cursor into the next area and hit ALT-P to invoke
- the on-the-fly PAINT function.
-
-
- ERASE
-
- While you are drawing, sooner or later you will turn a
- corner too soon or make some other mistake. To correct
- these mistakes, select ERASE. In essence, ERASE writes
- a blank character wherever the cursor is directed.
- ERASE does not restore the background color to what it
- was before. To accomplish this you must make a color
- change before you start ERASING.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- =======================================================
- BOX USER GUIDE PAGE 19
- =======================================================
-
- ON THE FLY CHANGES
-
- After you become familiar with the DRAW MENU functions
- and memorize the initials -- D for DRAW, M for MOVE and
- so on -- you will want to take advantage of the ON THE
- FLY CHANGES. This facility allows you to change
- drawing functions on-the-fly while you are drawing
- simply by pressing a key. When you use this feature
- there is no need to return to the menu and select
- another function.
-
- For example while you are drawing a box you can hit
- ALT-M and BOX immediately switches you into the MOVE
- function. You may then move the cursor a few spaces,
- hit ALT-D and you're drawing a new box. ON-THE-FLY
- functions are quick and powerful but they happen
- without fanfare so you will have to remember what you
- are doing.
-
- ON THE FLY functions duplicate those available from the
- menu except for PAINT and REPEAT which work slightly
- differently. In their ON-THE-FLY forms PAINT and
- REPEAT are toggle functions you may turn on and off.
- For example if you are DRAWING you could hit ALT-M for
- MOVE, move the cursor inside a box and then hit ALT-P
- to toggle PAINT on and PAINT the box. This procedure
- varies from the three-part PAINT and REPEAT sequence
- the program steps you through when these functions are
- selected from the menu.
-
- ON-THE-FLY FUNCTIONS AVAILABLE
-
- ALT-T = TYPE LABELS
- ALT-D = DRAW BOXES
- ALT-M = MOVE
- ALT-C = COLOR CHANGE
- ALT-B = BLOCK FUNCTIONS
- ALT-S = SELECT BOX TYPE
- ALT-E = ERASE
- ALT-A = ASCII TABLE
-
- ALT-R = REPEAT (TOGGLE ONLY)
- ALT-P = PAINT (TOGGLE ONLY)
-
-
-
- ASCII TABLE (ALT-A)
-
- One unique on-the-fly function that is not directly
- available from the menu (it is available indirectly
-
-
-
-
-
-
-
-
-
-
-
-
- =======================================================
- BOX USER GUIDE PAGE 20
- =======================================================
-
- from the REPEAT function) is the ASCII Table. If you
- want to use one of the upper or lower ASCII characters
- which cannot be entered from the keyboard on the
- screen, simply hit ALT-A. An ASCII Table will pop up
- on the right side of the screen with a selector box
- that you move with the arrow keys. Move the selector
- box over the character you want, scrolling with the
- arrow keys or PageDown or PageUp if necessary, then hit
- enter to select. The ASCII table will disappear and
- the character you selected will be printed on the
- screen at the last cursor position.
-
- The ASCII character you last selected from the ASCII
- table will stay at-the-ready to be used in the REPEAT
- function. To select the on-the-fly REPEAT function hit
- ALT-R. This combination of ASCII Table selection and
- REPEAT is a very powerful facility to create
- interesting and unusual effects with some of the
- "strange" ASCII characters. Some amazing displays can
- be created using the block and shading characters in
- unusual color combinations. The possibilities for
- attention-getting program logo screens are endless.
-
-
- TURBO PASCAL PROGRAMMING CONSIDERATIONS
-
- Creating screen images with BOX is easy and fun. But
- the real payoff comes when you incorporate your
- masterpieces in a program. Displaying and using BOX-
- created screens in your Turbo Pascal programs is easy
- with the example routines contained in file
- EXAMPLE1.PAS on your disk and described below. Please
- note that all example programs have been converted to
- Turbo Pascal 4.0 but, since only a few changes were
- required, may be converted back to 3.0 easily.
-
-
- DISPLAYING ASCII FORMAT SCREENS
-
- To display ASCII format screens created with the BOX
- editor, add a procedure to your program which reads the
- file produced by BOX and displays it line by line. The
- example routine LOAD_ASCII contained on your BOX
- diskette in file FILES.PAS will give you the idea.
- Copy and use the procedure in your own programs.
-
- DISPLAYING MEMORY FORMAT SCREENS
-
- To display a screen you have saved under the memory
- format you must read in the BOX-created file and move
-
-
-
-
-
-
-
-
-
-
-
-
- =======================================================
- BOX USER GUIDE PAGE 21
- =======================================================
-
- the contents of the file directly into the Video
- display memory buffer. This buffer is located at
- memory address B800 (hex) for the color (CGA or EGA)
- adapters and at memory address B000 (hex) for the
- monochrome adapter.
-
- If you're not particularly interested in the
- technicalities of the video display, don't worry. Just
- incorporate the procedures CHECKCOLOR and LOAD_MEM from
- the file EXAMPLE1.PAS in your programs to read in a
- memory format file and display it on the screen. The
- screen should look just as you created it with BOX --
- boxes, colors, blink and all. After you have displayed
- the screen you are free to write on it with normal
- Pascal Write statements.
-
- DISPLAYING PACKED FORMAT SCREENS
-
- Displaying a Packed format screen is similar to
- displaying a Memory format screen except the packed
- screen file must be unpacked before it can be
- displayed. A Packed format file uses a simple run
- length encoding structure. The idea is that if there
- are 20 blanks in a row on the screen, the Packed format
- just saves the blank character once along with the run
- length of 20.
-
- After the Packed format file has been unpacked it looks
- just like a Memory format file and may then be moved
- directly into the video memory buffer as described
- above. The example procedure LOAD_PAK contained on
- your disk in file EXAMPLE1.PAS will show you how. As
- with LOAD_MEM above you will need to check which video
- adapter is present with CHECKCOLOR to load the unpacked
- screen into either the color video buffer location or
- the monochrome video buffer location.
-
-
- USING BOX SCREENS FOR CONTEXT SENSITIVE HELP
-
- It is easy to create a context-sensitive help facility
- in your Turbo Pascal program with the BOX screen editor
- and a few simple routines such as those contained on
- the BOX diskette in file EXAMPLE2.PAS.
-
- The first step is to decide how many help screens you
- need and during what processing steps you want the help
- screens to display. There is no need to be skimpy on
- the number of help screens because you need not store
-
-
-
-
-
-
-
-
-
-
-
-
-
- =======================================================
- BOX USER GUIDE PAGE 22
- =======================================================
-
- them in your program but rather you may store them on
- disk and called them in as needed.
-
- First, use the BOX editor to create each of the help
- screens. You may enter text, draw lines, use different
- colors and get as fancy as you wish. After you have
- completed each help screen save it using a memory or
- packed format.
-
- Now turn to your Turbo Pascal program. You will need
- to make several minor additions and modifications to
- tailor the help facility. First, from file
- EXAMPLE2.PAS, copy PROCEDURE HELPMSG (along with any
- other procedures and functions you decide to use) into
- your program. In PROCEDURE HELPMSG delete the help
- screen file names referenced there and add your own.
- You may have to extend the case statement to cover more
- than four help screens.
-
- Next, assign values to the variable HELPCONTEXT at
- various locations in your program corresponding to the
- help screen you want to display. For example if the
- help screen for your EDIT function is EDITHELP.MEM and
- you have assigned it position No. 2 in the HELPMSG case
- statement then be sure to set HELPCONTEXT := 2; in the
- first few statements of your EDIT Procedure.
-
- Now all that's left is to intercept each keystroke as
- it is entered and check it to see if the user has
- pressed F1 (or whatever you wish the help key to be).
- If the user has pressed the help key then your program
- should call HELPMSG to display the appropriate help
- screen. This feat is relatively easy if you are
- reading in one keystroke at a time. The function
- NEXTKEY in EXAMPLE2.PAS shows you how. But it is a bit
- more difficult to trap the help keystroke if you're
- using Turbo's read statement to read in an entire field
- at one time. If you really want slick context-
- sensitive help you must write your own IO routines
- examining each character as it comes in. This is not
- as tough as it sounds.
-
- That's all there is to it. If the user hits F1 any
- time during the execution of the program, HELPMSG and
- the other routines will do all the work. The right
- help screen will flash on the monitor and, when the
- user hits a key, will disappear leaving him at the
- exact spot he was when he asked for help.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- =======================================================
- BOX USER GUIDE PAGE 23
- =======================================================
-
- CAPTURING SCREENS FROM OTHER PROGRAMS WITH GRAB
-
- On the BOX disk you will find the program GRAB.COM, a
- memory-resident screen capturing program. GRAB is a
- program that, when activated by pressing the ALT key
- and the PrtSc key simultaneously, saves the current
- screen image to disk under BOX's Memory format. You
- can use GRAB to capture screens from other programs and
- later modify those screens using the BOX editor and
- incorporate the screens into your own programs.
-
- To use GRAB first run the program by typing GRAB at the
- DOS prompt. GRAB will print a short message confirming
- that it has been loaded. You may now proceed to run
- any other program you wish. Whenever you want to save
- the screen image hit the ALT-PrtSc keys and GRAB will
- create a Memory format file containing the screen image
- on the current disk drive. If the drive or directory
- has been changed by the program or the batch file, GRAB
- will write to the new drive and directory. Later you
- can copy the files to whatever directory you wish. It
- is a good idea to wait until the program you are
- running is stable (i.e. waiting for a keystroke) before
- trying to capture the screen.
-
- When GRAB saves the screen it assigns a file name using
- the convention BOXnnn.MEM. The nnn portion of the file
- name starts with 000 and is incremented by one for each
- file saved. So the first file will be named
- BOX000.MEM, the second BOX001.MEM and so on.
-
- GRAB saves files only in the Memory format but it is
- easy to covert the file format later with BOX. Simply
- LOAD the file using a Memory format and SAVE the file
- using an ASCII or Packed format.