home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
GPF.ZIP
/
README.GPF
< prev
Wrap
Text File
|
1991-04-01
|
24KB
|
460 lines
$Header$
GPF demo, Ver 1.1
+++++++++++++++++++++++++++++++++++++
This file and associated programs are copyright (c) Microformatic USA, Inc.
1991. The user is granted permission to copy, duplicate, and disribute
the enclosed materials, WITHOUT ALTERATION.
=====================================
***********************************************************************
***********************************************************************
NOTE: This file is similar to the manual provided with the demo diskette. It
is provided for persons who may have this software but do not have the
manual. This text is not intended to update, correct, or enhance the
manual.
CAUTION: this version includes SAMPLE\SAMPLE.ORC, and may not work
completely without the SQL DLLs in your LIBPATH variable and DB manager
up and running. DO NOT use this particular example if your system is not
set up with DBM and EE.
Future versions may remove this restriction.
***********************************************************************
1. Introduction
Welcome to a brief view of Microformatic's GPF, or GUI Programming
Facility. The intent of this version is to give the user a "feel" for
interface generation using GPF. The demo will allow creation and manipu-
lation of Presentation Manager objects but the design will not be saved.
Also keep in mind that the hypothetical interface we will be creating in
our "walk-through" is slightly contrived; the main idea is to show off
the tool, not design a practical interface.
GPF is designed to be the fastest tool available for the creation of
user interfaces. Some of the features GPF supports are:
- an unlimited hierarchy of screens
- PM control types, from buttons to combo boxes
- user defined buttons
- menu bars, drop-downs, pop-ups
- incorporation of icons and bitmaps
- presentation parameters at the control level (colors/fonts)
- full HELP system support, to the control level
- a dynamic information field whose contents vary as the
mouse pointer is moved from control to control.
- code generation, including MAK, RC, C, H, SQC, HLP, DEF,
IPF, IDS files
(the code generator is present in a full GPF, only)
- two levels of simulation: TEST (all versions) and ANIMATE
(proto and full versions)
- the ability to read in any DB MANAGER data bases, and
present them to the user (e.g. in a list\select box)
- logo (About...) screen generation
- key aliasing and accelerators
- menu selectable actions to perform on control invocation,
including all defined PM actions and the ability to branch
to user code.
- pop up messages, with typing icons (warning, info, etc)
WARNING: This DEMO version will not save any work between sessions!
In most other respects it behaves identically to the full function
version of GPF.
2. Installation
2.1 Requirements
OS/2 1.2 or 1.3 (full version expects EE)
6Mbytes of system RAM (less for OS/2 v1.3)
Mouse
2.2 Procedure
This DEMO comes complete with an INSTALL utility. This utility will
create necessary directories, move all files from the diskette, and
modify your CONFIG.SYS to ensure a hospitable environment for GPF.
2.2.1 DO IT!
Install GPF by:
- from the FILE MANAGER, change to drive A: and invoke INSTALL.CMD. There
is enough on-line help to guide you through a full install.
or:
- place the DEMO diskette in either A: or B:
- from an OS2 window or full screen, change drives to the floppy
drive containing the DEMO diskette.
- type INSTALL, followed by a 'return'. This invokes INSTALL.CMD,
which in turn starts GPFINST.EXE. This last is a full PM program,
developed using GPF (of course).
- press the INSTALL button after the ABOUT screen clears off. If it
doesn't clear off, press it's OK button.
- you will be prompted for a target (OUTPUT) drive and directory into
which GPF will be installed. Edit the default values if you desire,
then ensure the correct Source Drive pushbutton is active.
- press OK
- when the file transfer is complete the central window will display
a message to that effect and provide instrctions. Press EXIT and
shutdown\reboot your system [remember to remove the floppy, if it
is in drive A:]
- NOTE: There is a directory on the distribution diskette which
contains the output of SAMPLE.ORC after it is run through the
GENERATOR. This directory, SAMPLE.SRC, contains a packed file in
".ZIP" format and the utilities to unpack it. Please examine this
(untouched) code to get a feel for the scope and quality of GPF
code generation.
3. Starting GPF
The installation process has added a GPF entry into your GROUP - MAIN.
Find it and double click on the entry.
4. Using GPF - a short guided tour
In brief, creation of a user interface with GPF is the sequential
performance of these steps:
design all the screens (including messages and HELP entries)
define all the actions to associate with controls, including
links to your (user) code.
test/animate proper operation
process all the generated code
The demo version allows all of the above except the last step, as
the code generator is not present on the diskette. The ANIMATE
function is also not active, as that requires SAVING your workfile.
All SAVE functions are disabled.
4.1 Creating an Interface
4.1.1 The main screen
a. From the GPF editor main screen, select File + New...
b. You must enter a "File name:" in the screen that appears. Click
on OK when done.
c. The program property screen appears. The only required field is
the "Main Source Name". Enter any name here, then duplicate it
in the "TaskList Title" field. Ignore all other fields/controls
and press on "Ok". Maximize the screen which is presented.
d. The DEFAULT main entry screen appears, and has the logical name of
"MainScreen" (as viewed from the WINDOW option on the edit menu bar).
Unless re-defined later, this will be the primary screen of any
created application, the first a user will see. We will now modify it.
NOTE: the mouse cursor will change shape as an aid to identifying the
current mode and current field. The general cursor is simply a large
arrow; but if you drag it slowly over the menu bar it will momentarily
change to an index finger. While in this shape, a mouse click will
place you in menu bar edit. Or clicking once while it is in it's
general shpae will cause it to change to a hollow cross; this is the
object selection cursor, and the current object outline is emphasized.
Double clicking on an object with this cursor will place you in a
definition screen hierarchy for that object.
e. create two objects, whose use will be made clear later, by pressing
on "Object", then "Presentation Object...". In the "Presentation
Parameters" screen press the "Add" button.
f. - edit the name to "PresOptions"
- scroll through and select "18.Helv" in "Font Name Size"
- scroll through and select "Clr_Blue" in "Background Color"
- scroll through and select "Clr_Yellow" in "Foreground Color"
- scroll thorugh and select "Clr_DarkBlue" in "Border Color"
- press the "Ok" button;
- press "Add" again
- edit the "Name" to "Danger"
- scroll through and select "14.Helv" in "Font Name Size"
- scroll through and select "Clr_Red" in "Background Color"
- scroll through and select "Clr_Yellow" in "Foreground Color"
- scroll thorugh and select "Clr_Pink" in "Border Color"
- press on "Ok" button, in two screens. You are back in the top screen.
g. 'register' a bitmap & icon object, to be used later, by:
- press "Object", then "Icon\Bitmap\Pointer...."
- press on "Add Object"
- edit name to "Bitmap"
- edit file name to "SAMPLE1".
- press BITMAP pushbutton
- edit path field to your GPF drive:\directory\SAMPLE. The SAMPLE
directory is a sub-directory of your GPF directory, created during
the INSTALL process.
- press "Ok"
- press "Add item" again
- edit file name to "SAMPLE2"
- ensure the Icon pushbutton is selected
- edit the path field to reflect your GPF drive:\directory\SAMPLE
- press "Ok", then again
h. create a piece of user applciation code, to be used later
- press "Object", then "User Function Object..."
- in the USER FUNCTION screen, press on "Add"
- a two-field screen appears
- edit the Name field to "MyCode", then press the Tab key (NOT return)
- you are now in a simple text editor
- enter any typical code, such as "CallMyFunction();"
- press "Ok" to return to the preceding screen. Note that MyCode now
appears in the list of registered functions.
- press on "Ok" again
4.1.1.1 Editing the default MAIN screen
a. with the cursor in the middle of the new screen, double click on the
left mouse button. The "styles" definition dialog will appear.
b. edit the "Title" field by placing the cursor in that field and clicking
once. Delete the word "text" and replace with an appropriate string, such
as "Demo Test Screen- Main". [You can, at any time, click on the "Ok"
button to view the results of any selections; re-enter by double click,
as before]. Experiment all you like and examine the results. The only
change needed for this tour is the alteration of the title text.
c. Press "Ok" to return to the main editor screen. From the "Toolkit"
menu, select "TEST" (notice that all other menu options will be
disabled). In this mode you can view some of the actions associated
with defined controls, such as drop-down menus.
d. Click on "File" and then "Help" menu selections. This will show you
the default sub-menus attached to these choices. We will edit one or
two. Click on the system button (upper left), then on the minimize
(down arrow) button in the upper right. To restore, double click on
the icon.
Exit the test mode by clicking on "Toolkit", then "Test". If your
window vanished, select "Window", then click on the window name.
(By default the first window is called "MainWindow"; you can change
the name to conform with your internal standards. [Do this by double
clicking on the window, then edit the "Name" field. Press "Ok".])
e. place the cursor in the menu bar (it will change shape) and click.
The "Selection ActionBar" dialog for this window is activated.
f. in the select window, double click on the "help" entry. The new
dialog allows you to define some additional properties of this item.
Change the "Text" field to read "~Help=F1"; in the styles box click
on the "Button Separator" checkbox until an "X" appears; press the
arrow in the "Accelerator Key" box, then scroll down and click on the
"F1" entry. Now press the "PullDown" button. The actual submenu is
shown.
g. with the mouse (or arrow keys) select the "Tutorial_Help" line, then
press on the "Destroy" button. Verify this action when presented with a
message. This item is now deleted. Press "Ok" twice, for this and the
previous window. You should be back in "Selection Action Bar".
h. Press on "Add ActionBar". In the "Menu Options" dialog
- edit name to "Options". This will be the ID for this item.
- edit the "Text" field to read "~Options". The tilde preceding
the 'O' will cause this letter to be underscored, such that in the
compiled application an 'Alt-O' keystroke will invoke this menu.
- in "Submenu Presentation" select "PresOptions", defined earlier.
- press on "PullDown". Here we define a sub-menu.
i. Press "Add Item"
- edit "Name" to "OptionsSearch"
- edit "Text" to "~Search"
- select "Danger" from the "Submenu Presentation" box
- press the "SubMenu 1" button
- press "Add Item"
- edit "Text" to "By ~Name"
- press "Ok"
- press "Add Item"
- edit "Text" to "By ~Attribute"
- press "Ok"
- press "Ok"
-press "Ok"; you should be back in "Selection PullDown" screen
j. press "Add Item"
- edit name to "Option Destroy"
- edit "Text" to "~Delete"
- press on "SubMenu 1" button
- press on "AddItem"
- on right hand side, locate the "Type" box and click on the BitMap
button. The down-arrow box in the combo box will light up, next to the
(default) name NULL.
- click on the down-arrow, activating the selection window. All
registered (we only did one) Bitmaps will be listed.
- click (select) the last entry. A small version of the bitmap will
appear in the display area.
- press "Ok" as many times as it takes to get out of all the definition
screens.
k. press on "Create", then "Button"
- drag the created object to the bottom-center of your Main Window,
prehaps an inch up from the bottom border.
- click on the left mouse button to drop it. You will be placed in
the Button Control Styles window.
- edit the Text field to read "~Panic"
- in the Presentation box, scroll through and select "Danger"
- press "Ok", which will return you to the highest level
- place the cursor on the new PANIC button and click once, left button
- the border of the button should change to gray, indicating that this
is now the 'current' object.
- slowly drag the cursor around the object, and note how the cursor will
change shape as you traverse the object borders. In this manner you can
re-size the border(s) in any cardinal direction. To simply move the
object, without sizing, place the 'hollow-cross' cursor in the middle
of the button, then press and hold down the left button. The cursor
will change to quad arrows. WIth the button still depressed, you can
drag the object anywhere within the client area and drop it by releasing
the mouse button. Have fun moving and re-sizing.
- more fundamental changes to this object can be performed by a quick
double-click on that object, which will take you back to the initial
definition screen for that object. All such screens can be exited by
succesive presses on "Ok", and\or the ESC key.
l. although not strictly part of this "guided tour", you can similarly
create an instance of every object listed in the "Create" submenu. It
wouldn't hurt to experiment a bit. An object can always be removed by
double-clicking on it, then pressing on "Destroy" in its primary
definition screen [you will be asked to verify your intent by a message
screen; press "Yes"]. The definition screens will give you a good idea
of the sorts of attributes which are controllable for each object.
4.1.2 Auxiliary screen(s)
a. in the GPF Editor main menu, click on "Window". The selection
MainWindow will appear, along with a checkmark indicating that it is
visible. Click on it to remove the window (it will remain in memory and
can always be brought back with the same steps), giving you a clean
screen to work with.
b. press on "Create", then "Window/Dialog..."
c. a window with the standard defaults is created, similar to the window
created upon entry to the GPF editor. The difference here is that no
menu bar is assumed, and hence not made. Once the window is drawn, you
will automatically be transferred to the definition screen.
- in both the Parent and Owner fields, select MainWindow vice DESKTOP
- edit the title field to "Child Window"
- click the System Menu checkbox OFF
- click the Information Msg checkbox ON
- click both Horz and Vert Scroll Bar checkboxes ON
- in Border Styles, select "Dialog Border"
- if you wish, select an art-sy color from the Color choice field
- in the Icon field, press the down arrow then select "Icon1". This icon
will be displayed if and when you MINIMIZE the window. [try this in TEST
mode]
- press "Ok"
d. press on the GPF editor "Window" menu item. Notice that now both
windows are listed. The MainWindow can be displayed by itself, but
the secondary cannot; this is due to PM ownership rules. Click on the
secondary window name... if visible, it will vanish, and vice versa.
Make sure it is invisible, then click on MainWindow until it is visible.
e. up to this point we have studiously avoiding key buttons in the
definition windows: EntryHelp and Action. These are critical to the
final application, but unfortunately their effects cannot be simulated
in TEST mode (in other words with this version). However, the defintion
phase can be walked thru, and the effects described.
f. double click on the MainWIndow object (not the PANIC button!!)
- press on "EntryHelp"
- a window with four main sections appears:
1. the HelpTitle and HelpIndex fields can be edited to meaningful
titles if desired; their effect is the inclusion of these titles in
the general, system HELP screens with your name, vice the default names.
3. the large central box is a multiple line entry dialog box, into
which you can enter the text you want to associate with the HELP screen
for the current object. The user, when F1 is pressed, will see this text
in a PM HELP screen. It can also be accesses via TITLE\INDEX from
higher level system HELP utilities.
4. The Information Message field can be edited with abbreviated help
information, along the lines of a prompt. This text will appear at
the bottom of the screen if that screen had the Information Msg
checkbox selected during screen definition.
- edit these fields as you please, but keep in my that you will not be
able to see any results when you return to higher levels. [The ANIMATOR
in the FULL version would allow you to see Information Messages, and would
also prepare the complete HELP files as required by the IPF utilities.
These would be automatically processed when you GENERATE\COMPILE, and
linked in to your application. Sorry... there are limits to the DEMO.]
- press "Ok" twice, returning to the main GPF screen.
g. double click on the PANIC button in order to enter it's primary
definition screen.
- press on "Action". The default action for a button is listed.
- press on the "View\Modify Action On..." button.
- press on "AddTop", which is where we will define what is to occur when
the user presses on the PANIC button.
- scroll down the "Action" list to the bottom entry, "User Function"
- click on this entry, then click on the "MyCode" entry in the Object list.
You have just created a link between GPF code and your code, which can be
in-line or an external function call. [But how does GPF resolve function
prototyping to externl functions ?? Easy... if there exists (in your source
directory) a '.H' header file, of the same name as the set of screens you
are creating, it will automatically be '#includED' into the source file
being created by GPF. Into this header file, which can include other files,
you would place all GLOBALS\EXTERNALS etc.]
- press "Ok", in each of four screens, or until you return to the graphical
depiction of the current screen.
h. select the application Menu Bar (the pointer will change to an index
finger; click at that point).
- select the FILE entry (inverse video), then press "View/Modify....."
- press on "PullDown"
- the EXIT item should be highlited, as it is the only choice.
- press on "View\Modify Pulldown"
- press on "Action"
- press on "View/Modify Action On..."
- ensure the large box has "Quit Application #". If not so, press on
"Update" and make it so by finding and selecting that option in the Action
list.
- press "Ok" as many times as it takes to return to the top level (6 or 7
times)
- select the Menu Bar again to edit these items.
- highlite the Options entry this time, as opposed to the File just done.
- either double click on the entry directly, or press "View/Mod......"
- press on "PullDown"
- double-click on the "OptionsDestroy" entry.
- press on "SubMenu 1", then on "View/Mod.....", then "Action". Here we are
defining what will happen when the user presses on the bitmap.
- when the screen with 'click' as the first entry appears, press
"View/Mod....."
- press on "AddTop"
- in the Action list, select "Window Show(visible)"
- in the window list, select "Window1"
- press "Ok" until you return to the graphical level (8 or 9 times).
i. at this point you have created a link between the two generated
screens. In ANIMATE mode (not present) you would be able to see the second
screen appear when you selected that particular option fronm the menu bar.
Of course, user code is inescapable at some point unless you are simply
creating an interface during a conceptual phase, or preparing an executive
presentation. However, how this would be done has already been shown in
one instance; all else is mostly a repetition of the same steps.
4.2 Sample Pre-defined Interface
This is included on your disk for inspection purposes, as an example
whichs shows more complicated features and/or hierarchies. The file of
interest is SAMPLE.ORC, located in the SAMPLE sub-directory under GPF.
- Click on FILES, then on OPEN.
- change the DRIVE\DIRECTORY field to the SAMPLE sub-directory.
- double click on SAMPLE.
- if DB MANAGER is not running, you may get mysterious messages. It is
OK to say YES to the "Destroy,.... etc" message window; the change will
not be saved. [NOTE: this sample application interacts with the system
SQL functions. It assumes you have at some point run SQLSAMPL as part of
learning DBM. This utility creates a sample database, used by our demo].
Any modifications performed by you will not be saved, although you can
edit the windows and simulate them under TEST.
=======================================================================
5. What else can GPF do, missing in the DEMO version ?
a. create dynamic, position sensitive messages. [the DEMO version allows
you to create these, but not view the results]
b. create a full HELP system, screen level or down to object level. [same
comment as (a.), above.
c. interfacing to system DATA BASES created by DBM. GPF logs and
presents for selection ALL data bases found on the system.
d. save all your work
e. read existing .ORC, .RES, and .RC files.
f. generate all application specific intermediate and code files
g. automate the LINK/COMPILE cycle
h. enables the ANIMATOR, which permits inspection of the complete
interface without compilations.
i. create and link message screens (INFO,ERROR,WARNING, etc).
j. incremental code development.
6. Where Do I Go From Here ?
- you can duplicate the demo disk all you like and distribute it
without prejudice.
- contact Microformatic for information concerning price and delivery
and to order a licensed full function verion of Gpf.
The GPF product is shipped in two versions:
DEMO the product you have. This version is functional to the point
of saving: all work is volatile and will vanish when you
power down or exit the editor. However, you can create
arbitrarily complex user interfaces exactly as in the other
GPF versions. The TEST mode can be invoked, allowing a high
level check of control operations.
MICROFORMATIC RESERVES THE RIGHT TO DISCONTINUE
THIS VERSION AT ANY TIME.
FULL combines the demo with a full set of save facilities and
code generators. The ANIMATOR is also supplied, permitting a
higher level of simulation (such as HELP system, information
messages, etc)
Both versions have the identical user interface. The experience
gained by using one is directly applicable to the other.
For all further actions: -----
In North America:
Microformatic USA, Inc.
26 Plains Road
Moodus, CT 06469
Tel: (203) 873-1950
Fax: (203) 873-2171
In Europe:
Microformatic SA
2, rue Navoiseau
93100 Montreuil-sous-Bois
France
Tel: 33(1)48.70.19.00
Fax: 33(1)48.70.27.29