home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / GPFDMD.ZIP / GPFDMTXT.ZIP / GPFDEMO.TXT
Text File  |  1992-08-17  |  37KB  |  1,747 lines

  1. Introduction
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Welcome to Gpf, demo version. 
  8.  
  9.  
  10.  
  11. This product is a powerful  OS/2 Presentation Manager
  12. application design tool and standard language code generator. 
  13. Using a deceptively easy to use built in WYSIWYG window editor
  14. Gpf permits visual design of a complete Graphical User Interface
  15. complete with the navigation logic.  Additional functions have
  16. been added which ease the creation of a complete application
  17. including SQL code generation and simple integration of custom
  18. logic and user defined objects. 
  19.  
  20.  
  21.  
  22. Unlike other products which may require learning and using a
  23. proprietary 4GL or generate only rudimentary code skeletons that
  24. require extensive user editing to create useful applications,
  25. Gpf generates finished standard "C" language source.  No further
  26. editing is required, of course the code is clean, modular,  and
  27. well commented, so editing is not precluded.  Standard language
  28. also means no runtime or royalties are required to use the
  29. generated output. 
  30.  
  31.  
  32.  
  33. Links to user functions are defined from within the Gpf  editor,
  34.  and the generated code need never be touched before
  35. compilation.  Common actions (messages) between controls and
  36. windows are simply selected from ACTION-FROM-TO lists, including
  37. the mentioned User Functions.  The ability to read OS/2 DataBase
  38. Manager tables from within Gpf makes it possible to create
  39. simple, complete applications without a single line of user
  40. code.  When custom logic is required user function objects are
  41. defined in "C" and may be interchanged and intermixed with Gpf
  42. built in functions.
  43.  
  44.  
  45.  
  46. Gpf greatly simplifies the installation of Information Messages
  47. and a Help System for your application.  Help panels can be
  48. quickly created for any object you've created, including the
  49. text, a CONTENTS title, and an INDEX title.  The Gpf GENERATOR
  50. will create a complete .IPF file for you, in correct
  51. hierarchical order.   Of course proper "hooks" to the system
  52. Help Manager are automatically appended.
  53.  
  54.  
  55.  
  56. The complete Gpf Editor is included with this demo,  so you may
  57. see the full benefits of this tool and the speed with which
  58. complex GUI's can be created.  Please review the following
  59. sections,  install Gpf on your hard drive,  and go through the
  60. Guided Tour.
  61.  
  62.  
  63.  
  64.  
  65.  
  66. Differences Between Demo and Full versions
  67.  
  68.  
  69.  
  70.  
  71.  
  72. The Demo version:
  73.  
  74.  
  75.  
  76. does not save any of your work between sessions
  77.  
  78.  
  79.  
  80. has the ANIMATOR disabled, as this function requires a saved file
  81.  
  82.  
  83.  
  84. does not include the code GENERATOR
  85.  
  86.  
  87.  
  88. LIB and INCLUDE sub-directories are not included, required by
  89. the GENERATOR only
  90.  
  91.  
  92.  
  93. utility GPFRES.EXE is not included, which converts existing .RES
  94. files to the Gpf binary format
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102. What is included with this Demo Version
  103.  
  104.  
  105.  
  106. In addition to this document, a demo software distribution
  107. diskette is enclosed.  This diskette is a 3-1/2" disk, in DS/HD
  108. (1.4 MB) format.  The diskette is not copy protected and you may
  109. create and distribute as many local
  110.  
  111. copies as you desire, including this documentation.  YOU MAY NOT
  112. upload and install this software onto a public or private BBS,
  113. without express written permission from Gpf Systems.  [Your LAN
  114. is not considered to be a BBS.]
  115.  
  116.  
  117.  
  118. The distribution diskette is organized with an hierarchical
  119. directory structure.  This will be copied to your hard drive, in
  120. total, by the INSTALL program.
  121.  
  122.  
  123.  
  124. What you will need to run this demo
  125.  
  126.  
  127.  
  128. Software requirements are:
  129.  
  130.  
  131.  
  132. OS/2 version 2.0 or later
  133.  
  134.  
  135.  
  136. DataBase Manager (OS/2 Extended Services) up and running,  if
  137. you wish to create an application which makes use of the SQL
  138. facilities.
  139.  
  140.  
  141.  
  142. Note: the SAMPLE.ORC example, in sub-directory SAMPLE32,
  143. utilizes OS/2 DataBase Manager.
  144.  
  145.  
  146.  
  147. Hardware requirements are:
  148.  
  149.  
  150.  
  151. An Intel 80386 or 80486 or other OS/2 2.x compatible PC or
  152. workstation
  153.  
  154.  
  155.  
  156. a hard drive with approximately 2 MBytes of available space
  157.  
  158.  
  159.  
  160. 6 MBytes system memory (8 MBytes recommended)
  161.  
  162.  
  163.  
  164. a mouse
  165.  
  166.  
  167.  
  168. a VGA or 8514 video system
  169.  
  170. Installing the Demo
  171.  
  172.  
  173.  
  174.  
  175.  
  176. Installation may be accomplished from the Workplace Shell
  177. Desktop or from an OS/2 Command line. 
  178.  
  179.  
  180.  
  181. 1. From the Desktop open the disk drive containing the Gpf demo
  182. diskette by double clicking on the appropriate icon, Drive A or
  183. Drive B.
  184.  
  185.  
  186.  
  187. 2. Expand the root directory listing by double-clicking on its
  188. icon.
  189.  
  190.  
  191.  
  192. 3. Double-click on entry INSTALL.CMD. 
  193.  
  194.  
  195.  
  196. 4. The INSTALL program is a full PM program (written with Gpf,
  197. of course), and will load itself and present an opening screen. 
  198. Dismiss the About screen if your Desktop is not configured to do
  199. this automatically.
  200.  
  201.  
  202.  
  203. 5. Select menu item Installation, Setup.
  204.  
  205.  
  206.  
  207. 6. Accept or edit entries in the secondary screen, as desired.
  208. These entries represent source and destination directories.  At
  209. this time it is important to note  or change the group into
  210. which Gpf  will be installed so you can find the Gpf Icons.  If
  211. you do not have any groups defined Gpf will create one. It is
  212. also important to remember whether you have opted to create a
  213. CONFIG.NEW or modify CONFIG.SYS.  Help is available if needed.
  214.  
  215.  
  216.  
  217. 7. Press Ok.  You will be returned to the entry screen, from
  218. which you can monitor installation progress.
  219.  
  220.  
  221.  
  222. 8. When done with the install, Gpf will print some information
  223. in the progress window.  Make note of the contents, and exit
  224. this program.
  225.  
  226.  
  227.  
  228. 9.  If you have opted to create CONFIG.NEW save your existing
  229. CONFIG.SYS and then rename CONFIG.NEW to CONFIG.SYS.  If you
  230. opted to modify CONFIG.SYS the install program has already made
  231. a backup  copy of CONFIG.SYS.   You may inspect the
  232. modifications to your CONFIG.SYS (or CONFIG.NEW) and ensure they
  233. are satisfactory. 
  234.  
  235.  
  236.  
  237. 10. Remove the diskette and conduct an orderly shutdown, then
  238. re-boot your system. 
  239.  
  240.  
  241.  
  242. 11. The Gpf Demo program has been placed in the Group you
  243. selected during the install.  
  244.  
  245.  
  246.  
  247. A Guided Tour
  248.  
  249.  
  250.  
  251. Starting Gpf
  252.  
  253.  
  254.  
  255. The installation process has added a Gpf entry into your GROUP-
  256. MAIN.  Find it and double click on the entry. Dismiss the About
  257. screen if your Desktop is not configured to do this
  258. automatically.
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266. Using Gpf- a short guided tour
  267.  
  268.  
  269.  
  270. The purpose of this tour is to show you some of Gpf's
  271. capabilities, and the speed with which an integrated application
  272. can be created.  If you have been using some other tool to
  273. design your PM interfaces don't be misled by how easy Gpf is to
  274. use.  You really are building a complete user interface, not
  275. just a skeleton which you must later fill in.
  276.  
  277.  
  278.  
  279. Gpf is organized into three areas wherein most of the work is
  280. accomplished.  The first is the Gpf editor menu, from which you
  281. create and manipulate the objects which go into your interface. 
  282. The second is the WYSIWYG representation of the windows and
  283. objects made via the Gpf editor.  The third area is a set of
  284. definition screens which define the properties for a given
  285. object.  In general your screen will typically display either
  286. the first two or the third.
  287.  
  288.  
  289.  
  290. Definition screens are entered in one of two ways:  a.) when you
  291. use the create menu to make an object, you will be automatically
  292. transferred to its definition screen as soon as the object is
  293. placed (dropped), unless you have changed this default.  b.)
  294. from the WYSIWYG mode, double click on any object to see/modify
  295. the definition for that object.
  296.  
  297.  
  298.  
  299. Definition screens are exited in one of two ways:  a.) press the
  300. Cancel button if you've made some changes and then decided not
  301. to have them implemented  b.) press the Ok button if no changes
  302. were made, or the changes are desired.
  303.  
  304.  
  305.  
  306. In brief, creation of a user interface with Gpf is the
  307. sequential  performance of these steps:
  308.  
  309.  
  310.  
  311. define (or register) auxiliary items, such as presentation
  312. parameters, icons, and user code
  313.  
  314.  
  315.  
  316. design all the screens (including information messages and HELP
  317. entries) 
  318.  
  319.  
  320.  
  321. define all the actions to associate with controls, including
  322. links to your (user) code. In essence, define the logical flow
  323. of your program, and its integration with the GUI 
  324.  
  325.  
  326.  
  327. test/animate proper operation
  328.  
  329.  
  330.  
  331. install the help panels
  332.  
  333.  
  334.  
  335. process all the generated code
  336.  
  337.  
  338.  
  339. The demo version allows all of the above except the last step,
  340. as the code generator is not present on the diskette.  The
  341. ANIMATE function is also not active, as that requires SAVING
  342. your work file and all SAVE function are disabled in the demo. 
  343. Note that GpfRun (the Animator) is available from the desktop or
  344. Command line to permit animation of the samples provided. 
  345.  
  346.  
  347.  
  348. Creating an Interface
  349.  
  350.  
  351.  
  352. Starting a new design
  353.  
  354.  
  355.  
  356.     From the Gpf editor main screen, select File + New...
  357.  
  358.  
  359.  
  360. The program property screen appears. The only required field is
  361. the "Main Source Name".  Enter any name here, then duplicate it
  362. in the "TaskList Title" field.  Ignore all other fields/controls
  363. and press on "Ok". 
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378.  
  379.  
  380.  
  381.  
  382.  
  383.  
  384.  
  385.  
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.  
  404.  
  405.  
  406.  
  407.  
  408.  
  409.  
  410.  
  411.  
  412.  
  413.  
  414.  
  415.  
  416.  
  417. The DEFAULT main entry screen appears, and has the logical name
  418. of "MainWindow" (as listed in the WINDOW option on the edit menu
  419. bar, and in its definition screen which we will visit shortly). 
  420. Unless re-defined later, this will be the primary screen of any
  421. created application, the first a user will see.  We will now
  422. modify it. 
  423.  
  424.  
  425.  
  426.                 
  427.  
  428.  
  429.  
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442. NOTE:    the mouse cursor will change shape as an aid to
  443. identifying the current mode and current field. The general
  444. cursor is simply a large arrow; but if you drag it slowly over
  445. the menu bar it will momentarily change to an index finger. 
  446. While in this shape, a mouse click will place you in menu bar
  447. edit.  Or clicking once while it is in its general shape will
  448. cause it to change to a hollow cross; this is the object
  449. selection cursor, and the current object outline is emphasized. 
  450. Double clicking on an object with this cursor will place you in
  451. a definition screen hierarchy for that object.
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459. The current screen (or any object, for that matter) can be
  460. resized or moved at any time.  Gpf marks the current object by
  461. making that object's border dark gray in color.  Ensure that
  462. "MainWindow"  is the current object by placing the cursor in the
  463. middle of it and clicking the left mouse button once.  (If you
  464. accidentally double click on the button you will not only select
  465. the screen but you will also be placed in a definition dialog
  466. for it.  No harm done,  just press the Cancel button to return.)
  467.  Press and hold down the left mouse button while dragging the
  468. screen to your display's center.   At this point you are
  469. changing the initial size and location of the entry screen of
  470. the application you are creating.
  471.  
  472.  
  473.  
  474.  
  475.  
  476. Editing the default MAIN screen
  477.  
  478.  
  479.  
  480. With the cursor in the middle of the new screen, double click on
  481. the left mouse button.  The "styles" definition dialog will
  482. appear. 
  483.  
  484.  
  485.  
  486.  
  487.  
  488. Edit the "Title" field by placing the cursor in that field and
  489. clicking once.  Delete the default text and replace it with an
  490. appropriate string, such as "Demo Test Screen- Main".  This text
  491. will be filled in on the MainWindow title bar [You can, at any
  492. time, click on the "Ok"  button to view the results of any
  493. selections; re-enter by double click, as before].  Experiment
  494. all you like and examine the results. The only change needed for
  495. this tour is the alteration of the title text. 
  496.  
  497.  
  498.  
  499. Press "Ok" to return to the main editor screen, and the view of
  500. the screen being generated .
  501.  
  502.                       
  503.  
  504. From the "Toolkit" menu, select "TEST" (notice that all other
  505. menu options will be disabled).  In this mode you can view some
  506. of the actions associated with defined controls, such as
  507. drop-down menus.
  508.  
  509.  
  510.  
  511. Click on "File" and then "Help" menu selections.  This will show
  512. you the default sub-menus attached to these choices. We will
  513. edit one or two.  Click on the system button (upper left), then
  514. on the minimize (down arrow) button in the upper right.  To
  515. restore, double click on the icon.
  516.  
  517.  
  518.  
  519.  
  520.  
  521. Exit the test mode by clicking on "Toolkit", then "Test". 
  522.  
  523.  
  524.  
  525.  
  526.  
  527. A number of differing approaches may be used when building a
  528. design with Gpf.  In this tutorial we will build a design in a
  529. bottom up manner, that is we will create a number of simple
  530. objects and combine them to complete the design.  This is easy
  531. and logical since Gpf allows for the creation and maintenance of
  532. lists of PM objects.  These objects may then be used and reused
  533. in conjunction with standard objects and controls to create a
  534. design of any level of complexity.
  535.  
  536.  
  537.  
  538. Create Presentation Objects
  539.  
  540.  
  541.  
  542. Create two objects by pressing on "Object", then "Presentation
  543. Object...".  
  544.  
  545. Presentation objects  are named sets of visual attributes which
  546. can be attached to buttons, frames, listboxes, etc.  We will be
  547. able to assign these attributes to controls and frames created
  548. later.
  549.  
  550.  
  551.  
  552. In the "Presentation Parameters" screen press the "Add" button
  553. to add to displayed list of Presentation Parameters;  you should
  554. be presented with the Presentation Parameter definition screen
  555. (see fig.)
  556.  
  557.  
  558.  
  559.                         
  560.  
  561.  
  562.  
  563.  
  564.  
  565. edit the Name field to "PresOptions"
  566.  
  567.  
  568.  
  569. scroll through and select "18.Helv" in Font Name Size
  570.  
  571.  
  572.  
  573. scroll through and select "Clr_Blue" in Background Color
  574.  
  575.  
  576.  
  577. scroll through and select "Clr_Yellow" in Foreground Color
  578.  
  579.  
  580.  
  581. scroll through and select "Clr_DarkBlue" in Border Color
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589. press the "Ok" button; the set of attributes just created now
  590. appears in the list
  591.  
  592.  
  593.  
  594. press "Add" again
  595.  
  596.  
  597.  
  598. edit the Name field to "Danger"
  599.  
  600.  
  601.  
  602. scroll through and select "14.Helv" in Font Name Size   
  603.  
  604.  
  605.  
  606. scroll through and select "Clr_Red" in Background Color    
  607.  
  608.  
  609.  
  610. scroll through and select "Clr_Yellow" in Foreground Color
  611.  
  612.  
  613.  
  614. scroll through and select "Clr_Pink" in Border Color    
  615.  
  616.  
  617.  
  618. press on "Ok" button,  in two screens.  You are back in the top
  619. screen. 
  620.  
  621.  
  622.  
  623.  
  624.  
  625. Register a bitmap & icon object
  626.  
  627.  
  628.  
  629. press "Object", then "Icon/Bitmap/Pointer Object...."
  630.  
  631.  
  632.  
  633. press on "Add Object"
  634.  
  635.  
  636.  
  637. press "BitMap" radio button, in the File type field
  638.  
  639.  
  640.  
  641. select,  in the directory field,  your Gpf
  642. drive:\directory\SAMPLE32. The SAMPLE32 directory is a
  643. sub-directory of your Gpf directory, created during the INSTALL
  644. process.  Depending on how you organized your installation, you
  645. may need to select several items in succession;  check the Path
  646. field as you "build" the full path name.
  647.  
  648.  
  649.  
  650. highlight (single click) SAMPLE4.BMP  in the File Name list box
  651.  
  652.  
  653.  
  654. in the "Name" field change the default name (Icon1) to
  655. FileCabinet  
  656.  
  657.  
  658.  
  659. press "Ok" .  The item is now listed (registered), and you can
  660. see its image in the list.
  661.  
  662.     
  663.  
  664.  
  665.  
  666.  
  667.  
  668. press "Add Object" again
  669.  
  670.  
  671.  
  672. press the Icon pushbutton 
  673.  
  674.  
  675.  
  676. create the path name,  as before, to your Gpf
  677. drive:\directory\SAMPLE 
  678.  
  679.  
  680.  
  681. select any entry in File Name, such as SAMPLE2.ICO
  682.  
  683.  
  684.  
  685.  
  686.  
  687. press "Ok" in succeeding screens until you are back at the top
  688. (original) level
  689.  
  690.  
  691.  
  692.  
  693.  
  694. create a User Object 
  695.  
  696.  
  697.  
  698. press "Object", then "User Function Object..."
  699.  
  700. User Function Objects  are named custom application code pieces
  701. or methods.  These objects are used along with Gpf built in
  702. actions to allow the creation of complete applications without
  703. need to modify the generated source files. 
  704.  
  705.  
  706.  
  707. in the USER FUNCTION screen, press on "Add"; a two-field screen
  708. appears
  709.  
  710.  
  711.  
  712. edit the Name field to "MyCode", then press the Tab key (NOT
  713. return), or click on the edit screen with the mouse;  you are
  714. now in a simple text editor
  715.  
  716.  
  717.  
  718. enter any typical code, such as "CallMyFunction();".   Syntax
  719. rules will not be enforced, but of course would be important in
  720. the full version of Gpf,  which would insert this code in
  721. generated files.
  722.  
  723.  
  724.  
  725. press "Ok" to return to the preceding screen. Note that MyCode
  726. now appears in the list of registered functions.
  727.  
  728.  
  729.  
  730. press on "Ok" again;  you should be at the top level
  731.  
  732.  
  733.  
  734. Just as we have registered and created these objects, we could
  735. build lists of User Controls and Message Boxes for use in our
  736. design.  Since we now have a few items to work with let's begin
  737. our design.
  738.  
  739.  
  740.  
  741. Editing the Menu Bar
  742.  
  743.  
  744.  
  745. Place the cursor on the menu bar (it will change shape to an
  746. "index" finger) and click.  The "Selection ActionBar" dialog for
  747. this window is activated. 
  748.  
  749.  
  750.  
  751. in the select window, double click on the "ActionBarHelp" entry.
  752. The new  dialog allows you to define some additional properties
  753. for this item. 
  754.  
  755.  
  756.  
  757. in the styles box click on the "Button Separator" checkbox, a
  758. tick mark should appear, indicating an active option
  759.  
  760.  
  761.  
  762. press the arrow in the "Accelerator Key" box, then scroll down
  763. and click on the "F1" entry. 
  764.  
  765.  
  766.  
  767. press "OK" to return to the "Selection ActionBar" dialog
  768.  
  769.   
  770.  
  771. press the "+" button by the "ActionBarHelp" entry to expand the
  772. Pulldown menu list
  773.  
  774.  
  775.  
  776. with the mouse (or arrow keys) select the "PullDownKeysHelp"
  777. line, then press on the "Destroy" button.  Confirm this action
  778. when presented with a message.  This item is now deleted. 
  779.  
  780.  
  781.  
  782. with the mouse (or the arrow keys) select "ActionBarFile", then
  783. press on "Add Sibling" , you again find yourself in the "Menu
  784. options" definition screen
  785.  
  786. The effect of add sibling is to create another item immediately
  787. following the select item and at the same level. As we will see
  788. later, add children will add an item at a lower level, in this
  789. case a pulldown.
  790.  
  791.  
  792.  
  793. edit the "Name" field to "Options".  This will be the logical ID
  794. for this item; for this and other objects this is the name by
  795. which it can be accessed,  e.g. by hypertext links in the Help
  796. System.
  797.  
  798.  
  799.  
  800. edit the "Text" field to read "~Options".  
  801.  
  802. The tilde preceding the 'O' will cause this letter to be
  803. underscored, such that in the compiled application an 'Alt-O'
  804. keystroke will invoke this menu. 
  805.  
  806.  
  807.  
  808. in "Submenu Presentation" drop down list, select "PresOptions",
  809. defined earlier.
  810.  
  811.  
  812.  
  813. press "OK" to return to the "ActionBar Selection" dialog,
  814. "ActionBar1"  which we just created should be highlighted
  815.  
  816.  
  817.  
  818. press "Add Children", in this case we will define a pulldown
  819.  
  820.  
  821.  
  822.     
  823.  
  824.  
  825.  
  826.  
  827.  
  828. edit the "Name" field to "OptionsSearch"
  829.  
  830.  
  831.  
  832. edit the "Text" field to "~Search"
  833.  
  834.  
  835.  
  836. select "Danger" from the "Submenu Presentation" box
  837.  
  838.  
  839.  
  840. press "OK"  to accept and return
  841.  
  842.  
  843.  
  844. press the "Add Children" button to create yet another level of
  845. menus; i.e. a submenu
  846.  
  847.  
  848.  
  849.  
  850.  
  851. edit "Text" to "By ~Name"
  852.  
  853.  
  854.  
  855. press "Ok"
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.  
  863. press "Add Sibling" to add another submenu to "OptionsSearch"
  864. pulldown 
  865.  
  866.  
  867.  
  868. edit "Text" to "By ~Attribute"
  869.  
  870.  
  871.  
  872. press "Ok" to return to the "Selection ActionBar" dialog
  873.  
  874.  
  875.  
  876.  
  877.  
  878. Now let's create another pulldown just to complete the menu.
  879.  
  880.  
  881.  
  882. select the "OptionsSearch" pulldown we just created using the
  883. mouse (or cursor keys)
  884.  
  885.  
  886.  
  887. press "Add Sibling"  to add another pulldown
  888.  
  889.     
  890.  
  891.  
  892.  
  893.  
  894.  
  895.  
  896.  
  897. on the "Menu Options" dialog edit the "Name" field to
  898. "OptionDestroy"
  899.  
  900.  
  901.  
  902. edit  the "Text" field to "~Delete"
  903.  
  904.  
  905.  
  906. press "OK" to return
  907.  
  908.  
  909.  
  910. press  "Add Children"; to create a submenu
  911.  
  912.  
  913.  
  914. on right hand side of the "Menu Options" dialog, locate the
  915. "Type" box and click on the BitMap button.  The down-arrow box
  916. in the combo box will become active, next to the (default) name
  917. NULL.
  918.  
  919.  
  920.  
  921. click on the down-arrow, activating the selection window.  All
  922. registered (we only did one) bitmaps will be listed.  
  923.  
  924.  
  925.  
  926. click (select) the last entry.  The bitmap will appear in the
  927. display area.
  928.  
  929.  
  930.  
  931. press "OK" to complete the submenu
  932.  
  933.  
  934.  
  935. press "OK" again to complete the menu definition and return the
  936. WYSIWYG editor, note the changes to the Menu Bar.
  937.  
  938.  
  939.  
  940.  
  941.  
  942.  
  943.  
  944.  
  945.  
  946.  
  947.  
  948.  
  949.  
  950.  
  951.  
  952.  
  953.  
  954. Adding a button control.
  955.  
  956.  
  957.  
  958.  
  959.  
  960.  
  961.  
  962. Press on "Create" menu item, then select "Button" from the
  963. pulldown, 
  964.  
  965.  
  966.  
  967. Select PushButton from the  Button submenu. [ Figure 7]
  968.  
  969.             
  970.  
  971. Drag the created object to the bottom-center of your Main
  972. Window, perhaps an inch up from the bottom border.
  973.  
  974.  
  975.  
  976. Click on the left mouse button to drop it. You will be placed in
  977. the Button Control Styles window, 
  978.  
  979.  
  980.  
  981.  
  982.  
  983.  
  984.  
  985.  
  986.  
  987.  
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.  
  995.  
  996.  
  997.  
  998.  
  999.  
  1000.  
  1001.  
  1002.  
  1003.  
  1004.  
  1005.  
  1006.  
  1007.  
  1008.  
  1009.  
  1010.  
  1011. edit the Text field to read "~Panic"; this is the button label
  1012.  
  1013.  
  1014.  
  1015. in the Presentation box, scroll through and select "Danger", as
  1016. in
  1017.  
  1018.  
  1019.  
  1020. press "Ok",  which will return you to the editor and main menu 
  1021.  
  1022.  
  1023.  
  1024.  
  1025.  
  1026.  
  1027.  
  1028.  
  1029.  
  1030.  
  1031.  
  1032.  
  1033.  
  1034.  
  1035.  
  1036.  
  1037.  
  1038. place the cursor on the new PANIC button and click once, left
  1039. button;  the border of the button should change to gray, 
  1040. indicating that this is now the 'current' object.
  1041.  
  1042. Slowly drag the cursor around the object, and note how the
  1043. cursor will change shape as you traverse the object borders.  
  1044. In this manner you can  re-size the border(s) in any cardinal
  1045. direction; the behavior here is similar to that of PM
  1046. sizable-border objects.  To simply move the object, without
  1047. sizing, place the 'hollow-cross' cursor in the middle of the
  1048. button, then press and hold down the left button.  The cursor
  1049. will change to quad arrows. With the button still depressed, you
  1050. can drag the object anywhere within the client area and drop it
  1051. by releasing the mouse button.  Experiment a little,  moving and
  1052. re-sizing the button.
  1053.  
  1054.  
  1055.  
  1056. More fundamental changes to this object can be performed by a
  1057. quick  double-click on that object, which will take you back to
  1058. the initial definition screen for that object.  All such screens
  1059. can be exited by successive presses on "Ok".
  1060.  
  1061.  
  1062.  
  1063. Although not strictly part of this "guided tour", you can
  1064. similarly create an instance of every object listed in the
  1065. "Create" submenu. You may also duplicate an object by dragging
  1066. its shadow with the right mouse button.  When positioned and
  1067. released a copy of the object will be created.   It wouldn't
  1068. hurt to experiment a bit.  An object can always be removed by
  1069. double-clicking on it, then pressing on "Destroy" in its primary
  1070. definition screen [you will be asked to verify your intent by a
  1071. message screen; press "Yes"].  The definition screens will give
  1072. you a good idea of the sorts of attributes which are
  1073. controllable for each object.
  1074.  
  1075.  
  1076.  
  1077. By now you should have noticed the general Gpf design
  1078. methodology; new objects are always begun from the "Create"
  1079. menu, dropped on the screen, and their attributes set/modified
  1080. from the definition screen for that object.  There are two ways
  1081. to get to an object's definition screen:
  1082.  
  1083.  
  1084.  
  1085. - when you first create an object, you are taken to that screen
  1086. immediately upon initially locating the object on the screen
  1087. under construction. (Note that this is a default option which
  1088. may be turned off from the "Options" menu.
  1089.  
  1090.  
  1091.  
  1092. - from the graphical screen, double click the cursor in the
  1093. center of any existing object.
  1094.  
  1095.  
  1096.  
  1097.  
  1098.  
  1099. Adding a ListBox control
  1100.  
  1101.  
  1102.  
  1103. using the mouse select "Listbox" from the create menu
  1104.  
  1105.  
  1106.  
  1107. drop the listbox in the upper half of the screen being built. 
  1108. You will immediately be taken to the underlying definition screen
  1109.  
  1110.  
  1111.  
  1112. in the "Control Styles" group box, click "Horz Scroll Bar" to
  1113. the ON state.  Press "OK" to return to the edit screen
  1114.  
  1115.  
  1116.  
  1117. re-size the list box so that it occupies a majority of the
  1118. client area, similar to the figure below 
  1119.  
  1120.  
  1121.  
  1122. The completed screen can be placed in Test mode. Check all
  1123. functions, particularly the alterations and additions to the
  1124. menu bar.
  1125.  
  1126.  
  1127.  
  1128. select "Test" from the Toolkit menu using the mouse
  1129.  
  1130.  
  1131.  
  1132.  
  1133.  
  1134.  
  1135.  
  1136.  
  1137.  
  1138.  
  1139.  
  1140. The system menu is operable, as are the minimize/maximize
  1141. buttons, and the sizable border.  A bit later we will show you
  1142. how to add intelligence to the controls we've created so far.
  1143.  
  1144.  
  1145.  
  1146. return from Test mode by again selecting "Test" from the Toolkit
  1147. menu
  1148.  
  1149.  
  1150.  
  1151.  
  1152.  
  1153.  
  1154.  
  1155.  
  1156.  
  1157. Secondary Windows and Extended Help
  1158.  
  1159.  
  1160.  
  1161. Creating more windows and/or secondary (child) windows with Gpf 
  1162. is as simple as creating another control.  Once created, the
  1163. window is manipulated and filled in just as the default entry
  1164. screen we have been working on.  Just as with any control, when
  1165. we create a new window we will be placed in its definition
  1166. screen.
  1167.  
  1168.  
  1169.  
  1170. In the Gpf Editor main menu, click on "Window".  The selection
  1171. "MainWindow" will appear, along with a checkmark indicating that
  1172. it is visible.  
  1173.  
  1174. This pulldown offers a list of all windows in the current
  1175. design.  The tick or checkmark by any window indicates that the
  1176. window is shown and available to work on.   Via this mechanism
  1177. windows may be toggled on and off to keep the screen from
  1178. becoming cluttered.  Since we have created only one window so
  1179. far, the list is somewhat short, i.e. a single entry.
  1180.  
  1181.  
  1182.  
  1183. click on "MainWindow" to toggle it off (it will remain in memory
  1184. and can always be brought back with the same steps), giving you
  1185. a clean screen to work with.
  1186.  
  1187.  
  1188.  
  1189. select "Window/Dialog..." from the  Create menu; A new window
  1190. with a set of standard default styles will be created.
  1191.  
  1192.  
  1193.  
  1194.  
  1195.  
  1196. in both the Parent and Owner fields, select MainWindow instead
  1197. of the current choice, DESKTOP 
  1198.  
  1199.  
  1200.  
  1201. edit the "Title" field to "Child Window"
  1202.  
  1203.  
  1204.  
  1205. click the "System Menu" checkbox OFF
  1206.  
  1207.  
  1208.  
  1209. click the "APPL Modal" checkbox OFF
  1210.  
  1211.  
  1212.  
  1213. click the "Information Msg" checkbox ON
  1214.  
  1215.  
  1216.  
  1217. click both "Horz Scroll Bar" and "Vert Scroll Bar" checkboxes ON
  1218.  
  1219.  
  1220.  
  1221. in Border Styles, select "Dialog Border"
  1222.  
  1223.  
  1224.  
  1225. press "OK"
  1226.  
  1227.  
  1228.  
  1229.  
  1230.  
  1231.  
  1232.  
  1233.  
  1234.  
  1235.  
  1236.  
  1237.  
  1238.  
  1239.  
  1240.  
  1241. click on "Window" in the Gpf Editor main menu to activate the
  1242. Window menu - notice that now both windows are listed. 
  1243.  
  1244. The MainWindow can be displayed by itself, but the secondary
  1245. cannot; this is due to PM ownership rules. Click on the
  1246. secondary window name... if visible, it will vanish, and vice
  1247. versa.  Make sure it is invisible, then click on MainWindow
  1248. until it is visible. 
  1249.  
  1250.  
  1251.  
  1252.  
  1253.  
  1254. Up to this point we have been ignoring key buttons in the
  1255. definition windows: EntryHelp, Associate, Destroy, and Action. 
  1256. These are critical to the final application, but unfortunately
  1257. their effects cannot be simulated in TEST mode (in other words
  1258. with this version).  However, the definition phase can be walked
  1259. through, and the effects described.
  1260.  
  1261.  
  1262.  
  1263. NOTE:  the Associate button, used for OS/2 DataBase Manager
  1264. table reads, is disabled unless the application was defined to
  1265. have a DBM tie from the outset (see File- Properties menu.)
  1266.  
  1267.  
  1268.  
  1269. double click on the MainWindow object anywhere in the client
  1270. area or title bar (not the PANIC button or the Listbox!!)
  1271.  
  1272.  
  1273.  
  1274. press on "EntryHelp".  A window with four main sections appears:
  1275.  
  1276.  
  1277.  
  1278.  
  1279.  
  1280.  
  1281.  
  1282.  
  1283.  
  1284.  
  1285.  
  1286. The HelpTitle and HelpIndex fields can be edited to meaningful
  1287. titles if desired; their effect is the inclusion of these titles
  1288. in the general, system HELP screens with your name, instead of
  1289. the default sequential names assigned by Gpf. 
  1290.  
  1291.  
  1292.  
  1293. The large central box is a multiple line entry dialog box, into
  1294. which you can enter the text you want to associate with the HELP
  1295. screen for the current object. The user, when F1 is pressed,
  1296. will see this text in a PM HELP screen.  It can also be accessed
  1297. via TITLE\INDEX from higher level system HELP utilities.
  1298.  
  1299.  
  1300.  
  1301. The Information Message field can be edited with abbreviated
  1302. help information, along the lines of a prompt. This text will
  1303. appear at the bottom of the screen if that screen had the
  1304. Information Msg checkbox selected during screen definition.
  1305.  
  1306.  
  1307.  
  1308.  
  1309.  
  1310.  
  1311.  
  1312.  
  1313.  
  1314. Edit these fields as you please, but keep in mind that you will
  1315. not be able to see any results when you return to higher levels.
  1316. [The ANIMATOR in the FULL version would allow you to see
  1317. Information Messages, and would also prepare the complete HELP
  1318. files as required by the IPF utilities.  These would be
  1319. automatically processed when you GENERATE or COMPILE, and linked
  1320. in to your application.  Sorry... there are limits to the DEMO.] 
  1321.  
  1322.  
  1323.  
  1324. press "OK" to return to the window definition screen 
  1325.  
  1326.  
  1327.  
  1328. press "OK" again to return to the Gpf main menu
  1329.  
  1330. Linking Screens and Program Logic
  1331.  
  1332.  
  1333.  
  1334. This section describes the method employed by Gpf to install
  1335. Actions (program flow) to and between the screens and controls
  1336. created in preceding steps.  It is very important that all
  1337. desired objects are defined, or else they will not appear in the
  1338. lists Gpf uses to help you with this major step.
  1339.  
  1340.  
  1341.  
  1342. ensure you are in the top level screen and that MainWindow is
  1343. visible.  Turn off the secondary window from the Window menu
  1344. item, if necessary.
  1345.  
  1346.  
  1347.  
  1348. double click on the PANIC button in order to enter its primary
  1349. definition screen.
  1350.  
  1351.  
  1352.  
  1353. press on "Action". 
  1354.  
  1355. You are now being presented with a list of action anchor points
  1356. or events to which you may attach actions.  Since a button is a
  1357. simple control the only anchor point is "Click [Button]".  Other
  1358. controls offer more anchor points appropriate to their
  1359. functionality. 
  1360.  
  1361.  
  1362.  
  1363. press on the "View\Modify Action On..." button 
  1364.  
  1365. you will be presented with an empty list of actions to be
  1366. performed on the Button Click
  1367.  
  1368.  
  1369.  
  1370. press on "AddTop", which is where we will define what is to
  1371. occur when the user presses on the PANIC button.  
  1372.  
  1373. You are now presented with a list of actions and objects to act
  1374. upon.  From this list we choose the functions to invoke when the
  1375. button is clicked.
  1376.  
  1377.  
  1378.  
  1379.  
  1380.  
  1381.  
  1382.  
  1383. scroll down the "Action" list to the bottom entry, "User
  1384. Function" 
  1385.  
  1386.  
  1387.  
  1388. click on "User Function" ; note that the "Object column now
  1389. lists all the user objects we have created (again a somewhat
  1390. short list)
  1391.  
  1392.  
  1393.  
  1394. click on the "MyCode" entry in the Object list.  
  1395.  
  1396. You have just created a link between Gpf code and your code,
  1397. which can be in-line or an external function call.   [But how
  1398. does Gpf resolve function prototyping to external functions ??
  1399. Easy... if there exists (in your source directory) a '.H' header
  1400. file, of the same name as the set of screens you are creating,
  1401. it will automatically be "#included" into the source file being
  1402. created by Gpf.  Into this header file, which can include other
  1403. files, you would place all GLOBALS\EXTERNALS etc.]
  1404.  
  1405.  
  1406.  
  1407. press "OK", in each screen until you return to the Gpf main menu
  1408. level and the WYSIWYG Editor
  1409.  
  1410.  
  1411.  
  1412. select the application Menu Bar (the pointer will change to an
  1413. index finger; click at that point).
  1414.  
  1415.  
  1416.  
  1417. press the "+" by  the "ActionBarFile" ("File") entry to expand
  1418. the menu view
  1419.  
  1420.  
  1421.  
  1422. select the "PullDownExit" ("Exit") by either clicking on the
  1423. entry to highlight it then pressing "View/Modify" or simply
  1424. double click "PullDownExit"
  1425.  
  1426.  
  1427.  
  1428. press on "Action"
  1429.  
  1430.  
  1431.  
  1432. press on "View/Modify Action On..." (or double click "Click
  1433. [Menu]")
  1434.  
  1435.  
  1436.  
  1437. ensure the list of action includes  "Quit  Application   #".  If
  1438. not you may use "Add Top", "Add", or "Update to invoke the
  1439. Action list and select "Quit Application"
  1440.  
  1441.  
  1442.  
  1443. press "OK" on each action screen until you have returned to the
  1444. "Menu options" screen
  1445.  
  1446.  
  1447.  
  1448. press "OK" to return to the "Selection ActionBar" screen 
  1449.  
  1450.  
  1451.  
  1452. expand the "ActionBar1" ("Options") entry this time (as opposed
  1453. to the "ActionBarFile" just done) 
  1454.  
  1455.  
  1456.  
  1457. double click on the "OptionsDestroy" ("Delete") entry.
  1458.  
  1459.  
  1460.  
  1461. double click  on "SubMenu 1", 
  1462.  
  1463.  
  1464.  
  1465. press "Action" 
  1466.  
  1467. We are defining what will happen when the user presses on the
  1468. bitmap.  
  1469.  
  1470.  
  1471.  
  1472. double click "Click [Menu]" or press "View Modify..."
  1473.  
  1474.  
  1475.  
  1476. press on "AddTop" on the list of actions screen
  1477.  
  1478.  
  1479.  
  1480. in the Action list select screen, select "Window Show(visible)"
  1481.  
  1482.  
  1483.  
  1484. in the window list on the action list select screen, select
  1485. "Window1"
  1486.  
  1487.  
  1488.  
  1489. accept each screen by pressing "OK"  until you return to the Gpf
  1490. main menu and editor 
  1491.  
  1492.  
  1493.  
  1494. At this point you have created a link between the two generated
  1495. screens.  In ANIMATE mode (not present) you would be able to see
  1496. the second screen appear when you selected that particular
  1497. option from the menu bar. Of course, user code is inescapable at
  1498. some point unless you are simply creating an interface during a
  1499. conceptual phase, or preparing an executive  presentation. 
  1500. However, how this would be done has already been shown in one
  1501. instance; all else is mostly a repetition of the same steps.
  1502.  
  1503.  
  1504.  
  1505. press "Test" in the "Toolkit" pulldown menu
  1506.  
  1507.  
  1508.  
  1509.  
  1510.  
  1511.  
  1512.  
  1513.  The Gpf Editor has been placed in test mode and the pulldowns
  1514. are being examined.
  1515.  
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.  
  1523.  
  1524.  
  1525.  
  1526.  
  1527.  
  1528. If you have faithfully followed all the instructions in this
  1529. tutorial, this is how you design should appear in test mode. 
  1530. You may want to experiment some more with the more complicated
  1531. CUA 91 controls; i.e. Notebook, ValueSet, etc. now that you
  1532. understand the basic methodology used by Gpf.  The more powerful
  1533. controls are created and modified just as we have seen, they
  1534. just have many more options.
  1535.  
  1536.  
  1537.  
  1538.  
  1539.  
  1540.  
  1541.  
  1542.  
  1543.  
  1544.  
  1545.  
  1546.  
  1547.  
  1548.  
  1549.  
  1550.  
  1551.  
  1552.  
  1553.  
  1554.  
  1555.  
  1556.  
  1557.  
  1558.  
  1559.  
  1560.  
  1561.  
  1562.  Sample Pre-defined Interface
  1563.  
  1564.  
  1565.  
  1566. This is included on your disk for inspection purposes, as an
  1567. example which shows more complicated features and/or
  1568. hierarchies. The file of interest is SAMPLE.ORC, located in the
  1569. SAMPLE32 sub-directory under Gpf. 
  1570.  
  1571. From the Gpf Main Menu:
  1572.  
  1573.  
  1574.  
  1575. Click on FILES, then on OPEN.
  1576.  
  1577.  
  1578.  
  1579. change the DRIVE\DIRECTORY field to the SAMPLE32 sub-directory. 
  1580.  
  1581.  
  1582.  
  1583. double click on SAMPLE.ORC
  1584.  
  1585.  
  1586.  
  1587. NOTE:  if Extended Services DataBase Manager is not running, you
  1588. may get warning  messages. It is OK to say YES to the
  1589. "Destroy,.... etc." message window; the change will not be
  1590. saved. [NOTE: this sample application interacts with the system
  1591. SQL functions. It assumes you have at some point run SQLSAMPL as
  1592. part of learning DBM. This utility creates a sample database,
  1593. used by our demo].
  1594.  
  1595.  
  1596.  
  1597. The primary reason for inclusion of this set of screens is to
  1598. show you how a more complex set of screens can be
  1599. interconnected, both with Actions, and with Association(s) to  a
  1600. Database.  Examine the definition screens,  particularly the
  1601. Action option.  You can edit these as well,  though any
  1602. modifications performed by you will not be saved;  but you can
  1603. edit the windows and simulate them under TEST.  When you Exit,
  1604. or perform any operation which asks you if you want to Save the
  1605. current file (SAMPLE), answer NO.
  1606.  
  1607.  
  1608.  
  1609. Also included is the C source code generated from this
  1610. application.   As this is an SQL application the source file is
  1611. suffixed ".SQC".  SAMPLE.SQC has been included to provide you
  1612. the opportunity to evaluate the quality of Gpf generated code.
  1613.  
  1614.  
  1615.  
  1616. GPFRUN.EXE - The Animator
  1617.  
  1618.  
  1619.  
  1620. GpfRun  is the Gpf Animator program.  Though the demo will not
  1621. allow you to call this program from the editor you may use it to
  1622. animate the sample .ORC files shipped with the demo.   Paths for
  1623. GpfRun are not set automatically by the demo installation.  If
  1624. you wish to use this program you must assure that it has access
  1625. to the directory containing your .ORC files.  The program may
  1626. then be invoked from the OS/2 desktop or command line with an
  1627. ORC as the argument.
  1628.  
  1629.  
  1630.  
  1631. What else can Gpf do, beyond the DEMO version ?
  1632.  
  1633.  
  1634.  
  1635. create dynamic, position sensitive messages. [the DEMO version
  1636. allows you to create these, but not view the results; the
  1637. Animate function is able to show these.]
  1638.  
  1639.  
  1640.  
  1641. create a full Extended HELP system, screen leve, or down to
  1642. control object level. 
  1643.  
  1644.  
  1645.  
  1646. interfacing to system DATA BASES created by DBM. Gpf logs and
  1647. presents for selection ALL data bases found on the system.
  1648.  
  1649.  
  1650.  
  1651. save all your work
  1652.  
  1653.  
  1654.  
  1655. read existing  .ORC and .RES files.
  1656.  
  1657.  
  1658.  
  1659. generate all application-specific intermediate and source code
  1660. files 
  1661.  
  1662.  
  1663.  
  1664. automate the LINK/COMPILE cycle
  1665.  
  1666.  
  1667.  
  1668. the ANIMATOR is fully integrated into the editor, which permits
  1669. inspection of the complete  interface without compilations.
  1670.  
  1671.  
  1672.  
  1673. create and link message screens (INFO, ERROR, WARNING, etc.). 
  1674.  
  1675.  
  1676.  
  1677. incremental code development.
  1678.  
  1679.  
  1680.  
  1681. Where Does One Go From Here ?
  1682.  
  1683.  
  1684.  
  1685. Contact Gpf Systems regarding price and delivery.
  1686.  
  1687.  
  1688.  
  1689. The Gpf product is shipped in two versions:
  1690.  
  1691.  
  1692.  
  1693. DEMO-- the product you have. This version is functional to the
  1694. point of saving: all work is volatile and will vanish when you
  1695. power down or exit the editor.  However, you can create
  1696. arbitrarily complex user interfaces exactly as in the full Gpf
  1697. version.  The TEST mode can be invoked,  allowing a high level
  1698. check of control operations.
  1699.  
  1700.  
  1701.  
  1702. A full version, price dependent on volume.
  1703.  
  1704.  
  1705.  
  1706. FULL-- combines the demo with save facilities, the code
  1707. generators, and a comprehensive set of sample designs.  The
  1708. ANIMATOR is also supplied, permitting a higher level of
  1709. simulation (such as HELP system, information messages, etc.)
  1710.  
  1711.  
  1712.  
  1713. Both versions have the identical user interface. The experience
  1714. gained by using one is directly applicable to the other.  For
  1715. all further information:
  1716.  
  1717.  
  1718.  
  1719.     Gpf Systems, Inc.
  1720.  
  1721.  
  1722.  
  1723.     30 Falls Road
  1724.  
  1725.  
  1726.  
  1727.     P.O. Box 414
  1728.  
  1729.  
  1730.  
  1731.     Moodus, CT  06469
  1732.  
  1733.  
  1734.  
  1735.     Tel: (203) 873-3300      Fax: (203) 873-3302
  1736.  
  1737.      
  1738.  
  1739.     Sales: (800)831-0017
  1740.  
  1741.  
  1742.  
  1743.  
  1744.  
  1745.  
  1746.  
  1747.