GASP -Griebel's Awesome Screen Processor <g>

This is a FoxPro for Windows ONLY product - although it can co-exist
with DOS cross platform screens.

PLEASE KEEP IN MIND THIS IS A WORK IN PROGRESS - AND IT COULD BE
POTENTIALLY DESTRUCTIVE. It generally won't hurt
anything, but... Please work with a backup of your screen files
until we get a little more stable.

I don't mean to scare you, but I must ZAP THE SCX and re-append
records. This means if something broke, which I don't *think* it
will, you could lose a screen. Just be careful, OK? I feel better
having warned you<g>. I might add that I've been using this for
weeks and weeks on screens without backups. 


What do it do?
-------------------------
GASP will add three D effects to boxes and fields in any FPW scx file.
WYSIWYG. It also has preference checkboxes for a bunch of the nuisance
things you have to reset everytime you make a new screen, such as the
screen font, grid on or off, grid to the proper size, etc. And, it
makes the entire range of background colors available.


How it works
-------------------------
GASP, after being invoked from the system menu, closes the current SCX
file and opens it up for processing. GASP takes a look at GASPPREF.DBF
for preferences, then processes all records type 7 and 15, and the header.
It appends records to the SCX with appropriate dimensions, colors and
locations to achieve the desired effect.

After appending the new records, the SCX must be sorted by platform to
make sure all the platforms are contiguous. In addition, if there are
shadow boxes involved, they are inserted (via sorting) into the area
between the header record and the first object record - to get them
to appear behind the object they are associated with.

INSTALLING GASP 
------------------------------------
You need these files to be installed in the FOXPROW 
(sys(2004)) directory:
	File                            Purpose
	------------------------------------------------
	GASPPREF.DBF            Stores preference information
	GASPPREF.FPT
	GASPSRC.SCX                     Used for an SCX source for new screens
	GASPSRC.SCT
	GASP3DFX.APP            Processes the SCX - adds 3D effects
	GASPPREF.APP            Preferences
	GASP.MPR                        (this can be anywhere, but SYS(2004) is handy)

The source code can be anywhere. This version has all of the source
code. In a nutshell, GASP.MPR has an "add before help" pad with GASP stuff
under it. Those snippets call "DO SYS(2004)+'GASP3DFX' or GASPPREF. If you
wanted to install the GASP files in another directory - you would need
to modify GASP3DFX.PRG, GASPPREF.SPR and GASP.MPR slightly to reflect
the new directory.

I've included a GASPINST.APP to do all of the installation for you.

Using GASP
----------------------------------
Pretty simple, actually. After you get the above files installed, I suggest
you do the following:

	SET DEFAULT TO (a directory to play in)
	DO \FOXPROW\gasp.mpr            &&install gasp menu
	Modify A_screen         &&create a new screen to play with
	Draw a couple of boxes
	Go to GASP for 3D
	That's it! Answer yes to save changes on your SCX

Next, make a quick screen, give yourself some room around fields, and run
it through with fields sunken or raised. A note about field effects -
READBORDER impacts the dimensions of the generated field by 5 pixels
horizontally and 2 pixels vertically. Right now, everything is set to
work with READBORDER off. Nancy J is going to bug me until
I get Readborder going both ways, so you can look for that in the
future. If you look at GASPPREF.DBF's structure, you'll see that its
already there as an option.

Removing GASP effects
------------------------
If you haven't specified object codes (see below) - the easiest way to
remove GASP objects is to go to preferences and set both Boxes and Fields
to PLAIN. Save the setting (press OK) and run the screen through again.

Other than that, you could USE the SCX manually and
	DELETE FOR ATC(';;GASP',comment) > 0
..as all of my new records will have that in the comment field. This is what
gets triggered by the "Clear all GASP fields" checkbox on Preferences.

Changing a box dimension after its been "gasped"
-------------------------------------------------
The box is still there, its just underneath the new GASP objects. I
recommend you go to GASPPREFs, select PLAIN for boxes, OK, and run it
through again. Resize the box, go back to gaspprefs, and run it through
again with the proper effect. This whole operation takes only a few seconds.

GASP Codes
--------------------------
Beyond the system defaults (set in gasppref), each object may have individual
GASP codes assigned by bringing up that object's comment field. The codes may
be combined (see the ATC() code in GASP3DFX.PRG for details), but here is
the list. I'm using ;; (two semicolons) as the ITSEXPRESSION/key flag sort
of indicator. (It's easy - you don't have to use a shift key or anything<g>).

	;;S             SUNKEN
	;;R             RAISED
	;;D                             DROP SHADOW (fields only)
	;;NOT           (Leave me alone!!)
	;;X<expN>       Depth, where <expN> = number of pixels (1 to 9)
	

For example, if you had two boxes, and you wanted one sunken with 2 pixel 
borders, you would draw the first box, then add this to the comment area:
	;;S;;X2

If you wanted the other box raised 4 pixels, you would add this to the
comment field:
	;;R;;X4

If you want an object to be unaltered - but you want other objects of the
same type to be affected by the settings of GASPPREF, place ;;NOT in 
the comment field of the object.

By the way, don't be disturbed if some effects don't "look right" when
you're looking at the SCX - Readborder screws up the image you see as
to the true WYSIWYGness of it all. Generate with READBORDER off and
then check the results.

Preferences
-------------------------------------
The preferences table has exactly two records right now. Record 1 is
the USER record, and record 2 is the DEFAULT. We may add more
later on. GASP Preferences is really more of a control panel
than a preference setting. I use it all the time when trying out
different effects.

Other goodies
-------------------------------------
COLORMIX.SPR is a part of GaspPref. I made up a ColorMix routine that
allows you to specify additional colors beyond the 16 FP provides as
defaults. FPW doesn't apparently support 256 colors, but you can get
some interesting patterns working that don't appear on the screen
layout dialog in the screen builder.

Here are some "hot-hit" settings - I'll have a palette installed
soon, but these are the typical settings:
	RED     GREEN   BLUE    YIELDS
	----    -----   ----    ------
	0       0       0       Black
	128     128     128     Dark Grey
	192     192     192     Light Grey
	255     255     255     Bright White



FONTCALC.SPR is a handy little gizmo that does the FOXEL to PIXEL
conversion. I use it when I'm doing some cipherin'<g>


GASP AND DIRECTORIES
Where GASP looks for screens
----------------------------
I'm relying on the SCX window to identify the SCX file. In other words,
when you run GASP, I release window (wontop()), where WONTOP() = 'ASCREEN.SCX'
and then attempt to USE ascreen.scx. There is not a very good way to tell
where the SCX "should" be if it isn't right there.

If your SCX is in the default directory, you won't have any problems.
Otherwise, you have to specify where GASP should go look. Since most
of us work on Screens from Projects, I placed a "Screens Sub-Directory"
option on the Preferences screen. If you're working from the typical
setup below, you'll want SCREENS to be in the subdirectory field.
	Project Level
		PRGS
		REPS
		SCREENS
		MENUS
		etc...

GASP attempts to USE gasppref.subdirect+\+window_name if it can't
USE window_name.

KNOWN BUGS!!!!
-------------------------------------
WONTOP() screws up with windows beginning with numbers, so a screen
named 3DFX.SCX can't be processed. This can't be helped.

In addition, I'm shutting down the SCX window with:

	RELEASE WINDOW (wontop())

It's just a quirk of how RELEASE WINDOW/WONTOP() works, but any windows
with the same name up to the dot must be released prior to the WONTOP()
actually being released. In other words, if you have Snippet Windows
open, or a project with the same name, GASP will close them down before
it gets to WONTOP(). Again- I'm not sure there's any way around this
(until MS fixes it<argh>).

If you run GASP.MPR from the PROGRAM menu, and it is located in a directory
different than your SCX, the Default Directory gets changed (by the
program menu) and GASP can't find your SCX file. Don't do that<gd&r from
Nancy J>. Seriously, I'm working on it, but we'll have to check into it.
Best bet is to DO \FOXPROW\GASP.MPR, work in the directory where your SCX
is, or work in the subdirectory level one above it and specify the SCX
directory in Preferences.       

Planned enhancements
--------------------------------------------------
	Sunken Checkboxes
	Color Palette for the color mixer
	Unlimited number of preference settings
	???
	
What I want to know from you...
---------------------------------------------------
Did it work?<g> What was most confusing? What could I do
to make it more simple? Stuff like that<g>.


See ya!

Andy



