home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 17 / CD_ASCQ_17_101194.iso / vrac / ptgenr2.zip / PTG_USER.DOC < prev    next >
Text File  |  1994-08-01  |  51KB  |  1,736 lines

  1.  
  2.  
  3. C           O          N           T         E         N          T           S
  4.  
  5. ───────────────────────────────────────────────────────────────────────────────
  6.  
  7.  
  8.  
  9. Introduction                                1     Appendix B Environment variables         29
  10. PtGen features  .......................     1    
  11. TVTool  ..............................      1    
  12. TVToys..............................        2    
  13. What's in this manual  .................    2    
  14. Typefaces used in these manuals........     3    
  15. How to contact NederWare   ............     3    
  16. Acknowledgements ...................        4    
  17.  
  18. Chapter 1 Getting started                   5    
  19. File list  ..............................   5    
  20. Installing PtGen  ......................    5    
  21.     Environment variables   ..............  5    
  22.     Installing PtGen under Tools menu
  23.     of Borland IDE  .....................   6    
  24.     Installing PtGen under Windows   .....  6    
  25.     Needed units.......................     6    
  26. Accessing Help.......................       6    
  27. Demo files  ...........................     7    
  28.  
  29. Chapter 2 The PtGen
  30.            Development-cycle                9    
  31. PtGen development-cycle overview  .....     9    
  32. Ptgen single dialog box creating mode...   10    
  33.  
  34. Chapter 3 PtGen basics                     11    
  35. Mouse operation  .....................     11    
  36. Keyboard operation...................      11    
  37.  
  38. Chapter 4 Sample applications              13    
  39. Creating a menubar and a statusline  ....  13    
  40. Creating a dialog box..................    17    
  41.  
  42. Chapter 5 Turning your code into
  43.            an executable                   21    
  44. An example of a simple main...........     21    
  45. A more elaborated main  ...............    22    
  46. Let PtGen create a main for you  ........  23    
  47.  
  48. Chapter 6 More advanced topics             25    
  49. Using string resource files..............  25    
  50. Adding units.........................      25    
  51. Using resources  ......................    25    
  52. Using TVToys  ........................     26    
  53.                                                  
  54.  
  55.  Appendix A Command-line options           27    
  56.  
  57.  
  58.  
  59.                 i
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.                                        ii
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124. I     N       T     R      O       D      U      C       T     I      O       N
  125. ───────────────────────────────────────────────────────────────────────────────
  126.  
  127.  
  128.         PtGen is a tool is intended for Turbo Pascal programmers who
  129.         wish to enhance their productivity by rapidly building Turbo
  130.         Vision screens. PtGen outputs source code and is capable of
  131.         reading that source code for further editing. PtGen comes in a real
  132.         mode and in a protected mode version. This manual applies to
  133.         both varieties.
  134.  
  135.  
  136. PtGen features
  137. ───────────────────────────────────────────────────────────────────────────────
  138.  
  139.         PtGen provides you with many things to make TurboVision
  140.         programming easier, including
  141.  
  142.         ■ Creation of complete applications or just standalone dialog
  143.           boxes
  144.         ■ Quick and interactive menubar building
  145.         ■ Quick and interactive statusline building
  146.         ■ Quick and interactive dialog box building
  147.         ■ Full helptext support for statusline help as well as for helpfiles
  148.           (.HLP)
  149.         ■ Build-in tutorial, covering creating of statuslines, menubars and
  150.           dialog boxes
  151.         ■ Support for TVTool 2.0 (see below section TVTool)
  152.         ■ Support for TVToys (see below section TVToys)
  153.  
  154.  
  155. TVTool
  156. ───────────────────────────────────────────────────────────────────────────────
  157.  
  158.         PtGen supports TVTool 2.0. TVTool is a TurboVision tool written
  159.         by Richard Hansen who can be reached at:
  160.  
  161.         ■ CompuServe: 70242,3367
  162.         ■ email: 70242.3367@compuserve.com
  163.         ■ fidonet: 1:282/115
  164.  
  165.         The TV Tool Box package was created to fill a few holes in Turbo
  166.         Vision for Turbo Pascal. TV Tool Box includes formatted data
  167.         entry with input masks, scrolling data entry dialogs, data entry
  168.         field locking, check mark menus, enhancements to TApplication,
  169.  
  170.  
  171.  
  172. Introduction                                                                  1
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.         some handy string routines, scrolling dialog boxes, 3D controls,
  181.         virtual list boxes, spin bars, sliders and more.
  182.  
  183.         PtGen currently supports all 3D controls of TVTool. PtGen also
  184.         supports all TbxEditLine and derivatives (including mask
  185.         definition). Planned enhancements include support for a scrollable
  186.         dialog box, sliders, and spinbars..
  187.  
  188.         Registered users of PtGen receive a 25% reduction on their TV Tool
  189.         Box package, just as registered users of TVTool receive a 25their
  190.         PtGen package.
  191.  
  192.         The shareware version of TVTool is shipped with the registered
  193.         version of TVTool, just as the shareware version of PtGen is
  194.         shipped with every registered version of TVTool.
  195.  
  196.         To receive your 25% registration discount YOU MUST INCLUDE
  197.         your PtGen registration number on your TV Tool Box order form.
  198.  
  199.         THE SPECIAL 25% DISCOUNT IS ONLY AVAILABLE ON
  200.         ORDERS MADE DIRECTLY TO RICHARD HANSEN.
  201.  
  202.  
  203. TVToys
  204. ───────────────────────────────────────────────────────────────────────────────
  205.  
  206.         PtGen has basic support for TVToys. Note that TVtool and TVToy
  207.         are mutually inconsistent! You can use the one or the other, but not
  208.         both.
  209.  
  210.         The advantage of using TVToys is its support for previous help
  211.         screens besides much more. See section 6 for how to make use of
  212.         TVToys.
  213.  
  214.  
  215. What's in this manual
  216. ───────────────────────────────────────────────────────────────────────────────
  217.  
  218.         This manual explains how to use PtGen to develop TurboVision
  219.         objects. It doesn't tell you how to write TurboVision programs.
  220.  
  221.         ■ Chapter 1, ``Getting started'', describes how to install, start, and
  222.           exit PtGen and how to access the Help system.
  223.         ■ Chapter 2, ``The PtGen Development cycle'', introduces to the
  224.           way PtGen is meant to be used, or how the author uses it.
  225.         ■ Chapter 3, ``PtGen basics'', gives an overview how mouse
  226.           buttons and function keys are assigned to perform tasks in
  227.           PtGen.
  228.         ■ Chapter 4, ``Sample applications'', covers the creation of a
  229.           complete application with menubar, statusline and dialog boxes.
  230.  
  231.  
  232. 2                                                              PtGen User Guide
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.         ■ Chapter 5, ``Creating an executable'', shows you how to write a
  241.           main program for PtGen. PtGen's code is always in a unit
  242.           (except for stand-alone dialog boxes). You need to include this
  243.           unit and to initialize some other units.
  244.         ■ Chapter 6, ``More advanced topics'', describes some more
  245.           elaborated uses of PtGen.
  246.         ■ Appendix A, ``Command-line options'', shows all
  247.           command-line options available with PtGen.
  248.         ■ Appendix B, ``Environment variables'', describes the two
  249.           environment variables for PtGen.
  250.  
  251.  
  252. Typefaces used in these manuals
  253. ───────────────────────────────────────────────────────────────────────────────
  254.  
  255.         All typefaces used in this manual were produced by L
  256.                                                                    A
  257.                                                                     TE X2",
  258.         dvips on a HP Laserjet IV. Their uses are as follows:
  259.  
  260.            Monospace type    This typeface represents text as it appears on-screen or in a
  261.         program. It is also used for anything you must type (such as      PTGEN
  262.         to start up PtGen).
  263.  
  264.                  Boldface    This typeface is used in text for command-line options.
  265.  
  266.                   Italics    Italics indicate identifiers that appear in text. They can represent
  267.         terms that you can use as they are, or that you can think up new
  268.         names for (your choice, usually). They are also used to emphasize
  269.         certain words, such as new terms.
  270.  
  271.                   Keycaps    This typeface indicates a key on your keyboard. For example,
  272.         ``Press  Esc  to exit a menu.''
  273.  
  274.                 Key1+Key2    Key combinations produced by holding down one or more keys
  275.         simultaneously are represented as  Key1+Key2     . For example, you can
  276.         edit an object by holding down the  Ctrl  key and pressing the  F8
  277.         function key. This key combination is presented as  Ctrl+F8.
  278.  
  279.  
  280. How to contact NederWare
  281. ───────────────────────────────────────────────────────────────────────────────
  282.  
  283.         NederWare offers a variety of services to answer your questions
  284.         about PtGen. Of course, this is true for registered users. If you
  285.         don't have registered yet, support shareware (and me and my
  286.         family) by registering PtGen to day. We made it very easy for you.
  287.         You can register by CompuServe, fax, email or telephone, see
  288.         REGISTER.FRM for details.
  289.  
  290.         CompuServe
  291.  
  292.  
  293. Introduction                                                                  3
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301. CompuServe ID 100120,3121    Subscribers to CompuServe can reach NederWare at 100120,3121. 
  302.         The latest versions of PtGen are available in library 1 of the
  303.         BPASCAL forum.
  304.  
  305.         Internet
  306.  
  307.         NederWare can be reached on internet through
  308. Email: berend@beard.nest.nl    NederWare@beard.nest.nl or berend@beard.nest.nl. For the latest 
  309.         PtGen check-out garbo.uwasa.fi.
  310.  
  311.         Fidonet
  312.  
  313.      Fidonet 2:281/527.23    NederWare can be reached on fidonet at 2:281/527.23. The latest
  314.         versions of PtGen are also available at 2:281/527, Contrast BBS,
  315.         The Netherlands. Its full international telephone number is
  316.         +31 70-3234903. From Holland dial 070-3234903.
  317.  
  318.  
  319. Acknowledgements
  320. ───────────────────────────────────────────────────────────────────────────────
  321.  
  322.         I would like to thank alpha tester Tom Kooij who provided me
  323.         with valuable suggestions about the PtGen user interface.
  324.  
  325.         I would also express my thanks to the following people who
  326.         contributed much to PtGen's operation: Hans van der Veeke and
  327.         David MiddleBrooks. Also I wish to thank betatesters Christian
  328.         Haarmeijer and Frank van der Ham who pointed out
  329.         inconveniences and detected many errors.
  330.  
  331.         Thanks to Wouter de Boer for creating the PtGen icon, so PtGen
  332.         can conveniently be called from your Microsoft Windows desktop
  333.         (shrudder...).
  334.  
  335.  
  336.  
  337.  
  338.  
  339.  
  340.  
  341.  
  342.  
  343.  
  344.  
  345.  
  346.  
  347.  
  348.  
  349.  
  350.  
  351.  
  352. 4                                                              PtGen User Guide
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361. C            H            A            P            T            E            R
  362. ───────────────────────────────────────────────────────────────────────────────
  363.  
  364.                                                                                             1
  365.  
  366.  
  367.  
  368.                                                                 Getting started
  369.  
  370.  
  371. File list
  372. ───────────────────────────────────────────────────────────────────────────────
  373.  
  374.         Before installing PtGen, you should review the contents of the
  375. Read the READ.ME file before    READ.ME file on your PtGen distribution diskette. This file
  376.                proceeding    contains important information (usage information, new features,
  377.         changes, known bugs, etc.) that became available after this manual
  378.         was printed. You should carefully review the READ.ME file before
  379.         using PtGen.
  380.  
  381.  
  382. Installing PtGen
  383. ───────────────────────────────────────────────────────────────────────────────
  384.  
  385.         PtGen is simple to install. But first make a backup copy of the
  386.         distribution diskette.
  387.  
  388.         Create a directory if necessary to hold your copy of PtGen. You
  389.         can create any directory you like. Advised directory is C:/PTGEN.
  390.         Make sure this directory is in your path because because each
  391.         program developed with PtGen needs a seperate directory. You
  392.         will call PtGen from the directory of each application.
  393.  
  394.         Next unpack PtGen with the directory option enabled. If PtGen is
  395.         packed with arj use arj x to unpack. If PtGen is packed with
  396.         pkzip use pkzip -d to unpack.
  397.         ───────────────────────────────────────────────────────────────────────
  398.               Environment    
  399.         Optionally you can set the environment variable PTGEN in your
  400.                 variables    
  401.         AUTOEXEC.BAT. All command-line options of PtGen can be
  402.         preset in this environment variable. If you specify
  403.  
  404.            SET PTGEN=-50
  405.  
  406.         PtGen will always start in 80x50 video mode. Specified
  407.         command-line options will override the environment variable
  408.         settings. See Appendix A for all command-line options.
  409.  
  410.  
  411. Chapter 1, Getting started                                                    5
  412.  
  413.  
  414.  
  415.  
  416.  
  417.  
  418.  
  419.         The environment variable PTGINPUT specifies the directory
  420.         where PtGen should search for standard files PtGen needs when
  421.         you create a new application. For example the standard string
  422.         resource files ENGLISH.TVR should reside in this directory. Most
  423.         of the time you simply set PTGINPUT to the directory where the
  424.         PtGen executable resides.
  425.         ───────────────────────────────────────────────────────────────────────
  426.          Installing PtGen    
  427.         You can install PtGen also in the Tools section of the Borland IDE.
  428.               under Tools    
  429.         Choose Options |Tools and press New. Specify under Title
  430.           menu of Borland    ~P~ tGen, under Program path PtGen's directory, for example
  431.         c:\ptgen, under Command-line \$EDNAME \$SAVE ALL. As a
  432.                       IDE    
  433.         hotkey I suggest Shift+F9 but any other key or no key is alright too
  434.         of course.
  435.         ───────────────────────────────────────────────────────────────────────
  436.          Installing PtGen    
  437.         PtGen runs flawlessly under Windows. But don't use the graphic
  438.             under Windows    
  439.         mouse switch (/GM    ). Two pifs are supplied, one for the real and one
  440.         for the protected mode version, called PTGEN.PIF and
  441.         PTGENX.PIF respectively.
  442.  
  443.         You can also use the PtGen icon PTGEN.ICO or PTGENX.ICO
  444.         (both are exactly the same).
  445.         ───────────────────────────────────────────────────────────────────────
  446.              Needed units    
  447.         Make sure your compiler can find units from
  448.         bp/examples/dos/tvdemo and /bp/examples/dos/tvfm. You
  449.         need CALCULATORS.PAS, GADGETS.PAS, HELPFILE.PAS,
  450.         VIEWTEXT.PAS, and maybe more.
  451.  
  452.  
  453. Accessing Help
  454. ───────────────────────────────────────────────────────────────────────────────
  455.  
  456.         PtGen offers a variety of online-help:
  457.  
  458.         ■ You can follow the online tutorials. Select a tutorial from the
  459.           Tutorial menu.
  460.         ■ You can press  F1  to popup help about current situations.
  461.         ■ You can press  Ctrl+F1  to get context-sensitive help about which
  462.           actions are currently available to you.
  463.           For example when you are creating a dialog box, pressing      Ctrl+F1
  464.           shows you how to add subviews to a dialog box or how to
  465.           move/resize them, etc.
  466.  
  467.  
  468.  
  469.  
  470.  
  471.  
  472. 6                                                              PtGen User Guide
  473.  
  474.  
  475.  
  476.  
  477.  
  478.  
  479.  
  480. Demo files
  481. ───────────────────────────────────────────────────────────────────────────────
  482.  
  483.         The subdirectory sample has a sample file, SQLXPLMN.PAS,
  484.         which was created with PtGen. You can compile XPL2SQL.PAS to
  485.         run the full demo program. But you will also need TVTool for this.
  486.  
  487.  
  488.  
  489.  
  490.  
  491.  
  492.  
  493.  
  494.  
  495.  
  496.  
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506.  
  507.  
  508.  
  509.  
  510.  
  511.  
  512.  
  513.  
  514.  
  515.  
  516.  
  517.  
  518.  
  519.  
  520.  
  521.  
  522.  
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529. Chapter 1, Getting started                                                    7
  530.  
  531.  
  532.  
  533.  
  534.  
  535.  
  536.  
  537.  
  538.  
  539.  
  540.  
  541.  
  542.  
  543.  
  544.  
  545.  
  546.  
  547.  
  548.  
  549.  
  550.  
  551.  
  552.  
  553.  
  554.  
  555.  
  556.  
  557.  
  558.  
  559.  
  560.  
  561.  
  562.  
  563.  
  564.  
  565.  
  566.  
  567.  
  568.  
  569.  
  570.  
  571.  
  572.  
  573.  
  574.  
  575.  
  576.  
  577.  
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585. 8                                                              PtGen User Guide
  586.  
  587.  
  588.  
  589.  
  590.  
  591.  
  592.  
  593.  
  594. C            H            A            P            T            E            R
  595. ───────────────────────────────────────────────────────────────────────────────
  596.  
  597.                                                                                             2
  598.  
  599.  
  600.  
  601.                                                     The PtGen Development-cycle
  602.  
  603.  
  604. PtGen development-cycle overview
  605. ───────────────────────────────────────────────────────────────────────────────
  606.         This section shows you how to work with PtGen. But first is the
  607.         underlying software development cycle discussed. PtGen is a
  608.         prototype generator, that means, that you should not expect that
  609.         PtGen can create complete applications for you. It will let you
  610.         build TurboVision screens very fast and very visually but that's
  611.         not the end. For example, when you create a dialog box a dummy
  612.         TListViewer is inserted. What you should do is to first to create the
  613.         dialog box including all buttons, helptexts, etc., than copy the
  614.         dialog box code PtGen has outputted, and past it into your
  615.         program. You don't have to copy/past all dialog code though.
  616.         Some dialog boxes are complete by themselves. But as soon as you
  617.         want a custom view to be inserted you need this copy/past
  618.         scheme. An examples of a complete, compilable application can be
  619.         found in the chapter titled Creating an Executable and the
  620.         accompanying source files DEMOMENU.PAS and
  621.         DEMOMAIN.PAS.
  622.         The steps followed when using PtGen are:
  623.  
  624.         1. Create a separate directory for each application.
  625.         2. Copy PREAPP.PAS to this directory. PREAPP.PAS contains the
  626.            application object from which the application object PtGen
  627.            creates is derived.
  628.         3. Start PtGen in this directoryand build a menubar, a statusline,
  629.            dialog boxes and helptexts.
  630.         4. Save your work as a PtGen readable Pascal source file. PtGen
  631.            readable means that several PtGen directives are inserted in the
  632.            source file, but they won't affect compilation.
  633.         5. Create the main of your application. You probably want to
  634.            override the HandleEvent of the TApplcation object PtGen has
  635.            created in its source file. You probably need to copy/paste
  636.            some PtGen created code to your source files if you want to
  637.            change or add custom views.
  638.  
  639.  
  640. Chapter 2, The PtGen Development-cycle                                        9
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  647.  
  648.         6. Compile your program.
  649.  
  650.         This development cycle will become clearer after you have worked
  651.         with PtGen and read the chapters Sample Apps and Creating an
  652.         Executable.
  653.  
  654.  
  655. Ptgen single dialog box creating mode
  656. ───────────────────────────────────────────────────────────────────────────────
  657.  
  658.         For people not wanting to create a complete application but just
  659.         use PtGen's dialog box creating capabilities there is an option
  660.         Dialog |New. You don't have to follow the previous steps and
  661.         you can just create a single dialog box. After you close the dialog
  662.         box you can save the source code of the create dialog box to a file.
  663.         You can read this file with Dialog |Open.
  664.  
  665.  
  666.  
  667.  
  668.  
  669.  
  670.  
  671.  
  672.  
  673.  
  674.  
  675.  
  676.  
  677.  
  678.  
  679.  
  680.  
  681.  
  682.  
  683.  
  684.  
  685.  
  686.  
  687.  
  688.  
  689.  
  690.  
  691.  
  692.  
  693.  
  694.  
  695.  
  696.  
  697. 10                                                                           PtGen User Guide
  698.  
  699.  
  700.  
  701.  
  702.  
  703.  
  704.  
  705.  
  706. C            H            A            P            T            E            R
  707. ───────────────────────────────────────────────────────────────────────────────
  708.  
  709.                                                                                             3
  710.  
  711.  
  712.  
  713.                                                                                  PtGen basics
  714.  
  715.  
  716.         In the following two sections general principles when working
  717.         with PtGen are covered. PtGen is designed to be very consistent.
  718.         You will find the same basic set of operations throughout PtGen.
  719.         Learn them once, and you know it for ever. First the basics for
  720.         mouse users are covered, than for keyboard users.
  721.  
  722.  
  723. Mouse operation
  724. ───────────────────────────────────────────────────────────────────────────────
  725.  
  726.         PtGen differentiates the left and mouse buttons. Their meanings
  727.         are:
  728.  
  729.                 Table 3.1    
  730.  Mouse button assignments     Press this button...   To accomplish this...
  731.  
  732.                           Left button      Clicked on backgrounds pop-ups the local
  733.                                            menu
  734.                           Right button     When the mouse is on an object/item, pressing
  735.                                            the right mouse button pops-up a menu with
  736.                                            actions you can apply to that object/item or it
  737.                                            starts editing the current object/item
  738.  
  739.  
  740.  
  741. Keyboard operation
  742. ───────────────────────────────────────────────────────────────────────────────
  743.  
  744.         Keyboard users can
  745.         OK, enough explanation. Let's create some sample applications
  746.         with PtGen.
  747.  
  748.  
  749.  
  750.  
  751.  
  752.  
  753.  
  754.  
  755. Chapter 3, PtGen basics                                                      11
  756.  
  757.  
  758.  
  759.  
  760.  
  761.  
  762.  
  763.  
  764.  
  765.  
  766.  
  767.  
  768.  
  769.  
  770.  
  771.  
  772.  
  773.  
  774.                 Table 3.2    
  775.      Keyboard assignments     Press this key... To accomplish this...
  776.                           F1               Display context-sensitive help about the
  777.                                            currently selected view.
  778.                           Ctrl+F1Display context-sensitive help about the actions
  779.                                            you currently can undertake.
  780.                           Alt+F5           Pop-up local position menu for positioning the
  781.                                            current object
  782.                           Ctrl+F5          Move/resize the current dialog box or pop-up
  783.                                            menu.
  784.                           Shift+F5         Move/resize the current subview (inputline,
  785.                                            button, etc.)
  786.                           Ctrl+F7          Delete current object/item
  787.                           Ctrl+F8          Edit current object/item
  788.                           Ctrl+F9          Link other objects to your object
  789.                           Alt+F10          Pop-up local menu
  790.                           Ins              Insert an item
  791.                           Del              Delete an item (same as Ctrl+F7)
  792.  
  793.  
  794.  
  795.  
  796.  
  797.  
  798.  
  799.  
  800.  
  801.  
  802.  
  803.  
  804.  
  805.  
  806.  
  807. 12                                                                           PtGen User Guide
  808.  
  809.  
  810.  
  811.  
  812.  
  813.  
  814.  
  815.  
  816. C            H            A            P            T            E            R
  817. ───────────────────────────────────────────────────────────────────────────────
  818.  
  819.                                                                                             4
  820.  
  821.  
  822.  
  823.                                                             Sample applications
  824.  
  825.  
  826.         We'll build three different sample applications. The first two are
  827.         covered by the build-in tutorial although the written version has
  828.         more explanation and references other and advanced features.
  829.  
  830.         The first application lears you to create menus and a statusbar. The
  831.         next learns you to create dialog boxes.
  832.  
  833.         Detailed information about the above mentioned
  834.         subjects/objects(!) can be found in the reference manual.
  835.  
  836.         For every application:
  837.  
  838.         1. Create a separate directory
  839.         2. Copy PREAPP.PAS and PREAPP.INC from your PtGen
  840.            directory to this directory. The application object PtGen creates,
  841.            is a descendent of the application object defines in this file.
  842.         3. Start PtGen from this directory so all files created by PtGen will
  843.            be placed in this directory.
  844.  
  845.  
  846. Creating a menubar and a statusline
  847. ───────────────────────────────────────────────────────────────────────────────
  848.  
  849.         To create a new application, just start up PtGen.
  850.  
  851.         1. Select New from the File menu.
  852.  
  853.         Now you're asked to specify some information about the new
  854.         application you're creating.
  855.  
  856.         2. Fill in the application name, in our case SampleApp.
  857.  
  858.         Your application will be saved in a source file you specify and the
  859.         name will be: TSampleApp. PtGen automatically adds a T or P to
  860.         the name of every object it creates, so don't specify T's or P's.
  861.  
  862.         PtGen supports helptext creating. To enable this option you have
  863.         to mark Help in the Options menu and you have to specify a
  864.         filename.
  865.  
  866.  
  867. Chapter 4, Sample applications                                               13
  868.  
  869.  
  870.  
  871.  
  872.  
  873.  
  874.  
  875.         3. Enable the Help option
  876.         4. Specify as helpfile: sample.txt.
  877.         The other options are explained more fully in the reference
  878.         manual. We will not use this feature in our sample application.
  879.         5. Press  Enter  or click OK to close this dialog box.
  880.         You are now ready to edit your application.
  881.         6. Select Edit from the menubar or press  Ctrl+F8  to edit your
  882.         application.
  883.         Next, you'll see an almost empty menubar and an empty
  884.         statusline. Let's add the familiar F1 and F10 to the statusline.
  885.         7. Popup the local menu by pressing  Alt+F10  or, for mouse users,
  886.         press the left button.
  887.         A popup menu appears.
  888.         8. Choose Statusline.
  889.         Go to the StatusKeys listviewer by pressing Tab. Now press the
  890.         down arrow once (the lightbar should now be on kbF10). And add
  891.         your first item.
  892.         9. Press  Ins  or click on New.
  893.         A dialog box appears in which you can specify the same
  894.         parameters as the NewStatusKey function.
  895.         10. Enter after Text:
  896.  
  897.                          ~F2~ Save
  898.         Enter after Keycode
  899.                          kbF2
  900.         Enter after Command
  901.                          cmSave
  902.         11. And press  Enter  or click OK to close this dialog box.
  903.         When you look at the statusline, you'll see that F1 has appeared.
  904.         Do the same for F10.
  905.         12. Press  Ins, enter after Text
  906.  
  907.                          ~F3~ Open
  908.         Enter after Keycode
  909.                          kbF3
  910.         Enter after Command
  911.  
  912.  
  913. 14                                                                           PtGen User Guide
  914.  
  915.  
  916.  
  917.  
  918.  
  919.  
  920.  
  921.                          cmOpen
  922.         And press  Enter  to close the dialog box.
  923.         And for Alt+X.
  924.         13. Press  Ins. Leave the Text inputline empty, enter after Keycode
  925.                          kbAltF3
  926.         After Command
  927.                          cmClose
  928.         and press  Enter  to close the dialog box.
  929.         You see that in the Statusline dialog box entries are differentiated
  930.         by their keys. If no key is specified (type kbNoKey), the first part
  931.         of the text is shown.
  932.         To close the statusline dialog box, press Enter again.
  933.         14. Press  Enter  to close the statusline dialog box.
  934.         OK, now the menubar.
  935.         15. Press  F10  (Menu).
  936.         You'll see that a lightbar appears on menu =, but when you look at
  937.         the statusline, you see that it hasn't changed. But in the IDE of
  938.         Turbo Pascal the statusline changed to ``F1 Help |System
  939.         commands''.
  940.         It isn't there, but soon it will be. We have to add some helptext to
  941.         the = menuitem.
  942.         16. Press  Ctrl+F8  (Edit).
  943.         The edit dialog box for a menu item appears. You can add all
  944.         options you could when handcoding menu's for Turbo Vision and
  945.         more. You can specify a statusline helptext and a normal helptext
  946.         which the user accesses by pressing F1.
  947.         REMARK A: helptexts for F1 will only be stored in a file when you
  948.         had set helpfile on and had specified a helpfile name in the
  949.         application edit dialog box, the one you where you specified the
  950.         application's name.
  951.         REMARK B: Only after TVHC has been run to compile a helpfile
  952.         (.HLP) from the saved text, will helpfiles be shown on the screen.
  953.         Instead of running TVHC you could also select HelpText from the
  954.         Desktop Local menu. Next press the Compile button.
  955.         17. Add a helptext by entering
  956.                          system commands
  957.  
  958.  
  959. Chapter 4, Sample applications                                               15
  960.  
  961.  
  962.  
  963.  
  964.  
  965.  
  966.  
  967.         after help text and press  Enter  to close the dialog box.
  968.         You will now see that the statusline has changed and now shows
  969.         the desired text. For more information about the menuitem dialog
  970.         box, see the reference manual.
  971.         Adding a menuitem is equally simple. We will add a submenu, the
  972.         first part the File submenu as found in the Turbo IDE.
  973.         18. Move the lightbar on the  ysymbol, the end symbol. Now press
  974.         Ins  to insert a menuitem.
  975.         The menuitem dialog box will appear.
  976.         19. Enter after Name
  977.  
  978.                          ~F~ ile
  979.         20. Enter after Help text
  980.                          File management commands (Open, New, Save, etc.)
  981.         Leave the other fields empty.
  982.         21. Select OK to close this dialog box.
  983.         The lightbar automatically moves right so you can quickly enter
  984.         more menuitems, but let's first edit the created menu. Because you
  985.         didn't specify a command, this will be a submenu.
  986.         22. Move the lightbar to File and press  Enter.
  987.         An empty submenu will appear with only the Endmark symbol
  988.         ypresent. You can add more menuitems by pressing Ins.
  989.         23. Add a new menuitem by pressing  Ins. Enter after Name
  990.  
  991.                          ~O~ pen...
  992.         After Command
  993.                          cmOpen
  994.         After Keycode
  995.                          kbF3
  996.         After Param
  997.                          F3
  998.         We will not use hcConstant in this example, so leave it empty. See
  999.         the reference manual for details and meaning of hcConstants.
  1000.         Generally speaking: hcConstants are used to refer to helptexts
  1001.         which you will use on more than one place your application. This
  1002.         saves you typing time and promotes consistency.
  1003.         24. Enter after Help text
  1004.  
  1005.  
  1006. 16                                                                           PtGen User Guide
  1007.  
  1008.  
  1009.  
  1010.  
  1011.  
  1012.  
  1013.  
  1014.                          Locate and open a file in an Edit window
  1015.  
  1016.         25. Select the OK button to close the dialog box.
  1017.  
  1018.         So, that's it for now. You learned how to create statuslines and
  1019.         menubars.
  1020.  
  1021.         26. Press  Alt+X  (Exit) to exit your created application.
  1022.  
  1023.         You return now to PtGen.
  1024.  
  1025.         27. Press  F10  (Menu) and select Save from the File menu. You will
  1026.         be prompted for a filename. Enter
  1027.  
  1028.                          Sample
  1029.  
  1030.         and select OK to save your application.
  1031.  
  1032.         PtGen will now save your application in Pascal source code
  1033.         format. It's a advised to look at the code PtGen's created to get a
  1034.         feeling for what it does. This is not necessary, but I think you will
  1035.         use PtGen frequently to quickly prototype a screen and than copy
  1036.         code fragments to your application and edit it further as already
  1037.         explained. See chapter DEMO for more information.
  1038.  
  1039.  
  1040. Creating a dialog box
  1041. ───────────────────────────────────────────────────────────────────────────────
  1042.  
  1043.         We'll use the application you created in the previous example. It's
  1044.         assumed that you are at the Dos prompt.
  1045.  
  1046.         1. Load Sample into PtGen by typing
  1047.  
  1048.                          ptgen sample
  1049.  
  1050.         and presssing  Enter.
  1051.  
  1052.         PtGen will now load the code in SAMPLE.PAS.
  1053.  
  1054.         2. Select Edit from the menubar or press  Ctrl+F8  (Edit) to edit your
  1055.         application.
  1056.  
  1057.         We will add an about dialog box to this sample application.
  1058.  
  1059.         3. Press  F10  (Menu), position the lightbar on = and press  Enter.
  1060.         Position the lightbar on the About menuitem.
  1061.  
  1062.         We wish that as we select About from the System menu an about
  1063.         dialog box pops up. We can do this by linking a dialog box to this
  1064.         menuitem. Take a look at the About menuitem by pressing  Ctrl+F8
  1065.         (Edit). You see that after Command is specified "cmAbout". Press
  1066.         Esc to close this dialog box.
  1067.  
  1068.  
  1069.  
  1070.  
  1071. Chapter 4, Sample applications                                               17
  1072.  
  1073.  
  1074.  
  1075.  
  1076.  
  1077.  
  1078.  
  1079.         We now link a dialog box to this About menuitem, that means:
  1080.         any time that the cmAbout command is encountered, this dialog
  1081.         box will pop up. You can link code by pressing  Ctrl+F9  (Link).
  1082.         4. Press  Ctrl+F9  (Link). There is no mouse equivalent for this
  1083.         operation.
  1084.         A pop-up menu will appear from which you can choose between
  1085.         Predefined code, or self-defined code. Under the Predefined
  1086.         option you will for example find a complete calculator. See the
  1087.         Links chapter in the reference manual for more information about
  1088.         Links and predefined objects. A dialog box is code you
  1089.         interactively define.
  1090.         5. Select Define and then select Dialog box.
  1091.         First you have to specify some general information about this
  1092.         dialog box. You can specify its name, its title and its helptext.
  1093.         More information about the last item can be found in the reference
  1094.         manual. We will only specify its Name and its Title.
  1095.         6. Specify its Name as
  1096.                          AboutDlg
  1097.         And enter after Title
  1098.                          About
  1099.         and press  Enter  to close the Define a dialog box dialog box.
  1100.         Now you see the dialog box with the Title you specified. You can
  1101.         always edit the dialog box name and the Title by popping up the
  1102.         local menu and selecting Settings.
  1103.         At this moment you can resize/move the dialog box just by
  1104.         pressing  Ctrl+F5  (Resize). Mouse users can do it their way (clicking
  1105.         on the upper frame, or lower-right corner).
  1106.         A dialog box is an object which can contain other objects. You can
  1107.         pop-up a local menu with the objects you can place in this dialog
  1108.         box by pressing  Alt+F10  (Local Menu). Mouse users can place the
  1109.         mouse anywhere on the dialog box and press the Left
  1110.         mousebutton to popup the local menu. Objects that mouse users
  1111.         select from the local menu will be placed on the dialog box with
  1112.         their upperleft corner at the current mouse position.
  1113.         7. Since we are making an About dialog box, pop-up the local
  1114.         menu and select Static Text.
  1115.         You're prompted to specify the text.
  1116.         8. Enter the following text just as it appears. So enter for ÇC first a
  1117.         "Ç" than a "C":
  1118.  
  1119.  
  1120. 18                                                                           PtGen User Guide
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.  
  1127.  
  1128.                          ÇCTurbo PascalÇMÇMÇCVersion 7.0
  1129.  
  1130.         and select OK.
  1131.  
  1132.         The ÇC means center this text, ÇM means go the next line.
  1133.  
  1134.         You will see the text centered and a blank line between Turbo
  1135.         Pascal and Version 7.0. If you are a keyboard users, you can move
  1136.         and resize the text by pressing  Shift+F5   (Local Move/Resize). If you
  1137.         are a mouse user you can do so by placing the mouse on this view
  1138.         and pressing the right mousebutton, holding it down and selecting
  1139.         Move or Resize from the popup menu.
  1140.  
  1141.         9. Press Local Move/Resize (Shift+F5) to spread the whole text
  1142.         from the left to the right of the dialog box.
  1143.  
  1144.         If you are a mouse user you can do so placing the mouse on the
  1145.         StaticText view and pressing the right mouse button. Select first
  1146.         Move to move the view to the left edge. Then do the same and
  1147.         select Resize to resize the right edge of the StaticText view to the
  1148.         right edge of the dialog box.
  1149.  
  1150.         You will now insert an OK button.
  1151.  
  1152.         10. If you are a keyboard user: pop-up again the local menu by
  1153.         pressing Local Menu (Alt+F10), select Button and next select OK.
  1154.  
  1155.         If you are a mouse user: place your mouse in the middle of the
  1156.         second half part of the dialog box. Press the left mouse button and
  1157.         hold it down. The local menu appears: select Button, then select
  1158.         OK.
  1159.  
  1160.         The OK buton will appear in the upperleft corner if you used the
  1161.         keyboard equivalent, or in the place your mouse was before
  1162.         pressing the left mousebutton.
  1163.  
  1164.         You can now move or resize the button.
  1165.  
  1166.         There are some four actions you can do with the objects you place
  1167.         on a dialog box. Keyboard users have to press the appropriate key
  1168.         while mouse users can select the actions from the popup menu
  1169.         which appears if you press the right mousebutton while your
  1170.         mouse is on an object.
  1171.  
  1172.         1. Move: press  Shift+F5      (Local Move/Resize) if you are a keyboard
  1173.            users.
  1174.         2. Resize: press  Shift+F5  (Local Move/Resize).
  1175.         3. Edit: press  Ctrl+F8  (Edit). You can edit an object parameters.
  1176.            For example you can edit the static text view to add or change
  1177.            some text. All objects can be editted.
  1178.         4. Delete: press  Ctrl+F7  (Delete). Delete the object.
  1179.  
  1180.  
  1181. Chapter 4, Sample applications                                               19
  1182.  
  1183.  
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189.         You can select an object with the common Tab/Shift+Tab keys or
  1190.         by selecting them with the mouse.
  1191.  
  1192.         We are now going to end the dialog box creating. There are many
  1193.         more objects you can place on a dialog box as you saw when you
  1194.         popped up the local menu. They are all listed in the Reference
  1195.         Manual.
  1196.  
  1197.         11. Press  Enter  to close this dialog box, then press  Alt+X  to quit to
  1198.         PtGen.
  1199.  
  1200.         You are back in PtGen and you can save the application you
  1201.         created.
  1202.  
  1203.         12. Press  Alt+X  to exit PtGen. A dialog box asks you if you want to
  1204.         save your application. Just press  Enter  and your application is
  1205.         saved before PtGen returns to the dos prompt.
  1206.  
  1207.         PtGen did save your application in Turbo Pascal source code
  1208.         format. It saved it as a unit. To turn the application you created to
  1209.         an executable, see the next chapter.
  1210.  
  1211.  
  1212.  
  1213.  
  1214.  
  1215.  
  1216.  
  1217.  
  1218.  
  1219.  
  1220.  
  1221.  
  1222.  
  1223.  
  1224.  
  1225.  
  1226.  
  1227.  
  1228.  
  1229.  
  1230.  
  1231.  
  1232.  
  1233.  
  1234.  
  1235.  
  1236.  
  1237.  
  1238.  
  1239.  
  1240. 20                                                                           PtGen User Guide
  1241.  
  1242.  
  1243.  
  1244.  
  1245.  
  1246.  
  1247.  
  1248.  
  1249. C            H            A            P            T            E            R
  1250. ───────────────────────────────────────────────────────────────────────────────
  1251.  
  1252.                                                                                             5
  1253.  
  1254.  
  1255.  
  1256.                                            Turning your code into an executable
  1257.  
  1258.  
  1259.         The code PtGen creates is saved as a unit. As units can't be run,
  1260.         you need to write a main program. Sometimes this is very simple,
  1261.         most of the times, your program contains the real flesh and PtGen
  1262.         provides only the skin. Two examples are given: one very simple,
  1263.         the most basic one. And one more complex and realistically.
  1264.         PtGen has also the ability to create automatically a main. This is
  1265.         treated in the third section.
  1266.  
  1267.  
  1268. An example of a simple main
  1269. ───────────────────────────────────────────────────────────────────────────────
  1270.  
  1271.         The most basic Main is the following program. Assumed is that
  1272.         you saved your application in file SAMPLE.PAS and that you
  1273.         named your application object SampleApp.
  1274.  
  1275.            program Main;
  1276.  
  1277.            uses  Objects, {* contains RStringList *}
  1278.                                HelpFile, {* the helpfile unit from
  1279.         bp/examples/dos/tvdemo *}
  1280.                                Sample,   {* which contains the Application
  1281.         object *}
  1282.                                BBStrRes; {* PtGen resource string unit *}
  1283.  
  1284.            var
  1285.                             TMyApp : TSampleApp;
  1286.  
  1287.            begin
  1288.            {* register helpfile *}
  1289.                             RegisterHelpFile;
  1290.  
  1291.            {* initialize string resources *}
  1292.                             RegisterType(RStringList);
  1293.                             LoadStrings;
  1294.  
  1295.                             TMyApp.Init;
  1296.                             TMyApp.Run;
  1297.  
  1298.  
  1299. Chapter 5, Turning your code into an executable                              21
  1300.  
  1301.  
  1302.  
  1303.  
  1304.  
  1305.  
  1306.  
  1307.                             TMyApp.Done;
  1308.            end.
  1309.  
  1310.         The BBUtil, BBDlg, BBStrRes and BBFile units, the PREAPP.INC
  1311.         include file as well as PREAPP.PAS (which should be in your
  1312.         directory) should be available for the compiler as the unit that
  1313.         PtGen creates needs them.
  1314.  
  1315.  
  1316. A more elaborated main
  1317. ───────────────────────────────────────────────────────────────────────────────
  1318.            program Main;
  1319.  
  1320.            uses Objects, {* contains RStringList *}
  1321.                                Sample,   {* which contains the Application
  1322.         object *}
  1323.                                BBStrRes, {* PtGen resource string unit *}
  1324.                                HelpFile,
  1325.                                BBError; {* the errorhandling unit *}
  1326.  
  1327.            var
  1328.                             TMyApp : TSampleApp;
  1329.  
  1330.            begin
  1331.            {* initialize string resources *}
  1332.                             RegisterType(RStringList);
  1333.                             LoadStrings;
  1334.  
  1335.            {* register helpfile *}
  1336.                             RegisterHelpFile;
  1337.  
  1338.            {* initialize errorhandling unit *}
  1339.                             InitBBError('MYAPP.LOG');
  1340.  
  1341.                             TMyApp.Init;
  1342.                             TMyApp.Run;
  1343.                             TMyApp.Done;
  1344.            end.
  1345.  
  1346.         The InstallExitHandler call will install an exit handler which gives
  1347.         you a stack dump when your program is aborted. This stack
  1348.         dump (and other information) is written to MYAPP.LOG.
  1349.  
  1350.         See the file SQL2XPL.PAS for a complete working example. It
  1351.         should be in the SAMPLE subdirectory or else in the SAMPLE.ARJ
  1352.         file.
  1353.  
  1354.  
  1355.  
  1356.  
  1357.  
  1358.  
  1359. 22                                                                           PtGen User Guide
  1360.  
  1361.  
  1362.  
  1363.  
  1364.  
  1365.  
  1366.  
  1367. Let PtGen create a main for you
  1368. ───────────────────────────────────────────────────────────────────────────────
  1369.  
  1370.         PtGen has also a menu option which automatically creates an
  1371.         advanced main for you. Now you can prototype really fast!
  1372.         Choose from the main menubar File |Main file. This option only
  1373.         works if you have created and saved an application or if you have
  1374.         loaded an existing application.
  1375.  
  1376.         Next you are prompted to specify the filename for your main
  1377.         program. That's all.
  1378.  
  1379.  
  1380.  
  1381.  
  1382.  
  1383.  
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.  
  1391.  
  1392.  
  1393.  
  1394.  
  1395.  
  1396.  
  1397.  
  1398.  
  1399.  
  1400.  
  1401.  
  1402.  
  1403.  
  1404.  
  1405.  
  1406.  
  1407.  
  1408.  
  1409.  
  1410.  
  1411.  
  1412.  
  1413.  
  1414.  
  1415.  
  1416. Chapter 5, Turning your code into an executable                              23
  1417.  
  1418.  
  1419.  
  1420.  
  1421.  
  1422.  
  1423.  
  1424.  
  1425.  
  1426.  
  1427.  
  1428.  
  1429.  
  1430.  
  1431.  
  1432.  
  1433.  
  1434.  
  1435.  
  1436.  
  1437.  
  1438.  
  1439.  
  1440.  
  1441.  
  1442.  
  1443.  
  1444.  
  1445.  
  1446.  
  1447.  
  1448.  
  1449.  
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.  
  1457.  
  1458.  
  1459.  
  1460.  
  1461.  
  1462.  
  1463.  
  1464.  
  1465.  
  1466.  
  1467.  
  1468.  
  1469.  
  1470.  
  1471.  
  1472. 24                                                                           PtGen User Guide
  1473.  
  1474.  
  1475.  
  1476.  
  1477.  
  1478.  
  1479.  
  1480.  
  1481. C            H            A            P            T            E            R
  1482. ───────────────────────────────────────────────────────────────────────────────
  1483.  
  1484.                                                                                             6
  1485.  
  1486.  
  1487.  
  1488.                                                            More advanced topics
  1489.  
  1490.  
  1491.         This chapter discusses some more advanced topics in PtGen like
  1492.         string resource files and adding units to the uses clause so you can
  1493.         import your own views.
  1494.  
  1495.  
  1496. Using string resource files
  1497. ───────────────────────────────────────────────────────────────────────────────
  1498.  
  1499.         Still to be written...
  1500.  
  1501.         See Chapter 7 of the Borland Pascal Resource Workshop User's
  1502.         Guide which provides essentially the same information as should
  1503.         be presented here. PtGen's string resource handling is modeled
  1504.         after the Windows string resource handling.
  1505.  
  1506.  
  1507. Adding units
  1508. ───────────────────────────────────────────────────────────────────────────────
  1509.  
  1510.         For some views (for example the inputline) you can press a code
  1511.         button to change the pointer to the objecttype (for an inputline this
  1512.         is PInputLine) or to add parameters.
  1513.  
  1514.         In order to use your own views you can enhance the uses clause in
  1515.         the implememtion section. To do so popup the Desktop Local
  1516.         Menu by pressing  Alt+F10  (Local Menu) and choose Units. You can
  1517.         now add, edit or delete unitnames.
  1518.  
  1519.         The units will be added at the end of the uses clause.
  1520.  
  1521.  
  1522. Using resources
  1523. ───────────────────────────────────────────────────────────────────────────────
  1524.  
  1525.         PtGen has the ability to turn the unit it has created into a
  1526.         TurboVision style resource file. It works as follows: first create the
  1527.         objects you want in the resource file just as you normally do. Next
  1528.         save your application as you always do.
  1529.  
  1530.  
  1531. Chapter 6, More advanced topics                                              25
  1532.  
  1533.  
  1534.  
  1535.  
  1536.  
  1537.  
  1538.  
  1539.         To create a resource file you need a resource file creating program.
  1540.         This program should import the unit PtGen created and write each
  1541.         of the objects to a resource file. You can write such a resource file
  1542.         creating program yourself, or let PtGen create automatically one.
  1543.  
  1544.         Choose File |Resource file from the menubar to create a resource
  1545.         file called MAKERES.PAS in the current directory. PtGen asks you
  1546.         for the main program filename. You can enter some name or leave
  1547.         it empty. It's only used to let identify MAKERES itself when it
  1548.         starts up and writes a string including the name of the program
  1549.         this resource file is for.
  1550.  
  1551.         MakeRes includes PTGRES.INC, an include file PtGen always
  1552.         writes when it saves an application. This file consists of one
  1553.         procedure PutPtGenObjects       which puts all objects in the unit into
  1554.         a supplied resource file.
  1555.  
  1556.         You can extend MakeRes in anyway you want, although it's fully
  1557.         functional for all objects you created with PtGen. If you run
  1558.         MakeRes it creates a resource file called   test .tvr.
  1559.  
  1560.  
  1561. Using TVToys
  1562. ───────────────────────────────────────────────────────────────────────────────
  1563.  
  1564.         You turn on TVToys support if you click on TVToys item in
  1565.         Options on the Application configuration dialog box. Your
  1566.         application will now inherited (via TPReApp) from TToyApp,
  1567.         TVToys' application object.
  1568.  
  1569.         If you want previous help screen support, create a new status def
  1570.         in the range 11111..11111 and add Alt+F1 (and if you wish F1
  1571.         and Shift+F1) as status line items. Commands should be
  1572.         cmPreviousTopic, cmHelp, cmHelpOnHelp or cmHelpContents.
  1573.         These commands are only available with the correct values if you
  1574.         have turned on TVToys support.
  1575.  
  1576.  
  1577.  
  1578.  
  1579.  
  1580.  
  1581.  
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.  
  1589.  
  1590. 26                                                                           PtGen User Guide
  1591.  
  1592.  
  1593.  
  1594.  
  1595.  
  1596.  
  1597.  
  1598.  
  1599. A          P          P          E          N           D          I          X
  1600. ───────────────────────────────────────────────────────────────────────────────
  1601.  
  1602.                                                                               A
  1603.  
  1604.  
  1605.  
  1606.                                                            Command-line options
  1607.  
  1608.  
  1609.         PtGen recognizes the following command-line options:
  1610.  
  1611.                 Table A.1    
  1612.      Command-line options     Option  Description
  1613.                           /h          show all recognized command-line options and their
  1614.                                       meanings
  1615.                           /BW         black and white palette for monochrome monitors
  1616.                           /25         25 lines
  1617.                           /50         VGA 50 or EGA 43 lines
  1618.                           /NGM        don't use the graphics mouse
  1619.                           /GM         use the graphics mouse
  1620.  
  1621.         Command-line options always override options specified in the
  1622.         PTGEN environment variable, see the next appendix.
  1623.  
  1624.  
  1625.  
  1626.  
  1627.  
  1628.  
  1629.  
  1630.  
  1631.  
  1632.  
  1633.  
  1634.  
  1635.  
  1636.  
  1637.  
  1638.  
  1639.  
  1640.  
  1641.  
  1642.  
  1643.  
  1644. Appendix A, Command-line options                                             27
  1645.  
  1646.  
  1647.  
  1648.  
  1649.  
  1650.  
  1651.  
  1652.  
  1653.  
  1654.  
  1655.  
  1656.  
  1657.  
  1658.  
  1659.  
  1660.  
  1661.  
  1662.  
  1663.  
  1664.  
  1665.  
  1666.  
  1667.  
  1668.  
  1669.  
  1670.  
  1671.  
  1672.  
  1673.  
  1674.  
  1675.  
  1676.  
  1677.  
  1678.  
  1679.  
  1680.  
  1681.  
  1682.  
  1683.  
  1684.  
  1685.  
  1686.  
  1687.  
  1688.  
  1689.  
  1690.  
  1691.  
  1692.  
  1693.  
  1694.  
  1695.  
  1696.  
  1697.  
  1698.  
  1699.  
  1700. 28                                                                           PtGen User Guide
  1701.  
  1702.  
  1703.  
  1704.  
  1705.  
  1706.  
  1707.  
  1708.  
  1709. A          P          P          E          N           D          I          X
  1710. ───────────────────────────────────────────────────────────────────────────────
  1711.  
  1712.                                                                               B
  1713.  
  1714.  
  1715.  
  1716.                                                           Environment variables
  1717.  
  1718.  
  1719.         PtGen recognizes the following environment variables:
  1720.  
  1721.                 Table B.1    
  1722.     Environment variables     Environment variable Description
  1723.                           PTGEN               standard command-line options can be set
  1724.                                               in this variable. The command-line always
  1725.                                               overrides the specifications in the PTGEN
  1726.                                               variable.
  1727.                           PTGINPUT            The directory where the files are located
  1728.                                               that PtGen needs to create an application.
  1729.                                               Most of the time this will be the directory
  1730.                                               where the executable resides.
  1731.                                               Such files are DEFAULT.TVR,
  1732.                                               ENGLISH.TVR, DUTCH.TVR,
  1733.                                               PREAPP.INC and other.
  1734.  
  1735.  
  1736.