home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / GPF.ZIP / README.GPF < prev   
Text File  |  1991-04-01  |  24KB  |  460 lines

  1. $Header$
  2.  
  3. GPF demo, Ver 1.1
  4. +++++++++++++++++++++++++++++++++++++
  5. This file and associated programs are copyright (c) Microformatic USA, Inc.
  6. 1991. The user is granted permission to copy, duplicate, and disribute
  7. the enclosed materials, WITHOUT ALTERATION.
  8. =====================================
  9. ***********************************************************************
  10.  
  11. ***********************************************************************
  12. NOTE: This file is similar to the manual provided with the demo diskette. It
  13. is provided for persons who may have this software but do not have the 
  14. manual.  This text is not intended to update, correct, or enhance the 
  15. manual.
  16.  
  17. CAUTION: this version includes SAMPLE\SAMPLE.ORC, and may not work  
  18. completely without the SQL DLLs in your LIBPATH variable and DB manager 
  19. up and running. DO NOT use this particular example if your system is not
  20. set up with DBM and EE.
  21. Future versions may remove this restriction.
  22. ***********************************************************************
  23.  
  24. 1. Introduction
  25. Welcome to a brief view of Microformatic's GPF, or GUI Programming
  26. Facility. The intent of this version is to give the user a "feel" for
  27. interface generation using GPF. The demo will allow creation and manipu-
  28. lation of Presentation Manager objects but the design will not be saved. 
  29. Also keep in mind that the hypothetical interface we will be creating in
  30. our "walk-through" is slightly contrived; the main idea is to show off
  31. the tool, not design a practical interface.
  32.  
  33. GPF is designed to be the fastest tool available for the creation of
  34. user interfaces. Some of the features GPF supports are:
  35.     - an unlimited hierarchy of screens
  36.     - PM control types, from buttons to combo boxes
  37.     - user defined buttons
  38.     - menu bars, drop-downs, pop-ups
  39.     - incorporation of icons and bitmaps
  40.     - presentation parameters at the control level (colors/fonts)
  41.     - full HELP system support, to the control level
  42.     - a dynamic information field whose contents vary as the
  43.       mouse pointer is moved from control to control.
  44.     - code generation, including MAK, RC, C, H, SQC, HLP, DEF,
  45.       IPF, IDS files
  46.       (the code generator is present in a full GPF, only)
  47.     - two levels of simulation: TEST (all versions) and ANIMATE
  48.       (proto and full versions)
  49.     - the ability to read in any DB MANAGER data bases, and
  50.       present them to the user (e.g. in a list\select box)
  51.     - logo (About...) screen generation
  52.     - key aliasing and accelerators
  53.     - menu selectable actions to perform on control invocation,
  54.       including all defined PM actions and the ability to branch
  55.       to user code.
  56.     - pop up messages, with typing icons (warning, info, etc)
  57.  
  58. WARNING: This DEMO version will not save any work between sessions!
  59. In most other respects it behaves identically to the full function 
  60. version of GPF.
  61.  
  62. 2. Installation
  63. 2.1 Requirements
  64.     OS/2 1.2 or 1.3 (full version expects EE)
  65.     6Mbytes of system RAM (less for OS/2 v1.3)
  66.     Mouse
  67.  
  68. 2.2 Procedure
  69. This DEMO comes complete with an INSTALL utility. This utility will
  70. create necessary directories, move all files from the diskette, and
  71. modify your CONFIG.SYS to ensure a hospitable environment for GPF.
  72.  
  73. 2.2.1 DO IT!
  74. Install GPF by:
  75.     - from the FILE MANAGER, change to drive A: and invoke INSTALL.CMD. There
  76.       is enough on-line help to guide you through a full install.
  77. or:
  78.     - place the DEMO diskette in either A: or B:
  79.     - from an OS2 window or full screen, change drives to the floppy
  80.       drive containing the DEMO diskette.
  81.     - type INSTALL, followed by a 'return'. This invokes INSTALL.CMD,
  82.       which in turn starts GPFINST.EXE. This last is a full PM program,
  83.       developed using GPF (of course).
  84.     - press the INSTALL button after the ABOUT screen clears off. If it
  85.       doesn't clear off, press it's OK button.
  86.     - you will be prompted for a target (OUTPUT) drive and directory into
  87.       which GPF will be installed. Edit the default values if you desire,
  88.       then ensure the correct Source Drive pushbutton is active.
  89.     - press OK
  90.     - when the file transfer is complete the central window will display
  91.       a message to that effect and provide instrctions. Press EXIT and
  92.       shutdown\reboot your system [remember to remove the floppy, if it
  93.       is in drive A:]
  94.     - NOTE: There is a directory on the distribution diskette which 
  95.       contains the output of SAMPLE.ORC after it is run through the
  96.       GENERATOR. This directory, SAMPLE.SRC, contains a packed file in 
  97.       ".ZIP" format and the utilities to unpack it. Please examine this
  98.       (untouched) code to get a feel for the scope and quality of GPF 
  99.       code generation.
  100.  
  101. 3. Starting GPF
  102. The installation process has added a GPF entry into your GROUP - MAIN.
  103. Find it and double click on the entry.
  104.  
  105. 4. Using GPF - a short guided tour
  106. In brief, creation of a user interface with GPF is the sequential 
  107. performance of these steps:
  108.     design all the screens (including messages and HELP entries)
  109.     define all the actions to associate with controls, including
  110.       links to your (user) code. 
  111.     test/animate proper operation
  112.     process all the generated code
  113. The demo version allows all of the above except the last step, as
  114. the code generator is not present on the diskette. The ANIMATE
  115. function is also not active, as that requires SAVING your workfile.
  116. All SAVE functions are disabled.
  117.  
  118. 4.1 Creating an Interface
  119. 4.1.1 The main screen
  120. a. From the GPF editor main screen, select File + New...
  121. b. You must enter a "File name:" in the screen that appears. Click 
  122.    on OK when done.
  123. c. The program property screen appears. The only required field is
  124.    the "Main Source Name". Enter any name here, then duplicate it
  125.    in the "TaskList Title" field. Ignore all other fields/controls
  126.    and press on "Ok". Maximize the screen which is presented.
  127. d. The DEFAULT main entry screen appears, and has the logical name of
  128.    "MainScreen" (as viewed from the WINDOW option on the edit menu bar).
  129.    Unless re-defined later, this will be the primary screen of any
  130.    created application, the first a user will see. We will now modify it.
  131. NOTE: the mouse cursor will change shape as an aid to identifying the
  132.   current mode and current field. The general cursor is simply a large
  133.   arrow; but if you drag it slowly over the menu bar it will momentarily
  134.   change to an index finger. While in this shape, a mouse click will
  135.   place you in menu bar edit. Or clicking once while it is in it's
  136.   general shpae will cause it to change to a hollow cross; this is the
  137.   object selection cursor, and the current object outline is emphasized.
  138.   Double clicking on an object with this cursor will place you in a
  139.   definition screen hierarchy for that object.
  140. e. create two objects, whose use will be made clear later, by pressing
  141. on "Object", then "Presentation Object...". In the "Presentation
  142. Parameters" screen press the "Add" button.
  143. f. - edit the name to "PresOptions"
  144.    - scroll through and select "18.Helv" in "Font Name Size"
  145.    - scroll through and select "Clr_Blue" in "Background Color"
  146.    - scroll through and select "Clr_Yellow" in "Foreground Color"
  147.    - scroll thorugh and select "Clr_DarkBlue" in "Border Color"
  148.    - press the "Ok" button; 
  149.    - press "Add" again
  150.    - edit the "Name"  to "Danger"
  151.    - scroll through and select "14.Helv" in "Font Name Size"
  152.    - scroll through and select "Clr_Red" in "Background Color"
  153.    - scroll through and select "Clr_Yellow" in "Foreground Color"
  154.    - scroll thorugh and select "Clr_Pink" in "Border Color"
  155.    - press on "Ok" button, in two screens. You are back in the top screen.
  156. g. 'register' a bitmap & icon object, to be used later, by:
  157.     - press "Object", then "Icon\Bitmap\Pointer...."
  158.     - press on "Add Object"
  159.     - edit name to "Bitmap"
  160.     - edit file name to "SAMPLE1".
  161.     - press BITMAP pushbutton
  162.     - edit path field to your GPF drive:\directory\SAMPLE. The SAMPLE
  163.       directory is a sub-directory of your GPF directory, created during 
  164.       the INSTALL process.
  165.     - press "Ok" 
  166.     - press "Add item" again
  167.     - edit file name to "SAMPLE2"
  168.     - ensure the Icon pushbutton is selected
  169.     - edit the path field to reflect your GPF drive:\directory\SAMPLE
  170.     - press "Ok", then again
  171. h. create a piece of user applciation code, to be used later
  172.   - press "Object", then "User Function Object..."
  173.     - in the USER FUNCTION screen, press on "Add"
  174.     - a two-field screen appears
  175.     - edit the Name field to "MyCode", then press the Tab key (NOT return)
  176.     - you are now in a simple text editor
  177.     - enter any typical code, such as "CallMyFunction();"
  178.     - press "Ok" to return to the preceding screen. Note that MyCode now
  179.       appears in the list of registered functions.
  180.     - press on "Ok" again
  181.  
  182. 4.1.1.1 Editing the default MAIN screen
  183. a. with the cursor in the middle of the new screen, double click on the
  184. left mouse button. The "styles" definition dialog will appear.
  185. b. edit the "Title" field by placing the cursor in that field and clicking
  186. once. Delete the word "text" and replace with an appropriate string, such
  187. as "Demo Test Screen- Main". [You can, at any time, click on the "Ok" 
  188. button to view the results of any selections; re-enter by double click,
  189. as before]. Experiment all you like and examine the results. The only
  190. change needed for this tour is the alteration of the title text.
  191. c. Press "Ok" to return to the main editor screen. From the "Toolkit"
  192. menu, select "TEST" (notice that all other menu options will be
  193. disabled). In this mode you can view some of the actions associated
  194. with defined controls, such as drop-down menus.
  195. d. Click on "File" and then "Help" menu selections. This will show you
  196. the default sub-menus attached to these choices. We will edit one or
  197. two. Click on the system button (upper left), then on the minimize
  198. (down arrow) button in the upper right. To restore, double click on
  199. the icon.
  200. Exit the test mode by clicking on "Toolkit", then "Test". If your
  201. window vanished, select "Window", then click on the window name.
  202. (By default the first window is called "MainWindow"; you can change
  203. the name to conform with your internal standards. [Do this by double
  204. clicking on the window, then edit the "Name" field. Press "Ok".])
  205. e. place the cursor in the menu bar (it will change shape) and click.
  206. The "Selection ActionBar" dialog for this window is activated.
  207. f. in the select window, double click on the "help" entry. The new 
  208. dialog allows you to define some additional properties of this item.
  209. Change the "Text" field to read "~Help=F1"; in the styles box click
  210. on the "Button Separator" checkbox until an "X" appears; press the
  211. arrow in the "Accelerator Key" box, then scroll down and click on the
  212. "F1" entry. Now press the "PullDown" button. The actual submenu is
  213. shown.
  214. g. with the mouse (or arrow keys) select the "Tutorial_Help" line, then
  215. press on the "Destroy" button. Verify this action when presented with a
  216. message. This item is now deleted. Press "Ok" twice, for this and the 
  217. previous window. You should be back in "Selection Action Bar".
  218. h. Press on "Add ActionBar". In the "Menu Options" dialog
  219.    - edit name to "Options". This will be the ID for this item.
  220.    - edit the "Text" field to read "~Options". The tilde preceding
  221.    the 'O' will cause this letter to be underscored, such that in the
  222.    compiled application an 'Alt-O' keystroke will invoke this menu.
  223.    - in "Submenu Presentation" select "PresOptions", defined earlier.
  224.    - press on "PullDown". Here we define a sub-menu.
  225. i. Press "Add Item"
  226.    - edit "Name" to "OptionsSearch"
  227.    - edit "Text" to "~Search"
  228.    - select "Danger" from the "Submenu Presentation" box
  229.    - press the "SubMenu 1" button
  230.    - press "Add Item"
  231.      - edit "Text" to "By ~Name"
  232.      - press "Ok"
  233.    - press "Add Item"
  234.      - edit "Text" to "By ~Attribute"
  235.      - press "Ok"
  236.    - press "Ok"
  237.    -press "Ok"; you should be back in "Selection PullDown" screen
  238. j. press "Add Item"
  239.    - edit name to "Option Destroy"
  240.    - edit "Text" to "~Delete"
  241.    - press on "SubMenu 1" button
  242.      - press on "AddItem"
  243.      - on right hand side, locate the "Type" box and click on the BitMap
  244.      button. The down-arrow box in the combo box will light up, next to the
  245.      (default) name NULL.
  246.      - click on the down-arrow, activating the selection window. All
  247.      registered (we only did one) Bitmaps will be listed. 
  248.      - click (select) the last entry. A small version of the bitmap will
  249.      appear in the display area.
  250.      - press "Ok" as many times as it takes to get out of all the definition
  251.      screens.
  252. k. press on "Create", then "Button"
  253.    - drag the created object to the bottom-center of your Main Window,
  254.      prehaps an inch up from the bottom border.
  255.      - click on the left mouse button to drop it. You will be placed in
  256.      the Button Control Styles window.
  257.      - edit the Text field to read "~Panic"
  258.      - in the Presentation box, scroll through and select "Danger"
  259.      - press "Ok", which will return you to the highest level
  260.      - place the cursor on the new PANIC button and click once, left button
  261.      - the border of the button should change to gray, indicating that this
  262.      is now the 'current' object.
  263.      - slowly drag the cursor around the object, and note how the cursor will
  264.      change shape as you traverse the object borders. In this manner you can
  265.      re-size the border(s) in any cardinal direction. To simply move the 
  266.      object, without sizing, place the 'hollow-cross' cursor in the middle
  267.      of the button, then press and hold down the left button. The cursor
  268.      will change to quad arrows. WIth the button still depressed, you can
  269.      drag the object anywhere within the client area and drop it by releasing
  270.      the mouse button. Have fun moving and re-sizing.
  271.      - more fundamental changes to this object can be performed by a quick
  272.      double-click on that object, which will take you back to the initial
  273.      definition screen for that object. All such screens can be exited by
  274.      succesive presses on "Ok", and\or the ESC key.
  275. l. although not strictly part of this "guided tour", you can similarly
  276. create an instance of every object listed in the "Create" submenu. It
  277. wouldn't hurt to experiment a bit. An object can always be removed by
  278. double-clicking on it, then pressing on "Destroy" in its primary
  279. definition screen [you will be asked to verify your intent by a message
  280. screen; press "Yes"]. The definition screens will give you a good idea
  281. of the sorts of attributes which are controllable for each object.
  282.  
  283. 4.1.2 Auxiliary screen(s)
  284. a. in the GPF Editor main menu, click on "Window". The selection
  285. MainWindow will appear, along with a checkmark indicating that it is
  286. visible. Click on it to remove the window (it will remain in memory and
  287. can always be brought back with the same steps), giving you a clean
  288. screen to work with.
  289. b. press on "Create", then "Window/Dialog..."
  290. c. a window with the standard defaults is created, similar to the window
  291. created upon entry to the GPF editor. The difference here is that no
  292. menu bar is assumed, and hence not made. Once the window is drawn, you
  293. will automatically be transferred to the definition screen.
  294. - in both the Parent and Owner fields, select MainWindow vice DESKTOP
  295. - edit the title field to "Child Window"
  296. - click the System Menu checkbox OFF
  297. - click the Information Msg checkbox ON
  298. - click both Horz and Vert Scroll Bar checkboxes ON
  299. - in Border Styles, select "Dialog Border"
  300. - if you wish, select an art-sy color from the Color choice field
  301. - in the Icon field, press the down arrow then select "Icon1". This icon
  302. will be displayed if and when you MINIMIZE the window. [try this in TEST
  303. mode]
  304. - press "Ok"
  305. d. press on the GPF editor "Window" menu item. Notice that now both
  306. windows are listed. The MainWindow can be displayed by itself, but
  307. the secondary cannot; this is due to PM ownership rules. Click on the
  308. secondary window name... if visible, it will vanish, and vice versa.
  309. Make sure it is invisible, then click on MainWindow until it is visible.
  310. e. up to this point we have studiously avoiding key buttons in the
  311. definition windows: EntryHelp and Action. These are critical to the
  312. final application, but unfortunately their effects cannot be simulated
  313. in TEST mode (in other words with this version). However, the defintion
  314. phase can be walked thru, and the effects described.
  315. f. double click on the MainWIndow object (not the PANIC button!!)
  316. - press on "EntryHelp"
  317. - a window with four main sections appears:
  318.   1. the HelpTitle and HelpIndex fields can be edited to meaningful
  319.     titles if desired; their effect is the inclusion of these titles in
  320.     the general, system HELP screens with your name, vice the default names.
  321.     3. the large central box is a multiple line entry dialog box, into
  322.     which you can enter the text you want to associate with the HELP screen
  323.     for the current object. The user, when F1 is pressed, will see this text
  324.     in a PM HELP screen. It can also be accesses via TITLE\INDEX from
  325.     higher level system HELP utilities.
  326.     4. The Information Message field can be edited with abbreviated help
  327.     information, along the lines of a prompt. This text will appear at 
  328.     the bottom of the screen if that screen had the Information Msg
  329.     checkbox selected during screen definition.
  330. - edit these fields as you please, but keep in my that you will not be
  331. able to see any results when you return to higher levels. [The ANIMATOR
  332. in the FULL version would allow you to see Information Messages, and would
  333. also prepare the complete HELP files as required by the IPF utilities.
  334. These would be automatically processed when you GENERATE\COMPILE, and
  335. linked in to your application. Sorry... there are limits to the DEMO.]
  336. - press "Ok" twice, returning to the main GPF screen.
  337. g. double click on the PANIC button in order to enter it's primary
  338. definition screen.
  339. - press on "Action". The default action for a button is listed.
  340. - press on the "View\Modify Action On..." button.
  341. - press on "AddTop", which is where we will define what is to occur when
  342. the user presses on the PANIC button.
  343. - scroll down the "Action" list to the bottom entry, "User Function"
  344. - click on this entry, then click on the "MyCode" entry in the Object list.
  345. You have just created a link between GPF code and your code, which can be
  346. in-line or an external function call. [But how does GPF resolve function
  347. prototyping to externl functions ?? Easy... if there exists (in your source
  348. directory) a '.H' header file, of the same name as the set of screens you
  349. are creating, it will automatically be '#includED' into the source file
  350. being created by GPF. Into this header file, which can include other files,
  351. you would place all GLOBALS\EXTERNALS etc.]
  352. - press "Ok", in each of four screens, or until you return to the graphical
  353. depiction of the current screen.
  354. h. select the application Menu Bar (the pointer will change to an index
  355. finger; click at that point).
  356. - select the FILE entry (inverse video), then press "View/Modify....."
  357. - press on "PullDown"
  358. - the EXIT item should be highlited, as it is the only choice.
  359. - press on "View\Modify Pulldown"
  360. - press on "Action"
  361. - press on "View/Modify Action On..."
  362. - ensure the large box has "Quit  Application #". If not so, press on 
  363. "Update" and make it so by finding and selecting that option in the Action
  364. list.
  365. - press "Ok" as many times as it takes to return to the top level (6 or 7
  366. times)
  367. - select the Menu Bar again to edit these items.
  368. - highlite the Options entry this time, as opposed to the File just done.
  369. - either double click on the entry directly, or press "View/Mod......"
  370. - press on "PullDown"
  371. - double-click on the "OptionsDestroy" entry.
  372. - press on "SubMenu 1", then on "View/Mod.....", then "Action". Here we are
  373. defining what will happen when the user presses on the bitmap.
  374. - when the screen with 'click' as the first entry appears, press
  375. "View/Mod....."
  376. - press on "AddTop"
  377. - in the Action list, select "Window Show(visible)"
  378. - in the window list, select "Window1"
  379. - press "Ok" until you return to the graphical level (8 or 9 times).
  380. i. at this point you have created a link between the two generated
  381. screens. In ANIMATE mode (not present) you would be able to see the second
  382. screen appear when you selected that particular option fronm the menu bar.
  383. Of course, user code is inescapable at some point unless you are simply
  384. creating an interface during a conceptual phase, or preparing an executive 
  385. presentation. However, how this would be done has already been shown in
  386. one instance; all else is mostly a repetition of the same steps.
  387.  
  388. 4.2 Sample Pre-defined Interface
  389. This is included on your disk for inspection purposes, as an example
  390. whichs shows more complicated features and/or hierarchies. The file of
  391. interest is SAMPLE.ORC, located in the SAMPLE sub-directory under GPF.
  392. - Click on FILES, then on OPEN.
  393. - change the DRIVE\DIRECTORY field to the SAMPLE sub-directory.
  394. - double click on SAMPLE.
  395. - if DB MANAGER is not running, you may get mysterious messages. It is
  396. OK to say YES to the "Destroy,.... etc" message window; the change will
  397. not be saved. [NOTE: this sample application interacts with the system
  398. SQL functions. It assumes you have at some point run SQLSAMPL as part of
  399. learning DBM. This utility creates a sample database, used by our demo].
  400.  
  401. Any modifications performed by you will not be saved, although you can 
  402. edit the windows and simulate them under TEST.
  403.  
  404. =======================================================================
  405. 5. What else can GPF do, missing in the DEMO version ?
  406. a. create dynamic, position sensitive messages. [the DEMO version allows
  407. you to create these, but not view the results]
  408. b. create a full HELP system, screen level or down to object level. [same
  409. comment as (a.), above.
  410. c. interfacing to system DATA BASES created by DBM. GPF logs and
  411. presents for selection ALL data bases found on the system.
  412. d. save all your work
  413. e. read existing .ORC, .RES, and .RC files.
  414. f. generate all application specific intermediate and code files
  415. g. automate the LINK/COMPILE cycle
  416. h. enables the ANIMATOR, which permits inspection of the complete 
  417. interface without compilations.
  418. i. create and link message screens (INFO,ERROR,WARNING, etc).
  419. j. incremental code development.
  420.  
  421. 6. Where Do I Go From Here ?
  422. - you can duplicate the demo disk all you like and distribute it
  423.   without prejudice.
  424. - contact Microformatic for information concerning price and delivery
  425.   and to order a licensed full function verion of Gpf.
  426.  
  427. The GPF product is shipped in two versions:
  428. DEMO    the product you have. This version is functional to the point
  429.     of saving: all work is volatile and will vanish when you
  430.     power down or exit the editor. However, you can create 
  431.     arbitrarily complex user interfaces exactly as in the other 
  432.     GPF versions. The TEST mode can be invoked, allowing a high
  433.     level check of control operations.
  434.     MICROFORMATIC RESERVES THE RIGHT TO DISCONTINUE
  435.     THIS VERSION AT ANY TIME.
  436.  
  437.  
  438. FULL    combines the demo with a full set of save facilities and 
  439.     code generators. The ANIMATOR is also supplied, permitting a
  440.     higher level of simulation (such as HELP system, information
  441.     messages, etc)
  442.  
  443. Both versions have the identical user interface. The experience
  444. gained by using one is directly applicable to the other.
  445.  
  446. For all further actions: -----
  447. In North America:
  448.     Microformatic USA, Inc.
  449.     26 Plains Road
  450.     Moodus, CT  06469
  451.     Tel: (203) 873-1950   
  452.     Fax: (203) 873-2171
  453. In Europe:
  454.     Microformatic SA
  455.     2, rue Navoiseau
  456.     93100 Montreuil-sous-Bois
  457.     France
  458.     Tel: 33(1)48.70.19.00
  459.     Fax: 33(1)48.70.27.29
  460.