3D Effects Driver 2.0 for GENSCRNX



The 3D.PRG driver is designed for GENSCRNX 2.0 or later.  The 3D 
driver is only enabled when building screens in FoxPro for Windows and 
is disabled when generated code for non-Windows platforms.  The files 
contained in 3DFOX.ZIP are for use with FoxPro 2.5/2.6 for Windows, 
although GENSCRNX.PRG is compatible with all versions of FoxPro 2.x.




INSTALLATION


Read documentation on installation supplied with GENSCRNX before 
using the 3D driver and sample code.




UP AND RUNNING


After unzipping 3DFOX.ZIP, execute 3DDEMO.PRG from within FoxPro 
2.5/2.6 for Windows:
To execute 3DDEMO.PRG, enter:
DO 3DDEMO


The quickest way to get started with generating 3D screens is to place 
the following two lines of code in the Setup snippet of a screen that has a 
light gray background:

*:SCXDRV5 3D
*:ALL3D


To enable the 3D driver globally for all FoxPro for Windows screens, 
place the following in the CONFIG.FPW:

_SCXDRV5="<path>3D.PRG"

with the proper <path> of the 3D.PRG driver.  Then place the following 
line of code in the Setup snippet of a screen that has a light gray 
background:

*:ALL3D


To see an animated demo of example 3D beveled boxes using the 
3DBOX.PRG procedure, execute 3DSHOW.PRG

To execute 3DSHOW.PRG, enter:
DO 3DSHOW

Notes:
The 3DBOX.PRG procedure may be used with any FoxPro for Windows 
application and does not require FoxPro's Screen Builder or 
GENSCRNX.  See 3DBOX.PRG source code for documentation of 
available parameters.




SETUP SNIPPET DIRECTIVE REFERENCE


*:SCXDRV5 <path>3D

Specify SCX driver #5 to execute the 3D.PRG driver function.


*:SAY3D [<expN> | INSET | RAISED] [REFRESH] [COLOR <color>]

Specify 3D effects for all SAY objects.


*:GET3D [<expN> | RAISED ] [COLOR <color>]

Specify 3D effects for all GET objects.


*:EDIT3D [<expN> | RAISED ] [COLOR <color>]

Specify 3D effects for all EDIT objects.


*:CONTROL3D [<expN> | RAISED ] [COLOR <color>]

Specify 3D effects for all control objects.  This includes all CHECK BOX, 
LIST BOX, POPUP, and RADIO BUTTON, and SPINNER objects.


*:PICTURE3D [<expN> | RAISED ] [COLOR <color>]

Specify 3D effects for all PICTURE objects.


*:INSET3D [COLOR <color>]

Specify 3D inset effect for all BOX and LINE objects.


*:RAISED3D [COLOR <color>]

Specify 3D raised effect for all BOX and LINE objects.


*:BOX3D [<expN>] [REFRESH] [COLOR <color>]

Specify 3D beveled box effect using 3DBOX.PRG for all BOX objects.


*:BOX3D [<expN>] [SHADOW] [REFRESH] [COLOR <color>]

Specify 3D shadow effect for all BOX objects.


*:ALL3D [<expN> | RAISED ] [COLOR <color>]

Specify 3D effects for all above objects.  If one of the above directives 
are included along with *:ALL3D, the specific directive will override the 
*:ALL3D directive.


*:TEXT3D [<expN> | INSET | RAISED] [COLOR <color>]

Specify 3D effects for all TEXT objects.




COMMENT SNIPPET DIRECTIVE REFERENCE


*:NO3D

Disable 3D effect for object.

Notes:
The *:NO3D directive is only used to disable the 3D effect for an object 
when 3D effects are specified globally in the Setup snippet.


*:3D [<expN>] [COLOR <color>]

Specify 3D effect for object.  For BOX and LINE objects, the 3D inset 
effect is the default.


*:3D INSET [<expN>] [COLOR <color>]

Specify 3D inset effect for object.


*:3D RAISED [<expN>] [COLOR <color>]

Specify 3D raised effect for object.


*:3D [<expN>] BOX [SHADOW] [REFRESH] [COLOR <color>]

Specify 3D beveled box effect for BOX object.  <expN> specifies the 
bevel width.  A positive number creates a raised box while a negative 
number creates an inset box.  An optional parameter list can be specified 
for non-default 3DBOX parameters.  Refer to 3DBOX.PRG source code 
(parameters 6 and on) for detailed information or see examples below.

Notes:
When specifying *:3D BOX, be sure to use the Screen Builder's Send to 
Back option for the box.  The *:3D BOX directive causes GENSCRNX to 
replace the @ row1,col1 TO row2,col2 command with a DO 3DBOX 
WITH <expN> command where <expN> can be a parameter list for 
parameters 5 through 19 of 3DBOX.PRG, although normally only the 
bevel width needs to be specified.  The 3DBOX procedure call needs to 
be executed before any @ SAY, @ GET, etc. that need to appear on top 
of the 3D box which can be achieved by using the Send to Back option.

Examples:

To specify the default 3D beveled box:
*:3D BOX

To specify a 3D box with a raised bevel of 6:
*:3D 6 BOX

To specify a 3D box with a inset bevel of 6 and to have redrawing during 
the Read Show clause:
*:3D -6 BOX REFRESH

To specify a 3D box with an inset bevel of 4, sun color white, and shade 
color of blue:
*:3D -4 BOX COLOR B
  or
*:3D -4 BOX COLOR RGB(0,0,255)
  or
*:3D -4,255,255,255,0,0,255 BOX


*:FRAME3D [<expC>]

Specify text using <expC> to be placed in the top left corner of a box.  If 
*:3D is not specified for the box object, *:3D INSET will automatically be 
used.  If the first character of <expC> is an @, the following characters 
will be evaluated at runtime.

Examples:

To specify a 3D INSET box will frame text set to "Customer":
*:FRAME3D Customer

To specify a 3D RAISED box with frame text set to "Invoice":
*:3D RAISED
*:FRAME3D Invoice

To specify a 3D  INSET box with frame text set to a runtime variable 
called m.myframe1:
*:FRAME3D @m.myframe1




COMMON DIRECTIVE INFORMATION


If <expN> is omitted, the default 3D effect is created for the object.

If <expN> is specified, a shadow 3D effect is created for the object unless 
the object is a BOX and the *:3D BOX directive is used (refer to *:3D 
BOX above).  The cast of the shadow is determined by the sign of 
<expN>.  For example, if <expN> is 4, a shadow is cast 4 pixels down 
and to the right of the object.  If <expN> is -6, a shadow is cast 6 pixels 
up and to the left of the object.


If COLOR <color> is omitted, the default 3D shadow color is used for the 
object.  If <expN> is omitted, COLOR <color> specifies the shade color of 
the chiseled box.  If <expN> is specified, COLOR <color> specifies the 
color of the shadow.

Color can also be specified with a set of 3 RGB (Red Green Blue) color 
values separated by commas.  The color values can range from 0 
through 255.  For example, the color blue can also be specified with RGB 
color RGB(0,0,255)

Examples:
To specify the default 3D effect:
*:3D

To specify a shadow cast 4 pixels down and to the right using the default 
shadow color:
*:3D 4

To specify the default 3D effect with a blue shadow color:
*:3D COLOR B

To specify a shadow cast 6 pixels down and to the right with a dark gray 
shadow color:
*:3D 6 COLOR RGB(128,128,128)




ADDITIONAL INFORMATION


Any cross-platform screens using 3D effects must be built in FoxPro for 
Windows for the WINDOWS code to be generated properly.  The 3D 
driver program uses the FONTMETRIC() function to determine the 
row,col, and size information for the 3D objects which requires FoxPro for 
Windows.  Generating cross-platform screens using 3D effects in a 
platform other than Windows will only effect the code generated for the 
Windows platform.  Therefore, a cross-platform project can simply be re-
built in FoxPro for Windows when development is complete.

The 3D driver automatically adds a SET READBORDER OFF command 
at the end of the Setup snippet if a SET READBORDER ON command or 
a *:SET BORDERGETS directive does not already exist in the Setup 
snippet.  The easiest way to enable the border gets option when using 
the 3D driver is to place a SET READBORDER OFF command anywhere 
in the Setup snippet making sure the command is places starting in 
column one (not indented).  Refer to GENSCRNX documentation for 
further information about the *:SET BORDERGETS directive.

If a public variable called _3D is set to OFF, the 3D driver will be disabled 
and all 3D effects will be suppressed.  _3D='OFF' is useful when 
prototyping a project and 3D effects are not needed for testing but the 
time it takes for a project to re-build needs to be as short as possible.  
The overhead time of using the 3D driver depends on the number and 
type of 3D effects generated for the screen.  3D=OFF can be placed in 
the CONFIG.FPW file to disable 3D effects without being dependent on a 
public variable call _3D existing.  If both a public variable _3D and 
3D=ON | OFF in the CONFIG.FPW file, the public variable has 
precedence.

Objects containing the GENSCRNX directives *:SIZE or *:NOSIZE in the 
Comment snippet will not generate 3D effects.

When using *:3D with checkboxes, the SHOW GETS ENABLED 
command cannot be used with the READ because the null check box 
used for the 3D effect will be enabled, causing the main check box to not 
be mouse enabled.  If SHOW GETS ENABLED is used with the READ, 
place *:NO3D in the Comment snippet of the check box to disable the 3D 
effect.




COPYRIGHT NOTICE


Compressed file: 3DFOX.ZIP
System: GenScrnX
Author: Ken R. Levy
Author: Bill Anderson (3DBOX.PRG, 3DSHOW.PRG)
Company: Jet Propulsion Laboratory
Copyright: None (Public Domain)

All source code and documentation contained in 3DFOX.ZIP was 
developed at the Jet Propulsion Laboratory in Pasadena, Calif. and has 
been placed into the public domain.  You may use, modify, copy, 
distribute, and demonstrate any source code, example programs, or 
documentation contained in 3DFOX.ZIP freely without copyright 
protection.  All files contained in 3DFOX.ZIP are provided 'as is' without 
warranty of any kind.  In no event shall its authors, contributors, or 
distributors be liable for any damages.




COMMENTS/SUGGESTIONS/PROBLEMS/QUESTIONS


Please use CompuServe's FoxForum (section 3rd Party Products) 
directed to:

Ken Levy 76350,2610

-----------------------------------------------------------

