OVERVIEW.............An overview of the Screen Dialogue Editor
LOAD SCREEN..........Loading a Screen Group into the Screen Editor
SAVE SCREEN..........Saving the Screen Group to a file
OBJECT EDIT..........Editing, Inserting, Adding Screen Objects
OBJECT MOVE..........Moving Screen Objects
OBJECT TAGGING.......Tagging Screen Objects for Saving or Display
EXPORT SCREEN........Exporting or Importing a Screen to/from another application
PAINT SCREEN.........Painting (executing) a screen group
TEST SCREEN..........Test-Painting a screen group or object

OVERVIEW

An overview of the Screen Dialogue Editor

Description:

The Screen Designer is an Editor that is used to create or
modify Groups of Screen objects for displaying Boxes, text,
or Dialog Screens with GETS, Check Boxes, and/or Radio
Buttons. Screen objects are arrays of screen information
that are stored and/or retrieved to/from the DCSCRN.DBF
Screen Dictionary, an Array File or Source Code.

A screen group is a multi-dimensional array of related
information that is passed to the DC_SCRNPAINT() function
for execution.

The Screen Designer creates Screens with the following
features:

* Clear or fill areas of the Screen with any character and
any color.
* Write boxes of any style and color.
* Write any type of text.
* Create a dialog Window.
* Create Radio-Button Groups.
* Create Check Boxes.
* Create Push Buttons.
* Create GET Inputs for any type of variable.
* Automatically supports "paged" or "scrolling" GETS.
* Automatic mouse support.

See Also:

SCREEN EDIT
dc_scrnedit()

LOAD SCREEN

Loading a Screen Group into the Screen Editor

Description:

A screen group can be loaded into the screen editor from a
variety of sources. Screen groups are saved to the DCSCRN.DBF
dictionary, an array file, or source code, so they may also
be retreived for editing, copying or exporting.

SCREEN DICTIONARY

To load the Editor with a Screen Group from the Screen
dictionary, select (F), (L) and (D) from the pull-down menu
then choose the Screen Group to load from the pick-list. The
pick-list will display all Screen Groups that exist in the
DCSCRN.DBF file.


ARRAY FILE

To load the Editor with a Screen Group that was saved to an
array file, select (F), (L) and (A) from the pull-down menu then
enter the name of the *.DCS file to load. Press (CTRL-ENTER)
or double-click the mouse to pop-up a list of all *.DCS
files on the disk.


CODE

To load the Editor with a Screen Group that was saved to source
code, first you must make sure that the code was compiled and
linked into the .EXEcutable program that the screen designer
also resides. This may be a dCLIP.EXE program or a custom
program. If you are running the screen designer from dCLIP,
then you may exit to the dot-prompt, load the .OBJ file that
contains the source code for the menu with the OBJ command,
then re-start the screen editor. Select (F), (L) and (C) then
enter the name of the function to execute. This function must
return a screen group array of the proper type or an error will
occur.

NOTE: The recommended function name to use for assigning a
screen group to source code is the name of the screen group
followed by _S(). For example, the function to call for
returning a screen group array with the tag name "MYSCREEN"
is MYSCREEN_S(). The DC_SCRNLOAD() function will look
first to see if MYSCREEN_S() function has been linked into
the program and grab the screen group array from this
function, otherwise it will attempt to restore the screen
group array from the Screen Dictionary. Restoring from
source code is much faster and more reliable.

See Also:

dc_scrnedit()
SCREEN EDIT
dc_scrnload()

SAVE SCREEN

Saving the Screen Group to a file

Description:

The Screen Group items that are displayed in the Screen Editor
can be saved to the DCSCRN.DBF dictionary, an array file, or
source code, for later retreival by the editor or the
application program.

SCREEN DICTIONARY

To save the Editor contents to the screen dictionary,
select (F), (S) and (D) from the pull-down menu.

CAUTION: Any screen group in the DCSCRN.DBF dictionary with
the same name as the group in the editor will be
overwritten. If you do not want to overwrite an
existing screen, make sure to assign a unique name
by selecting GROUP NAME from the Menu.


ARRAY FILE

To save the Editor contents to an array file, select (F), (S)
and (A) from the pull-down menu then enter the name of the
*.DCS file to create.


SOURCE CODE

To save the Editor contents to source code, select (F), (S)
and (S) from the pull-down menu. Enter the name of the
source-code *.PRG file to create and the name of the function
to assign. The source code can be compiled with the Clipper
compiler, linked into an application then the screen can be
loaded an executed by calling the DC_SCRNPAINT() function with
the array passed back from the function.

NOTE: The recommended function name to use for assigning a
screen to source code is the name of the screen followed
by _S(). For example, the function to call for return-
ing a screen array with the tag name "MYSCREEN" is
MYSCREEN_S(). The DC_SCRNLOAD() function will look
first to see if the MYSCREEN_S() function has been
linked into the program and grab the screen group array
from this function, otherwise it will attempt to restore
the screen group array from the Screen Dictionary.
Restoring from source code is much faster and more
reliable.

See Also:

dc_scrnedit()
SCREEN EDIT
dc_scrnsave()

OBJECT EDIT

Editing, Inserting, Adding Screen Objects

Description:

To ADD a screen object to the end of the screen group,
select (E) then (A) from the pull-down menu.

To INSERT a screen object in front of the selected object,
select (E) then (I) from the pull-down menu.

To COPY the selected screen objected to a new object at the
end of the screen group, select (E) then (C) from the pull-
down menu.

An input screen for editing the screen object properties will
appear. Enter the following information:


OBJECT TYPE

Enter a single Letter representing the TYPE of screen object
create.

F - Fill Screen Area

This type will create an object that will fill an area of
the screen with any specified character and color. Use this
type to clear an area of the screen.

D - Draw a Box

This type will create an object that will draw a box on the
screen of any style.

T - Display Text

This type will create an object that will write any text on
the screen in a specified area and color.

X - Display Expression

This type will create an object that will write the results
of any expression on the screen in a specified area and
color.

G - Normal GET

This type will create an object for GETting input from the
operator into any type of PUBLIC or PRIVATE memory variable
or database field.

V - Initialize a variable

This type will initialize a PRIVATE or PUBLIC memory
variable to be used by later objects or by the interpreter.
The variable may be a MEMVAR or an array element.

C - Check Box GET

This type will create an object for GETting input from the
operator into a logical PUBLIC or PRIVATE memory variable
or database field by displaying the GET as a check-box (û)
that can be toggled with the mouse or the ENTER key.

R - Radio Button GET

This type will create an object for GETting input from the
operator into a PUBLIC or PRIVATE memory variable or
database field by displaying each optional input as a
radio-button (*) that can be selected with the mouse or
the ENTER key. Radio-Buttons are painted in GROUPS that
provide the operator with the option of selecting one of
many values to assign to the variable.

P - Push Button (boxed)

This type will create an object that is a push-button for
executing a code-block if the button is pressed with the
mouse or the ENTER key.


N - Push Button (un-boxed)

This type will create an object that defines an area of the
screen for executing a code-block if the mouse is clicked
within the defined area.

M - Get a Memo

This type will create an object that is a "MEMO" GET for
popping up a memo editor to edit any character string or
memo type variable or database field.

E - Explode a Dialog Box

This type will create an object that paints a box on the
screen for establishing the working area for a group of
Normal, Push-Button, Radio-Button, or Check-Box gets.
This becomes the scrolling region for the gets and contains
a set of buttons on the perimeter of the box such as
ESCAPE, SAVE, and HELP.

K - Evaluate a Code Block

This type will evaluate a code block as soon as the object
is painted.


DESCRIPTION

Enter the Description of the object that will appear in the
browse-view of the screen group array.


SCREEN PAGE

Enter a number from 1 to 99 to designate which screen page
this group belongs in. The DC_SCRNPAINT() function may be
passed a parameter designating which page # to paint on the
screen. If no parameter is passed, then all pages of objects
will be painted from page 1 to the last page.

START ROW

Enter the start display row to display this object. This is
a coordinate that is "relative" to the offsets passed to the
DC_SCRNPAINT() function. If no offsets are passed then this
is a "real" screen coordinate. For Boxes, Fill-Area, or
Text type objects this is the top coordinate. For GET type
objects this is the start row to display the text related to
the GET.


START COLUMN

Enter the start display column to display this object. This
is a coordinate that is "relative" to the offsets passed to the
DC_SCRNPAINT() function. If no offsets are passed then this
is a "real" screen coordinate. For Boxes, Fill-Area, or
Text type objects this is the left-side coordinate. For GET
type objects this is the start column to display the text
related to the GET.


END ROW

Enter the end display row to display this object. This is
a coordinate that is "relative" to the offsets passed to the
DC_SCRNPAINT() function. If no offsets are passed then this
is a "real" screen coordinate. For Boxes, Fill-Area, or
Text type objects this is the bottom coordinate. For GET
type objects, this coordinate is ignored.


END COLUMN

Enter the end display column to display this object. This is
a coordinate that is "relative" to the offsets passed to the
DC_SCRNPAINT() function. If no offsets are passed then this
is a "real" screen coordinate. For Boxes, Fill-Area, or
Text type objects this is the right coordinate. For GET
type objects, this coordinate is ignored.


TEXT

Enter the text associated with this screen object.

Screen
Type Description
------- -------------------------------------------------

F Enter a single character to use as the screen fill
character.

B Enter 8 characters representing the 4 corners and
4 edges of the box. Enter a 9th character if the
box is to be filled with a character. Press
CTRL-ENTER to pop-up a pick-list of standard box
styles.

P Enter the text to display within the push-button
box.

N Enter the text to display on the screen in the
push-button area.

T Enter the text to display within the screen
coordinates. The text may be as long as 8000
characters. Use semi-colons within the text to
start the text display at the next row within the
screen coordinates.

G/M Enter the prompt that will appear directly in front
of the GET variable or the "MEMO" GET.

R/C Enter the prompt that will appear directly behind
the radio button or check-box delimiters.

E Enter the title of the Dialog Window.


CODE-BLOCK

Enter any code-block associated with this object.

Screen
Type Description
------- -------------------------------------------------
P/N Enter the code block to evaluate when the mouse is
clicked within the push-button area.

K Enter the code block to evaluate when this object is
painted.


COLOR

Enter a valid Clipper color string for displaying the color
of the text and the input GET. The first color is the text
color. The second color is the Pending GET color. Press
CTRL-ENTER to pop-up a color pick-list.


RE-PAINT?

Enter a Y for YES if you want to repaint this object after
evaluating any object that is associated with a code block.
For example, let's say you have a push-button in your dialog
screen that runs a function that calculates several totals
then writes the totals to a database field or a memory
variable. You may create an "X" type object that will re-paint
the results on the screen after calculating the totals.


GET VAR / FIELD

If this is a Screen Type "G", "R", "C", "V" or "M", then you
must enter the name of a PRIVATE or PUBLIC memvar or database
field to edit (if a GET) or to initialize (if a "V" type). If
the GET is a database field then the database must be opened
before painting this screen group and it must also include the
Alias preceding the field name.


PUBLIC?

If this is a Screen Type "G", "R", "C", "V" or "M", then enter
a Y for YES if this is a memvar that is to be assigned as
PUBLIC after it is initialized with the default value. If
the memvar is to be released after it is used, then enter a
N for NO.


GET OPTIONS

If this is a Screen Type "G", then enter a series of
characters defining any special editing options for this GET.

A - Capitalize First Character of each word
(CHARACTER type memvars or fields)
D - Pop Up a Date Calendar (DATE type memvars or fields)
C - Pop Up a Calculator (NUMERIC type memvars or fields)
H - Hide Input from Displaying
P - Protect from Editing
F - File Pick-List (CHARACTER type memvars or fields)

Press the CTRL-ENTER key for a pick-list of options.


GET PICTURE

If this is a Screen Type "G", then enter a valid Clipper
"picture" clause defining how you want the data to be
formatted within the GET.


GET VALID CLAUSE

If this is a Screen type "G", "R", "C", or "M", then enter a
valid Clipper expression that returns a logical value. This
expression is evaluated after entering data in the GET and will
not allow the GET to be exited unless the expression returns a
.TRUE. value.


GET WHEN CLAUSE

If this is a Screen type "G", "R", "C", or "M", then
enter a valid Clipper expression that returns a logical
value. This expression is evaluated before entering the GET
and will not allow the GET to be entered unless the
expression returns a .TRUE. value.


GET DEFAULT VALUE

If this is a Screen type "G", "R", "C", or "M", then
enter an expression that returns a value equal to the default
value to enter into the GET memvar in the event that the
memvar does not already exist.


RADIO GROUP #

If this is a Screen type "R", then enter a number from 1 to 99
designating which Radio Button group this memvar is assigned
to.


RADIO SELECT VALUE

If this is a Screen type "R", then enter an expression that
returns a value to stuff into the the memvar when this button
is selected with the mouse or the ENTER key.

See Also:

dc_scrnedit()
SCREEN EDIT

OBJECT MOVE

Moving Screen Objects

Description:

Screen objects are painted in the order that they appear in
the screen group list.

A screen object may be moved from anywhere within a screen
group to any other location. To move an object select that
object, then select (E) and (M) from the pull-down menu.
Enter the current location in the object list to relocate the
object. The object will be placed directly in front of the
object number entered as the target.

See Also:

dc_scrnedit()
SCREEN EDIT

OBJECT TAGGING

Tagging Screen Objects for Saving or Display

Description:

Screen objects may be "Tagged" or "UnTagged". When a screen
group is loaded, all objects are automatically tagged and the
"tag" check-mark is displayed in the TAG column. When test-
painting a screen, only objects that are Tagged will be
painted. When saving a screen group to the DCSCRN.DBF screen
dictionary, only the objects that are Tagged will be saved.

To toggle the status of the "tag" flag, select the desired
object, then press the SPACE bar, or double-click the mouse
in the TAG column for the desired object.

See Also:

dc_scrnedit()
SCREEN EDIT

EXPORT SCREEN

Exporting or Importing a Screen to/from another application

Description:

A screen group can be EXPORTed to a file named DXSCRN.DBF for
later IMPORTing into another application. For example, let's
say you have 3 separate applications, each with its own set of
dCLIP dictionary files. Each application will have its own
DCSCRN.DBF Screen dictionary. Screens can be easily exported
to a DXSCRN.DBF file. This file has the same structure as the
DCSCRN.DBF file so the screen group can then be imported to
the DCSCRN.DBF file of the target application.

To export a screen group, first load the group into the editor,
then select (F) and (E) from the pull-down menu.

CAUTION: The screen will overwrite any screen group in the
DXSCRN.DBF file with the same name, so make sure to
change the name first under "Screen Name" to a
unique name.


To import a screen, select (F) and (I) from the pull-down menu,
then select the screen to import from the screen group pick-
list. The list will include the name and description of all
screen groups in the DXSCRN.DBF screen export file. The
current contents of the editor will be replaced by the imported
screen group.

See Also:

dc_scrnedit()
SCREEN EDIT

PAINT SCREEN

Painting (executing) a screen group

Description:

The purpose of a screen designer, of course, is to make it
simple to create screens that can be used in either a
coded or a data-driven application. After creating and
saving screens, they can be inserted into an application
or run from dCLIP in a variety of ways.

RUNNING A SCREEN FROM THE DOT PROMPT OR FROM APPLICATION CODE

1. Use the command SCREEN PAINT (cScrnName) or the function
DC_SCRNPAINT(DC_SCRNLOAD( (cScrnName) )) to execute a
screen group that was saved in the DCSCRN.DBF dictionary.


2. Use the function DC_SCRNPAINT() to execute a screen that
was saved to source code. For example, if you created
a function named MYSCREEN_S() in a source code file named
MYSCRN.PRG, then make sure that you have compiled the
program and linked it into the dCLIP.EXE engine or your
own application either will a "real" or "dynamic link".
Then run the screen as follows:

DC_SCRNPAINT( MyScreen_S() )

3. Use the functions DC_SCRNPAINT() and DC_ARESTORE() to
execute a screen that was saved to an array file. For
example if you created an array file named MYSCRN.DCS,
you can run the screen as follows:

DC_SCRNPAINT( DC_ARESTORE( "MYSCRN.DCS" ) )


NOTE: The DC_SCRNPAINT() function will accept a character
string (screen tag name) or an array (screen group
array).


PAINTING A SCREEN FROM A MENU

If you want to paint a screen group from within a menu, you
must place the appropriate function within the code-block
that will be evaluated when the menu item is selected.

Examples:

1. Painting a screen group in the screen dictionary.

{|| DC_SCRNPAINT( "MYSCREEN" ) }

2. Painting a screen from an array file.

{|| DC_SCRNPAINT( DC_ARESTORE("MYSCREEN.DCS") ) }

3. Painting a screen from a function compiled into code and
linked in the application.

{|| DC_SCRNPAINT( MYSCREEN_S() ) }

See Also:

dc_scrnedit()
SCREEN EDIT
dc_scrnpaint()
SCREEN PAINT

TEST SCREEN

Test-Painting a screen group or object

Description:

Screen objects can be tested from within the editor by
painting the entire screen group, a screen group "page" or
a single screen object.

CLEAR SCREEN

When test-painting screen objects, it's a good idea to first
clear the screen to start with a clean slate. Select
CLEAR SCREEN from the pull-down menu.


PAINT ALL OBJECTS

After designing a screen of objects, the entire set of
objects may be painted to the screen and tested, or only the
objects with the same page number as the selected object.
Select PAINT ALL or PAINT PAGE from the pull-down menu.


PAINT SELECTED OBJECT

After designing a new object, the selected object may be
painted to the screen and tested. Selected PAINT SELECTED
from the pull-down menu.

See Also:

dc_scrnedit()
SCREEN EDIT
dc_scrnpaint()
SCREEN PAINT