10/11/89 Screen Designer Version 2.89 Copyright (C) 1987, 1988, 1989 by Michael W. Cocke A Tool for Designing Screen Displays This program is being distributed under the `shareware' concept. You are freely encouraged to copy and distribute this program, provided that no changes are made to either the program or the documentation. This means that you can down- load this program from a bulletin board, get it through a mail order house, or copy it from a friend. If you don't find it worthwhile, you won't have risked anything. But, if you do find it useful, all I ask is that you send me a check for just $15.00. This buys you to a new copy of the program, WITH ALL updates. It will also buy you some peace of mind. I'm one person, not a giant software company, and the check you send may make the difference between feeding my cat this week and not feeding my cat this week. By the way, if you register one version, I don't ask that you keep registering for each upgrade, just download the newest version from your local BBS. Please send a check for $15.00 to: Michael Cocke 11 Cedar Road Montville NJ 07045 Thank You, Mike Hacker Central BBS (201)334-2555 300/1200/2400 baud 8N1 24 hours. ---> Royalty-FREE Source code available for $100.00 (U.S.) <--- Write for details. Technical support, upgrades and requests available upon payment of $ 15.00 (U.S.) registration fee. What is SCREEN DESIGNER: SCREEN DESIGNER is a program created to aid you in designing and producing screens for batch files, pro- grams, and, if you have the right printer, title pages for word processor documents and spreadsheets. Screen Designer was especially designed for programmers. Whether you program in BASIC, Dbase or C, probably the worst part of the job is 'prettifying' the screens. Screen Designer has a programmer's interface that allows you to draw the screen image you want, and then export it (formatted properly !) into your source code. I originally wrote Screen Designer because I work in 3-4 different languages, and the only common denominator is that graphics is DAMNED difficult in all of them. The graphics that SCREEN DESIGNER creates can be used on color or monochrome video systems, and on IBM (tm) compatible graphics printers. To give you an idea of some of the uses of SCREEN DE- SIGNER, all of the help screens and title pages embedded in the Screen Designer program were created using the program. How to run SCREEN DESIGNER: SCREEN DESIGNER was designed to work on a monochrome, CGA, EGA, VGA or PGA equipped IBM (tm) compatible com- puter, with at least 640K Ram and one floppy disk drive. To run the program, all you need to do is type 'SD289' at the DOS prompt, and press . If you wish to automatically load a file into the Screen Designer when you start it, simply start the program by typing 'SD289 filename.txt' After the two opening screens display, this file will be loaded just as if you had selected the load command from the file sub-menu. How to use SCREEN DESIGNER: The Main Editor Screen This is the screen where you do the actual drawing, typing, etc. of your screen image. In addition to all of the function keys (explained below), the backspace, insert, delete, tab, return, and cursor keys all work normally. The other keys that work here are: + Insert a new line at the current line. + Delete the current line. + Center screen contents horizontal- ly. + Center current line contents hori- zontally. The horizontal center is a little tricky since boxes are multi-line constructs. Rather than try to explain what happens if there are two boxes of different heights on the same set of lines, I will suggest you try it. The insert and delete keys can be used to modify the results, if desired. You might want to do some experimenting here. + Center screen contents vertically. + Pops up a ruler line on whatever line the cursor is currently on. This WILL NOT Destroy the screen contents. To get rid of the ruler and restore your screen, do another +. + Erase to the left of the curser. + Erase to the right of the curser. + Erase to the top of the curser. + Erase to the bottom of the curser. In addition to the keys listed above, the following keys are used with the 'box' capability. Mark the upper left corner of a single line box. + Mark the upper left corner of a double line box. + Mark the upper left corner of a special box. Mark the lower right corner of all boxes. Screen Wrap The screen wraps in all directions. This means that if you move the cursor off the right side of the screen, it will reappear on the left side, one line down. If you move the cursor off the top of the screen, it will reappear on the bottom of the screen in the same column. The screen also wraps diagonally, so that if you run the cursor off the lower right corner of the screen, it will reappear in the upper left corner. It is NOT possible to edit more than one screen at a time. The Box Capability There is a sophisticated auto-box routine built into SCREEN DESIGNER, which will allow you to draw boxes of many different sizes and styles. All you need to do is mark the upper left corner of where you want to draw a box, using one of the key combinations listed above. Then move the cursor to where you wish the lower right corner of the box, and press . Presto, a box of the desired type and size! There are three separate box patterns available at any time in SCREEN DESIGNER. They are the SINGLE BOX, the DOUBLE BOX and the SPECIAL BOX. The single box is a single line box (-). The double box is a double line box (=). The special box is one of a number of possi- ble patterns. There are eight predefined special boxes (that was the number of keys I had left over), and a user-defined option to allow you to set any type of box pattern you might wish. As of version 2.11, there is also an 'intersection mode' to simplify making intersections in the lines and boxes. Tee intersections for all four sides are supported, as are X type intersections (four way). These are available in both one and two line patterns. Mixed type patterns are not supported yet (I'm running out of keys!). The Function Keys SCREEN DESIGNER makes use of the programmable function keys, F1-F10, in all of the sub-menu screens, as well as in the main edit screen and the line draw screen. Some of the function keys 'toggle' an effect. In the case of such a toggle key, the function key label (on line 25 of the screen) will change to show what press- ing the key will do. The labels always indicate what pressing the key WILL do; they do NOT show the cur- rent function of the key. Function Keys from the Main Edit Screen --------------------------------------- F1 Main screen help F2 File utilities F3 Special box design F4 Programmers utility F5 Intersections F6 Line drawing mode F7 Screen redraw F8 Graphics mode F9 Restart the program F10 Exit the program F1 - HELP --------- The F1 key ALWAYS displays a help screen. There are help screens for each of the sub menus, the main edit screen, and the line draw screen. | Except in Graphics mode, the graphics mode help | screen is displayed by pressing +'H'. F2 - File Utilities Menu ------------------------ The function keys that are used in this menu are: F1 File Menu Help F2 File Load F3 File Save F4 Directory List F10 Return to the Main Edit Screen F1 - File Menu Help This key is used to provide a quick reference to the file menu. F2 - File Load This key is used to load an already existing file for further editing. After pressing F2, you will be asked to enter the filename you want to edit. If you enter a filename longer than 12 characters, you will be asked to try again. If you press without entering any filename, you will be returned to the Main Editor Screen. The files are saved as normal ASCII text files, so you should be able to edit them with any word processor that supports a plain ASCII mode (such as Wordstar (in NON-document mode) or the editors in Turbo Pascal (tm) or Quickbasic (tm)). F3 - File Save This key is used to save a file that you have created. After you have pressed F2, you will be asked to enter the filename you want to save. If you enter a file- name longer than 12 characters, you will be asked to try again. If you press without entering any filename, you will be returned to the Main Editor Screen. The files are saved as normal ASCII text files, so you should be able to edit them with any word processor that supports a plain ASCII mode (such as Wordstar (in NON-document mode) or the editors in Turbo Pascal (tm) or Quickbasic (tm)). F4 - Directory List This key is used to list the files in the current directory. The display stops every 24 lines and displays 'Press to continue' F10 - Return to Main Editor Screen This key is used to return to the Main Edit Screen. F3 - Alternate Box ------------------ This is how you design your 'special' box. The menu for selecting among the predefined boxes is self- explanatory. The screen will display the different box patterns along with a number for each one. Simply press the corresponding number and the correct pattern will be generated. If the user-defined box option is chosen (number 8), a new screen will appear. The left side of the screen shows a listing of keys with the corresponding charac- ter generated by each key. The right side of the screen prompts the user for the characters that will make up the various corners and sides of the user- defined box. Pressing after each selection will move to the next prompt. UL stands for Upper Left, UR stands for Upper Right, LL is Lower Left, LR is Lower Right. VS is the verti- cal Side and HS is the Horizontal Side. These charac- ters are entered by typing the standard ASCII key shown to the left of the graphics characters on the chart that is displayed on the screen. Programmer Interface -------------------- This is the function of the program that caused me to write SCREEN DESIGNER. I tend to write truly horrible screen interfaces. This is because, like many pro- grammers, I'm more concerned with the program than with its appearance. SCREEN DESIGNER is designed to remedy those appalling interfaces. I have tried to make this function non-language specific, as I work in several different programming languages. As written, this function is adequate for BASIC, C, Dbase and PASCAL coding conventions. I haven't tested any other languages with it. Suggestions and comments are welcome. Please note that as of version 2.85, the programmers inter- face has been completely rewritten. There are three func- tion keys that are available from the programmers interface, and they work slightly differently than you would expect. When using one of the function keys from inside of the programmers interface, you must press after press- ing the function key. I know it's weird - yell at Micro- soft! F1 will display a series of help screens. F2 will 'pop-up' the presets. (more about this later) F10 will return you to the main editor screen. Presets ------- The preset capability is designed to allow you to save the answers to the format questionnaire, and to reuse the saved answers without you having to reenter the same information over & over again. To save a preset: ----------------- Answer all of the questions as you normally would. (see the detailed discussion below.) When you are asked for the name of the filename to save the format- ted output to, press , then press . The preset window will pop-up. Press 'S' to Save a pre- set. Select the number that you wish to save that preset as. (you are allowed presets 1 - 10). You will be asked to enter a description of that preset, You may enter up to 30 characters. The preset will be saved, and you will be returned to the main editor screen. The formatted file WILL NOT be produced! To use a preset: ---------------- When you are asked if you wish the output lines to be numbered (see detailed discussion below.), press and then press . The preset window will pop- up. Press 'U' to Use a preset. Select the number of the preset that you wish to use. (you are allowed presets 1 - 10) and press . You will then be asked for the name of the file that you wish to write the formatted output to. After the file has been written, you will be returned to the main editor screen. Note that the F1 (Help) and F10 (return to main edi- tor) keys will work at any point during this proce- dure. The format questionnaire ------------------------ You are asked a number of questions in this section, a detailed discussion follows. Number Lines (Y/N): Do you wish to have each line of the screen image numbered? For instance, GWBASIC requires line num- bers, QUICKBASIC considers them optional, and C doesn't want to consider the prospect of numbered lines. If you answer this question 'yes' you will be asked for a starting number, and an increment between line numbers. Next, the question 'Right Trim (Y/N)' will be dis- played. This is asking you if you wish to trim trailing blanks from the right side of the screen image. All other formatting will work properly in either mode, this is for people using non-standard width screens. The message "DO NOT ENTER QUOTES FOR THE FOLLOWING 2 QUESTIONS" will be displayed. If you are working in BASIC or a similar language which requires PRINT statements to be quoted, DO NOT type quotes (") here! I guarantee that the program WILL malfunction. The message 'The '^" character will be replaced with the physical line number in the following statements.' will display. This is intended for languages support- ing a 'print at location' statement. Entering a caret (^) in either of the next two lines will create a file formatted as you request, with the caret (^) being replaced by the physical line number for each line of the screen image. Example: page=0:row=^:col=4:scrmode=1:st$= will produce a file formatted thus; page=0:row=1-25:col=4:scrmode=1:st$= etc. The message 'Begin lines with:' will be displayed, this is the programming language statement you wish to have each line begin with. for example, if program- ming in BASIC, the answer would be 'PRINT' ** Please note that Compound statements under Basic ARE supported. The message 'End lines with:' will be displayed, this is the programming language statement you wish to have each line end with. for example, in C you could use this capability in PRINTF statements. ** Please note that Compound statements under Basic ARE supported. Next you will be asked for; 'Offset from top for line counter metacharacter (0 = none)' This rather indecipherable message relates back to the caret (^) we discussed above. Normally the lines will be numbered 1 to 25. If, for some reason, you need them numbered 5 to 30, enter an offset of 5. In short, this is the number you wish added to the physi- cal line number in your output file. (The curious may wish to know why I phrased this question in this fashion. The answer is that my XENIX is showing.) Next you will be asked if you need to have screen lines quoted, this is a yes/no question. The opening quotes will be inserted AFTER the 'begin lines with' field , and the closing quotes will be inserted BEFORE the 'end lines with' field. (BASIC programmers, the answer is YES) The next question that you will be asked is "Active area (topmost) only (y/n)" This question is asking if you wish all 25 lines output, or only the lines from 1 to the last non-blank line. For example, if you have a screen image that only uses lines 1 - 8, do you wish to output only 8 lines of formatted output, or do you need to fill the rest of the screen with nulls? The last question you will be asked is for the name of the file you wish to save the formatted screen image in. If you supply the name of a file that already exists, it will be OVERWRITTEN. If you enter a filename longer than 12 characters, you will be asked to try again. If you press without entering any filename, you will be returned to the Main Editor Screen. The files are saved as normal ASCII text files, so you should be able to edit them with any word processor. Important note regarding DOS versions: With the addition of the preset capability, the version of DOS that you run Screen Designer under matters! As written, the preset file will be maintained in the same directory that the Screen Designer executable files are located in, even if you have it in your path and call it from multiple subdirec- tories. IF YOU ARE USING A DOS VERSION PRIOR TO 3.x, THIS WILL NOT WORK! Screen Designer will check the version of DOS you are using, and if you are using 2.x, the presets file will be maintained in the CURRENT subdirectory. F5 - Intersection mode ----------------------- Intersection mode is designed to place an 'intersection' character at the current cursor position. The way it works is: 1) Position the cursor where you want an intersection. 2) Press the F5 key. 3) Press any one of the following keys; w, W, a, A, s, S, z, Z, x, X (This is going to be a little difficult.....) Visualize the WASZ diamond on your keyboard as being representative of the four sides of a square. Lower case supplies single line intersections appropriate to the side of the square being repre- sented by the appropriate key, upper case gives double lines. The x or X key does a 'four way' intersection. I suggest a little experimentation. F6 - Line Draw Mode ------------------- The function keys used from this menu are: F1 Line Draw Help F2 Single / Double Line Toggle F3 Pen Up / Down Toggle F4 Redraw the Screen F5 Intersection Mode F10 Return to the Main Editor Screen All of the cursor arrow keys work normally (SEE NOTE BELOW), as do the backspace, tab, return, insert and delete keys. The other keys that work here are: + Pops up a ruler line on whatever line the cursor is currently on. This WILL NOT Destroy the screen contents. To get rid of the ruler and restore your screen, just do a 'Screen Redraw'. + Erase to the left of the cursor. + Erase to the right of the cursor. + Erase to the top of the cursor. + Erase to the bottom of the cursor. NOTE: The cursor keys work as marked when the pen is UP. When the pen is down, a line of the selected type is drawn by the cursor. F1 - Line Draw Help This key is used to provide a quick reference to the Line Draw Screen. F2 - Single / Double Line Toggle This key toggles between single line (-) and double line (=) mode. Note that the function key line changes to indicate what pressing the toggle key WILL do, not the current status of the toggle key. F3 - Pen Up / Down Toggle This key toggles between pen up (cursor movement) and pen down (line drawing modes. The lines are actually drawn by moving the cursor (with the arrow keys) while the pen is DOWN. Appropriate corners will be supplied automatically. (Well, within limits - the program is not omniscient.) F4 - Redraw the Screen This key is used to redraw the screen after a RAM- resident program has messed it up. It is also useful for getting rid of the ruler line. F5 - Intersection mode Intersection mode is designed to place an 'intersec- tion' character at the current cursor position. The way it works is: 1) Position the cursor where you want an intersection. 2) Press the F5 key. 3) Press any one of the following keys; w, W, a, A, s, S, z, Z, x, X (This is going to be a little difficult.....) visualize the WASZ diamond on your keyboard as being representative of the four sides of a square. Lower case supplies single line intersections appropriate to the side of the square being represented by the appro- priate key, upper case gives double lines. The x or X key does a 'four way' intersection. I suggest a little experimentation. F10 - Return to main Editor Screen This key returns you to the Main Edit Screen. F7 - Redraw the Screen ----------------------- This key is used to redraw the screen after a RAM- resident program has messed it up. It is also useful for getting rid of the ruler line. F8 - Graphics Mode ------------------ This key STARTS the 'GRAPHICS' keyboard mode. Please Note that the key used to EXIT graphics mode is the key. F9 - Clear Screen and Restart the Program ------------------------------------------ This key clears the screen and restarts the program. F10 - Exit the Program ---------------------- This key is used to exit the program. As of Ver 2.11, You will be asked if you have saved the screen currently displayed. This is a Yes or NO (Y/N) question. If you answer yes, the program will exit. If the answer is no, you will be asked for the filename you wish to save the screen in. The screen will then be saved and the program will then exit. Technical Appendix: ------------------- The graphics characters produced by SCREEN DESIGNER are the extended ASCII character set incorporated in every video board as part of the standard (as defined by IBM) character set. On a CGA, EGA, PGA or other color board, SCREEN DESIGNER does not operate in the GRAPHICS mode, but rather in TEXT mode. This allows the graphics created by SCREEN DESIGNER to work properly on any type of computer / video system. All files produced by SCREEN DESIGNER are standard ASCII text files, with no tokenization. You can edit any of the image files you create with an ASCII word processor, such as WORDSTAR in NON-document mode, or the editors in Turbo Pascal and QuickBasic. The files created are 24 records long, with 80 charac- ters per record. PLEASE NOTE: If you use column 80 for your screen design, be advised that in many languages you will have a problem involving the video systems' ability (indeed, a desire) to wrap to the next line. SCREEN DESIGNER attempts to handle this problem with column 80 for you, but it will probably turn out strangely. I advise that you design your screens to use columns 1-79, and ignore column 80 entirely. If you attempt to read in a file that contains either short lines (less then 80 characters) or short files (less than 24 records) SCREEN DESIGNER will pad the records to the requi- site length & number. This program is written in Microsoft QuickBasic 4.5, and makes use of the 'event trapping' features of that language. Attempting to use a RAM-resident program, such as Sidekick (tm), while running SCREEN DESIGNER may produce strange results. I have attempted to make this program as portable as possi- ble. The screen redraw is a little slow, but keep in mind that SCREEN DESIGNER should work on 98% & 99% compatibles as well as 100% compatibles, and under Windows (tm) and Double- Dos (tm). I felt that the compromise was worth it. SCREEN DESIGNER has been tested on the following comput- er systems: (machine types are listed generically, to avoid having to list three pages of trademark credits) AT with CGA AT with EGA AT with monochrome XT with monochrome graphics XT with CGA XT with Hercules 386 with VGA These systems were run under various versions of MS-DOS (tm), from 2.11 through 3.2. and PC-DOS (tm) 3.3 Important note regarding DOS versions: With the addition of the preset capability, the version of DOS that you run Screen Designer under matters! As written, the preset file will be maintained in the same directory that the Screen Designer executable files are located in, even if you have it in your path and call it from multiple subdirec- tories. IF YOU ARE USING A DOS VERSION PRIOR TO 3.x, THIS WILL NOT WORK! Screen Designer will check the version of DOS you are using, and if you are using 2.x, the presets file will be maintained in the CURRENT subdirectory. Miscellaneous Notes and Release History: I'd like to take this opportunity to thank Anthony Scriffig- nano, whose program 'CHART' inspired SCREEN DESIGNER. I'd also like to thank the system operator of the Software Society BBS (Sparta NJ) for his willingness to put up with my inability to upload the right file the first time (EVER!). I got the idea for the intersection mode from his main menu. And, last but not least, I want to thank my wife, Evelyne Stalzer, for tolerating my living at this computer while I wrote SCREEN DESIGNER, and for editing the documentation. Revision History: Version .99 The boxer goes berserk, no line draw mode Version 1.00 Beta testing: added corrections for short files & short records, added ruler line, added blank left, right, up & down feature. (I'll get even with John someday..) Version 1.45 The virtual screen wins the battle, but I win the war.... Where is the cursor going ?, started docs. figured out the boxer bug, added interlock so up left MUST be above & left of lower right (good morning stupid) Version 1.75 I found the cursor, rewrite the logical to physical screen connection. (AGAIN!) Version 2.0 First Release to the public (Software Society BBS) 2 Days later..... Version 2.02 Killed the idea of delay loops in the title display, made it a 'hit a key'. Version 2.03 Not released pending $, found minor bug in line draw, on line 24, going right to left, cursor goes to top of screen. fixed same. Version 2.04 Incorporates 2.03 fix and a correction to the virtual-physi- cal cursor link. Version 2.10 added intersection mode, also remapped all F keys in draw mode at suggestion of Sid K. Version 2.11 At the suggestion of Sid (and original design notes, which I finally found on my desk!) added check for save during exit sequence. Version 2.30 Added Trim right and line counter metacharacter to the pro- grammer interface. also added offset from top for counter meta. Rewrote whole programmer interface (internal). As test, rewrote all help screens using new programmer interface and PROBAS (tm) windowmanager. New screens only available on color systems, maintaining support for mono systems. Version 2.33 Corrected garbage character pickup on exiting 'help' with a function key (Joey DeS). Added the video mode force feature at request of Chuck A. (sysop of Chuck's attempt), fixed comma bug in programmer interface (Vic LaG.) Version 2.35 Corrected minor bug in video mode force routine. Reworked the way that the INSERT and DELETE keys work. compile/linked using OPTCALL (Public Domain, Copyright 1988, Michael W. Cocke) which reduced the size of the Executable file from over 140K to about 114K. Version 2.37 Added command line facility to enter name of existing file to load for editing. Added the 'BBS Screen' function to the programmers interface. Version 2.39 Corrected two (actually two and one half) bugs in the command line file load ability. Non-existant files are now handled properly, and loading a new file from the file menu, after having loaded a file from the command line now works. the 'half bug' was in the way the screen displayed the 'loading' message during startup. it worked, but looked sloppy. Version 2.75 Rewrote entire graphics mode, reworked graphics keyboard mode, got mixed mode graphics keyboard to work, almost broke 1 screen barrier, but decided against it on basis of effort required/registrations received, combined separate help screens for mono & color modes into one multimode system, cleaned up main help screens, moved more keystrokes away from the event handlers and back to keyboard scanning, added facility to save under name most recently loaded under. rewrote docs using new version of Wordstar (tm) Version 2.80 Not released to the public. This was a maintenance release implementing a new method of virtual/physical screen mapping. Parts of the code run slower, but Screen Designer will need to address the screen by full XY coordinates when I get around to finishing the ANSI colorizer subsystem. Version 2.85 Incorporates version 2.80 improvements plus: Added the 'Preset' capability to the Programmers interface, Increased support for color systems, rewrote the help screens again, and found/corrected a a TRULY obscure bug that occasionally caused garbage to be written to the end of a formatted-output file. Version 2.89 I outsmarted myself in the vertical screen center routine in version 2.85. I thought I had figured out a way to do it using less RAM - it used less RAM alright, but it didn't work properly. Fixed. Cleaned up some color-usage errors. Added the 'toggle ruler line' ability. Fixed a glitch in the file loader, where a file containing short records would lose the last character of each line (under certain circumstances). Caught several errors in the docs. Removed the code for screen mode force. Removed the 'save file under last load name' capability. It is the policy of MWC Enterprises (Me) to implement REGIS- TERED user requests (where possible) in ALL shareware products. If you have a suggestion, LET ME KNOW! (If you aren't registered, REGISTER!) It is a hope (not a policy, but what do you want?) to implement user suggestions in Public Domain Software. IBM is a registered trademark of International Business Machines Corp. Turbo Pascal is a registered trademark of Borland International. QuickBasic is a registered trademark of Microsoft, Inc. Wordstar is a registered trademark of Micropro International Corp. MS-DOS is a registered trademark of Microsoft, Inc. PC-DOS is a registered trademark of International Business Machines Corp.