home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 8 / CDASC08.ISO / VRAC / SLD201.ZIP / SLD.DOC < prev    next >
Encoding:
Text File  |  1993-08-22  |  108.8 KB  |  2,781 lines

  1.         Screen Layout Designer - V2.01
  2.         -------------------------------
  3.  
  4.  
  5.                   Chapter 1.
  6.                   ==========
  7.                         
  8. INTRODUCTION
  9. ------------
  10.  
  11. The Screen Layout Designer (SLD) has been designed to create data
  12. entry screens for database applications, such as dBase or
  13. Clipper. Initially it was developed for in house use to assist in
  14. the design of database systems, but it has proved so useful that
  15. it has been enhanced further into a development tool in its own
  16. right.  
  17.  
  18. The Screen Layout Designer will take the drudgery out of
  19. designing data entry screens.  It displays the data fields and
  20. field headings on your screen so that you can use the cursor keys
  21. or a mouse to position them wherever you want.  Additionally you
  22. may add framed boxes and titles to smarten up your data entry
  23. screen.  Colors for the background, data entry fields, headings,
  24. titles, menus and frames are selectable. SLD can read data field
  25. types directly from the header of dBase or Clipper ".DBF" files. 
  26. These fields are then displayed on the screen for you to
  27. manoeuvre into the desired position.  Alternatively SLD can read
  28. the fields from a text file, either created by you manually, or
  29. by dumping the database field definitions into the file by
  30. running a database field listing program, an example of which is
  31. given further in the text.  SLD can also retrieve previously
  32. designed screens from a Screen Layout Definition File, with a
  33. ".SLF" extension.  
  34.  
  35. SLD can generate two types of output file.  The first type is a
  36. text file containing dBase type "@ SAY" and "@ GET" statements,
  37. which may be directly pasted into your dBase or Clipper programs. 
  38. The second type is a Screen Layout Definition File, mentioned
  39. above, which stores full information about fields, boxes, titles
  40. and colors, etc.  You may use almost any programming language to
  41. read these files and extract the information contained in them to
  42. produce data entry screens for almost any database development
  43. language.  Details of these files are given later.   
  44. SLD supports multiple data entry screens.  That is to say if
  45. there are more fields in your database file than can be
  46. accommodated on one screen then you may place them on several
  47. screens.  SLD allows you to move freely between screens and even
  48. to move fields from one screen to another.  You may also change
  49. the text of field headings.  
  50.  
  51. Screen Layout Designer version 2.01 has been developed by Neville
  52. T. Palmer of PDM Associates.  This product is available for you
  53. to copy and pass on to other people, but the copyright remains
  54. the property of PDM Associates and Neville T. Palmer.  You may
  55. use this software initially without charge, but if you intend to
  56. continue using it you should register the product for your use. 
  57. This product is being developed further and there will be
  58. features of later versions which are not yet available in this
  59. one.  Upon registration we will send you the latest version of
  60. this software.  You will also be entitled to generous discounts
  61. on our other programs and future software. Please see appendix E
  62. for information on planned future enhancements, and the section
  63. on registration for information on how to register and to obtain
  64. your free software updates. 
  65.  
  66.  
  67. SLD V2 System Capacities:
  68. -------------------------
  69.  
  70. Max. no. of screens available in one session:  20
  71. Max. no. of DBFs from which fields may be read: 20
  72. Max. no. of data fields per session: 512
  73. Max. no. of titles and/or menu options:  254
  74. Max. no. of framed boxes: 254
  75. Max. no. of menus in one session: 80
  76.  
  77. Platform:
  78. ---------
  79. IBM PC compatible 8088, 286, 386, 486 etc.
  80. Operating system: DOS 3 and above
  81. Minimum free memory: 512Kb
  82. Display types supported: HGA, CGA, EGA, VGA, SVGA, etc.                         Chapter 2.
  83.                         ==========
  84.  
  85. INSTALLING SCREEN LAYOUT DESIGNER
  86. ---------------------------------
  87.  
  88. SLD may be installed in any directory of your choice.  You should
  89. copy the files supplied on floppy disk into this directory. If
  90. they are archived then you will need to unarchive them into the
  91. directory.  Here is a full list of files you should have to use
  92. SLD:
  93.  
  94.       SLD.EXE      (the main executable program)
  95.       SLD.OVR      (the overlay file)
  96.       DBFACC.EXE   (the .DBF access program)
  97.       SCREDIT.EXE  (a simple text file editor)
  98.       SETCONV1.EXE (converts old .SET files to version 2 .SET)
  99.       SLFCONV1.EXE (converts old .SLF files to versuion 2 SLFs)
  100.       SETNAME.NAM  (a file containing the name of the setup file  
  101.                         initial default: SETUP.SET)
  102.       SETUP.SET    (a file containing the initial default
  103.                         settings)
  104.       SCRHELP.EXE  (the help program)
  105.       SCRHELP.HLP  (the help file)
  106.       SLD.DOC      (the user manual ... this file)
  107.      *SLD.WP5      (the user manual in Wordperfect format)
  108.       README       (a list of these files and initial info)
  109.       TUTOR.DOC    (a tutorial ... also found in the manual)
  110.       REGISTER.DOC (the software registration form for SLD)
  111.       HISTORY.DOC  (history of modifications, etc.)
  112.  
  113.       and sample files as follows:
  114.  
  115.       INPUT.TXT    (a sample input text file)
  116.       COMPANY.DBF  (a sample .DBF file)
  117.       CONTACT.DBF  (ditto)
  118.       OUTPUT.PRG   (a sample screen output file in Clipper 5)
  119.       DBASE3.PRG   (a sample screen output file in dBase III)
  120.       SCREEN.SLF   (a sample screen layout file)
  121.  
  122.       miscellaneous files:
  123.  
  124.        CLIPTEST.PRG (a test program generated by SLD each time a 
  125.                         Clipper program is generated)
  126.       DBTEST.PRG   (a test program generated by SLD each time a
  127.                         dBase program is generated)
  128.       CLIPMAKE.BAT (a batch file which may be used to compile the
  129.                         generated code and test program in
  130.                         Clipper)
  131.  
  132.       *SLD.WP5 may not be included on BBS or Compuserve
  133.  
  134. STARTING SCREEN LAYOUT DESIGNER
  135. -------------------------------
  136.  
  137. Before running SLD it is best to ensure that no other programs
  138. are running on your system.  To start SLD type 'SLD' at the DOS
  139. prompt. A pull down menu will be displayed.  You will need to
  140. enter systems settings before you can use SLD.  Dependant on the
  141. way you will use SLD you will also have to create certain files
  142. before you can use SLD to build data entry screens (please see
  143. further information below). The most important settings which
  144. you should set from the pull down menu are as follows:
  145.  
  146.   SETUP - select this option from the main menu to enter 
  147.   ====    system settings.
  148.    
  149.       This will take you to a second pulldown menu bar called the
  150.       "System Setup Menu". The most important choices you should
  151.       make from here are:
  152.  
  153.      INPUTTYPE:  -menu option.
  154.      ---------
  155.       You have three choices, "TEXT", "DIRECT" or "SLF". If you
  156.       want to read the data fields direct from a ".DBF" database
  157.       file then you should select "DIRECT".
  158.  
  159.       If you want to read the fields from a text file then you
  160.       should select   "TEXT".  Input text files can be created by
  161.       you either using a text  editor or by running a program
  162.       from Clipper or dBase which dumps the fields to a text
  163.       file. They are also created as an intermediate part of the
  164.       process of reading fields from a .DBF file if you select
  165.       "DIRECT".
  166.  
  167.       You may also read the screen layout which you have
  168.       generated from a previous session.  In this case you should
  169.       select "SLF".
  170.  
  171.       LANGUAGE - menu option
  172.       ---------
  173.       There are slight differences between the dialects of dBase
  174.       generic languages. SLD is equipped to allow for these
  175.       differences in the output screen source code that it
  176.       generates. You may select Clipper V.5, Clipper Summer '87,
  177.       dBaseIII or dBaseIV. SLD will choose the most suitable
  178.       commands for the language that you choose. However if you
  179.       select dBaseIII, certain features of SLD are not available,
  180.       these are:   
  181.         1)  only three box frame types are available instead of
  182.             five (No Frame, Single or Double lined),
  183.         2)  the 43/50 row by 80 column display mode is not
  184.             supported.
  185.       OTHER - menu option
  186.       -----
  187.       
  188.       SETFILE: This is the name of the file which will be used to
  189.             store the system information.  You need not worry
  190.             about this option to begin with , as a default file,
  191.             "SETUP.SET" will already be entered here for you.
  192.   
  193.       EDITOR: You may edit or create the input text file or edit
  194.             the generated screen code file, in which case you
  195.             will require an editor. You may use an editor from
  196.             within SLD, so you should enter the executable name
  197.             of your editor here. The default is the simple built
  198.             in editor "SCREDIT". If you want something more
  199.             sophisticated then your editor should either exist in
  200.             the SLD directory, or in a directory in the DOS path. 
  201.             Do not use a wordprocessor, as it is likely to use
  202.             too much memory and may add unwanted control
  203.             characters to your files.  
  204.  
  205.       SPEED: This setting determines the speed at which messages
  206.             are displayed on the screen. You may select "SLOW",
  207.             "MEDIUM", "FAST" or "FLASH" here, which determines
  208.             the speed at which messages are displayed.
  209.  
  210.       MOUSESPEED: This setting determines the speed of movement
  211.             of the mouse cursor across the screen. You may select
  212.             one of: "VERY SLOW", "SLOW", "MEDIUM", "FAST" and
  213.             "VERY FAST". The optimum setting depends on the mouse
  214.             you are using, the mouse driver software, the speed
  215.             of your computer, as well as personal preference. If
  216.             the mouse cursor moves too fast across the screen as
  217.             you move the mouse, choose a slower setting, and vice
  218.             versa if the cursor moves too slowly.
  219.  
  220.       MAXFIELDS: If you are reading input data fields direct from
  221.             a database .DBF file, or from a text file, the fields
  222.             will be placed on the screen automatically. You will
  223.             need to limit the number of fields placed on any one
  224.             screen to prevent cluttering. When you select this
  225.             option you will be prompted for the number, between 1
  226.             and 50. Save it by pressing the Enter key or Esc to
  227.             quit.  Note that if the screenheight is less than the
  228.             number you enter here this value will be temporarily
  229.             overridden and reduced to the value of the height, in
  230.             number of rows, of the current screen. Also if you
  231.             have entered #SCREEN commands in the input text file,
  232.             these will temporarily override the value.
  233.       REGISTER: This option allows you to register this program
  234.             or check your existing registration. If you intend to
  235.             continue using this software you should register this
  236.             program. If you do so the first screen you see when
  237.             entering SLD will contain your registered name and
  238.             there will be no time delay before the program runs;
  239.             also the exit screen when you leave SLD will no
  240.             longer appear. See the section on Registration for
  241.             full information on how to use this option to
  242.             register this program.
  243.  
  244.       AUTHOR: When you generate the screen code a header will be 
  245.                   written to the top of the file. This will
  246.                   contain the output source code file name and
  247.                   date. It will also contain the registration
  248.                   name if you have registered SLD. You may wish
  249.                   to add an Author name, and selecting this
  250.                   option will allow you to do this.
  251.  
  252.  
  253.       SPLITFILE: You may select "NoSplit" or "Split".
  254.  
  255.             If you select NoSplit:
  256.  
  257.             when you generate the output screen code file
  258.             (usually with a "PRG" file extension) all the code
  259.             will be saved to one file, regardless of how many
  260.             screens you have containing data fields or menus. In
  261.             the case of an FMT file only the screen code for the
  262.             currently active screen number will be saved to the
  263.             FMT file.
  264.  
  265.             Note: the NoSplit option is best suited to Clipper
  266.             programs where multiple screens can be accomodated in
  267.             one program file.
  268.  
  269.             If you select Split:
  270.  
  271.             when you generate the screen code, each screen will
  272.             be saved to a different file with a "Pxx" extension,
  273.             where "xx" is the screen number, eg. screen one may
  274.             be saved to a file called "OUTPUT.P1". In the case of
  275.             FMT files each screen would be saved to a file with
  276.             an "Fxx" extension, where "xx" again is the screen
  277.             number. eg. screen ten may be saved to "OUTPUT.F10".
  278.             When these files have been generated you will
  279.             probably need to rename them to a suitable .PRG or
  280.             .FMT filename.
  281.             
  282.             Notes:
  283.  
  284.             i)  The Split option is better suited to dBase
  285.             programs, especially since dBaseIII may find a single
  286.             file too long to work with.
  287.  
  288.             ii)  The filenames that are used to save the code for
  289.             each screen to will be the name of the Code file or
  290.             FMT file you selected from "File" and "Output" on the
  291.             Main Menu with the new "Pxx" or "Fxx" extension added
  292.             in place of the "PRG" or "FMT" extension.
  293.  
  294.       FILESPERSCREEN: you may select OneOnly or Multiple
  295.             When SLD reads data fields from an input file or
  296.             files you may allow it to display the fields from
  297.             only one data file on each screen or the fields from
  298.             more than one file per screen. 
  299.  
  300.             If you select OneOnly:
  301.  
  302.             If you have setup SLD to read data fields from more
  303.             than one data file those fields will be placed on the
  304.             screen according to the "MaxFields" option, which is
  305.             described above, unless you have set OneOnly here, in
  306.             which case fields from different data files are
  307.             placed on different screens.
  308.  
  309.             If you select Multiple:
  310.  
  311.             In this case fields from different data files may be
  312.             placed on the same screen, and the number of fields
  313.             displayed on one screen will only be determined by
  314.             the "MaxFields" setting.
  315.  
  316.             Note: this setting depends on the intended use of the
  317.             generated code and also which language you are using.
  318.             If you are generating a dBase III/IV screen format
  319.             (FMT) file, normally only fields from one data file
  320.             need be included in one format file.
  321.  
  322.  
  323.  
  324.       DISPLAY - menu option
  325.       -------
  326.       You may select "COLOR" for a color display and "MONO" for a
  327.       monochrome monitor.  In "MONO" mode the display colors are
  328.       clarified for monochrome display. Normally you should opt
  329.       for "COLOR", even on a monochrome display, but if your
  330.       display does not work well in color select MONO.
  331.       From here you may also select "TYPE" so that you can select
  332.       the display adapter type to which your monitor is attached.
  333.       This should be one of "VGA", "EGA", "CGA" or "MDA". See
  334.       below for a further discussion on this. 
  335.       MODE - menu option
  336.       ----
  337.       This option determines the size of your data entry screens
  338.       either 80 columns by 25 rows, 80 columns by 43 rows, or 80
  339.       columns by 50 rows  (dependant on your monitor type).  The
  340.       default is "80x25". See below for further discussion.
  341.  
  342.       PRINTER - menu option.
  343.       -------
  344.       In order to print files and system setting information you
  345.       will need to enter settings relating printer. The printer
  346.       may have a serial or a parallel interface. If it is
  347.       parallel it may be connected to port LPT1, 2 or 3 on your
  348.       computer. If it is serial it may be connected to port COM1,
  349.       2 or 3, and you may need to enter settings relating to the
  350.       communications speed and the size of data bits which for
  351.       characters which will be sent to your printer. The setup
  352.       information may be entered as follows:
  353.  
  354.       PORT:  this is the port on your computer to which the
  355.             printer will be attached and should be one of
  356.             LPT1,LPT2,LPT3 for parallel, or COM1, COM2 or COM3
  357.             for serial printer interfaces.
  358.  
  359.       COMMS: if you are using a printer with a serial interface 
  360.                   having selected one of COM1-3, you may need to
  361.                   change  the port communication speed and data
  362.                   bits to match the printer. The options from
  363.                   this submenu are:
  364.  
  365.         Speed -   one of 9600, 4800, 2400 or 1200 bauds. This is
  366.                   the rate of data transfer to your printer.
  367.         Data  -   this is the number of data bits for each
  368.                   character sent to the printer, either 7 or 8.
  369.         Parity-   this may be Even, Odd or None, depending on the
  370.                   type of data parity error checking your printer
  371.                   requires.
  372.         Stop -    this is the number of stop bits that are added
  373.                   to the end of each character sent to the
  374.                   printer, either one or two.
  375.  
  376. For information on which printer settings to select you should
  377. consult your printer manual. If your printer has a parallel
  378. interface you do not need to change any of the settings available
  379. from the "COMMS" option, but if it has a serial interface you may
  380. need to. You should ensure that you have the correct cable
  381. attached to your printer, especially in the case of serial
  382. communications where you will need to ensure that correct
  383. handshaking takes place between the computer and printer. There
  384. are no facilities for changing handshaking modes from SLD at the
  385. moment, so ensure that you have a cable capable of dealing with
  386. hardware or software handshaking.
  387.       SAVE - menu option.
  388.       ----
  389.       Once you have entered the settings you should save them by
  390.       selecting this option.
  391.  
  392.       Now return to the Main Menu by selecting "MAINMENU" or
  393.       pressing "ESC".
  394.  
  395.  
  396.  
  397.             FROM THE MAIN MENU:
  398.             -------------------
  399.  
  400.       FILE - menu option. Select this option from the Main Menu.
  401.       ----
  402.  
  403.        INPUT: If you have selected "DIRECT" from the INPUTTYPE
  404.             option of the System Setup Menu, then you will need
  405.             to enter the name of the .DBF file that SLD will read
  406.             data fields from, and the name of an intermediate
  407.             text file into which the fields will be held for use
  408.             by SLD. In this case enter the name of the text file
  409.             by selecting "TEXT" and then the name of the .DBF
  410.             file by selecting "DBASE".
  411.  
  412.             If you have selected "TEXT" from the INPUT option on
  413.             the System Setup Menu then you only need to enter the
  414.             name of the text file here, in the same way.
  415.             Remember, if you elect to do this the text file must
  416.             already exist, having been created manually or by
  417.             dumping fields from a .DBF file into the text file.
  418.  
  419.             If you have selected "SLF" from the INPUTTYPE option
  420.             you must enter the name of a previously generated
  421.             Screen Layout File, with an ".SLF" extension, created
  422.             by you during a previous SLD session.
  423.  
  424.  
  425.       OUTPUT: You must select "CODE" to enter the name of the
  426.             file which will contain your dBase generic language
  427.             screen source code. You must select "SLF" to enter
  428.             the name of a Screen Layout File which will be used
  429.             to store the screen layout and settings from the
  430.             current SLD session.
  431. Using MonoChrome Monitors with SLD.
  432. -----------------------------------
  433. Ideally Screen Layout Designer is used to best effect on a color
  434. monitor, however you may be using a monochrome monitor, or simply
  435. wish to generate source code for mono monitors. To select
  436. monochrome display mode you may either select Setup/Display/Mono
  437. from the menu bar after starting SLD, or you may start SLD with
  438. the "/M" switch, ie. type the following at the DOS prompt:   
  439. SLD /M.  This will override the default colors. If you then
  440. change the colors when in SLD you should save them.  If you do
  441. this you will not need to use the /M switch, which overrides all
  442. color settings, when you next run the program.
  443.  
  444. The color palette is available for you to change colors in Mono
  445. mode, but they are translated into the gray scale tones
  446. automatically so that what you see is actually what you get when
  447. code is generated.
  448.  
  449. Some mono monitors have been found to display well in Color
  450. display mode, but others display better in Mono mode.
  451.  
  452.  
  453.  
  454.  
  455. Selecting a Display Adapter Type:
  456. --------------------------------
  457. When you initially setup SLD you should select SETUP from the
  458. Main Menu. This will take you to the Setup Menu. Enter the other
  459. settings as normal. To change the display adapter type, select
  460. MODE followed by TYPE. You may select MDA for Monochrome and
  461. Hercules display adapters, CGA for the original Color Graphics
  462. Adapter, EGA for the Enhanced Graphics Adapter, or VGA for Video
  463. Graphics Array adapter (including SVGA, etc.). Selecting the
  464. correct display adapter will ensure that you do not select an
  465. incorrect display mode.
  466.  
  467.  
  468. Selecting Text Mode.
  469. --------------------
  470. The display mode that you select will determine the appearance of
  471. your data entry screen in the finished dBase/Clipper program. The
  472. display modes are: 25 rows x 80 columns, 43 x 80, and 50 x 80.
  473. There are a number of factors which determine valid display modes
  474. as follows:
  475.  
  476.  1)   your display adapter and monitor type,
  477.  2)   which output language you will use (dBaseIII or IV, or 
  478.       Clipper V5 or S87).
  479.  3)   the version of DOS on the program development PC.
  480. SLD attempts to be as flexible as possible in the above issues.
  481. Here is a breakdown of valid display modes:
  482.  
  483.  1)   The CGA display adapter generally only allows 25 x 80 
  484.       display mode. MDA and Hercules monochrome, and EGA color
  485.       adapters generally allow only 25 x 80, and 43 x 80 display
  486.       modes. VGA adapters generally allow  25 x80, 43 x 80 and 50
  487.       x 80 modes, however SLD only supports 43 x 80 mode on a VGA
  488.       adapter with DOS version 4 and above.
  489.  
  490.  2)   dBaseIII and Clipper 87 only support 25 x 80 mode. dBaseIV 
  491.       supports 25 x 80 and 43 x 80 modes. Clipper V5 supports 25
  492.       x 80, 43 x 80 and 50 x 80 modes.
  493.  
  494. To select a text mode select SETUP from the Main Menu to display
  495. the Setup Menu. From this menu select MODE. You may then select
  496. one of the three modes, dependant on the adapter type you have
  497. entered in the TYPE option on this menu. If you change mode the
  498. contents of the screen will be cleared and regenerated in the new
  499. mode.
  500.  
  501.  
  502. NOTES:
  503. ------
  504. You should change the display mode before you have allowed SLD to
  505. read data fields from a file and display them on the screen (by
  506. selecting SHOW from the Main Menu). If you do not the screen you
  507. were editing could be truncated, particularly if you switch from
  508. 50 x 80 to 25 x 80 mode, and some fields may not be displayed.
  509. Should this happen, switch back to the previous mode and move the
  510. fields to within the bounds of the new screen mode, or,
  511. alternatively, move the fields to another screen.  eg. if you
  512. wish to switch from 50 x 80 to 25 x 80, then move the relevant
  513. field's position on the screen above the 25 row boundary, or move
  514. it onto the next screen.
  515.  
  516. Select the best screen mode for the output language you are
  517. using. For instance, don't select 50 x 80 mode when your target
  518. language is dBaseIII. SLD is flexible; you might say that it
  519. gives the user enough rope to hang themselves with!
  520.    
  521.                               Chapter 3.
  522.                               ==========
  523.  
  524. USING SCREEN LAYOUT DESIGNER.
  525. -----------------------------
  526.  
  527. Having setup the important initial settings in SETUP and FILE
  528. from the pulldown menu you are ready to view and edit the data
  529. fields on screen.
  530.  
  531. To do this select "SHOW" from the main pull down menu.  The pull
  532. down menu will disappear and the fields will be displayed with
  533. their headings.  A second menu will appear superimposed on the
  534. fields; this is the Screen Edit Menu. If you are reading from a
  535. .DBF or text file the data fields and default headings will be
  536. displayed starting from top left.  To start editing the screen
  537. select EDITSCREEN from the pulldown menu or just press "Esc".
  538. You are in Screen Edit Mode. NOTE: to get back to the pull down
  539. menu from within your editing session  press "Esc" again.  To
  540. move the cursor you may use the cursor (arrow) keys or a mouse.
  541.  
  542. Note:  if to return to the main menu from the Screen Edit Menu,
  543.       select "QUIT"  (or "Alt Q").
  544.  
  545.  
  546. Manoeuvring the Fields and Headings.
  547. -------------------------------------
  548. You may use the cursor keys  or mouse to manoeuvre the fields and
  549. headings around the screen.  To move a field or heading, move the
  550. cursor onto it with the mouse or cursor keys and press the Enter
  551. key or press the left mouse button.  If you are using a mouse,
  552. keep the left button pressed and move the field to the new
  553. position, then release the button.  If you are using the cursor
  554. keys, move the field to the new position and press enter again to
  555. place it. 
  556.  
  557. Other Cursor Movement Keys.
  558. ---------------------------
  559. In addition to the mouse and cursor keys (arrow keys) you may use
  560. other keyboard keys to move the cursor around the screen as
  561. follows:
  562.       HOME - to move the cursor to the far left of the screen.
  563.       END  - to move the cursor to the far right of the screen.
  564.       PAGE_UP - to move the cursor to the top of the screen.
  565.       PAGE_DOWN -to move the cursor to the bottom of the screen.
  566.  
  567.  
  568. Changing Headings & the Screen On Which a Field/Heading Appears.
  569. ---------------------------------------------------------------
  570. If you move the cursor onto a field or heading with the mouse or
  571. cursor keys and, either press function key F2, or double click
  572. the mouse, a window will appear containing the following
  573. information on that field:
  574.  
  575. Field Name: the name of the data field as it appears in the .DBF
  576.             file.
  577. Type: the type of the field (C=character, N=numeric, D=date,
  578.       M=memo, L=logical)
  579. Width: the width of the data field
  580. Decimal Places:   the number of decimal places for numeric
  581.                   fields.
  582.  
  583. From here you can change the heading text which corresponds to
  584. the data field on the screen, and the screen on which the field
  585. and its heading are displayed.  In version 2.01 of SLD you will
  586. only be able to change these two items.  To change the heading,
  587. simply type in the new text. If you do not want any heading for
  588. this field (eg. for ADDRESS2,3,4 fields) delete the heading,
  589. leaving the text blank, and the heading will not appear on the
  590. screen when you save the information.
  591.  
  592.  
  593. If you want the field and its heading to be displayed on another
  594. screen, enter the new screen number here, and when you save the
  595. information the field and heading will disappear from the current
  596. screen.  The field and heading will reappear when you select the
  597. new screen from the menu bar. To save and exit the window, press
  598. Ctrl and Enter.  To exit without saving the changes, press Esc. 
  599. Or you may delete a field and its heading completely by pressing
  600. the F4 key.  If you do so the field and heading will disappear
  601. from all screens.  You should consider very carefully whether you
  602. need the field you are about to delete before actually deleting
  603. it. If you delete it then your program will not be able to update
  604. information in this field for each record in your data file, with
  605. the code generated in this session.
  606.  
  607.  
  608. Moving to Another Screen.
  609. ------------------------
  610. If you press "Esc" whilst in Screen Edit Mode the pulldown Screen
  611. Edit Menu will reappear.  To change to another screen select the
  612. "SCREEN" option from here.  You are given three choices: "NEXT"
  613. to move to the next screen, "PREV" to move to the previous
  614. screen, and "NUMBER" which will prompt you to enter a screen
  615. number to move to.  If the screen you select is out of range you
  616. will be warned accordingly.
  617.  
  618. You may also select a screen by number from the main menu SCREEN
  619. option. Adding a Blank Screen.
  620. ----------------------
  621. You may add a blank screen to the current editing session from
  622. the Main Menu bar or from the Screen Edit Menu by selecting
  623. "SCREEN", followed by "ADD".  If are in Screen Edit Mode you
  624. should press "Alt" and "S" (or press "Esc" to return to the
  625. Screen Edit Menu and select "SCREEN") so that you can select
  626. "ADD" to append a new screen to your session.
  627.  
  628.  
  629. Adding Boxes and Titles to your Screens.
  630. ---------------------------------------
  631. To improve the presentation of your data entry screens you can
  632. add framed
  633. boxes and additional titles to them.  
  634.  
  635. To Add a Box:
  636. -------------
  637. You may add a box from the Screen Edit Menu by selecting "BOX".
  638. From here
  639. you may add a NEW box, EDIT or DELETE an existing one. If you are
  640. in Screen Edit Mode you may press "Alt" and "B" which will take
  641. you straight to the new box menu option on the Screen Edit Menu
  642. (you may also do this by pressing "Esc" and then selecting "BOX"
  643. from the menu). Before adding your box you may wish to change the
  644. type of frame you want for the box, in which case select "FRAME"
  645. first.  The frame type you select will override the default frame
  646. setting.  Having selected the frame you should then select "NEW".
  647. The pulldown menu will disappear and you will enter Screen Edit
  648. Mode and then Box Edit Mode.  Move the cursor, using the cursor
  649. keys or mouse, to the position where you want the top left corner
  650. of the box to start, then press Enter, or click with the mouse.
  651. Now when you move the cursor the box will expand or contract from
  652. its origin.  When the box is at its correct size you may move it
  653. around the screen by pressing F3.  F3 can be used to toggle
  654. between moving the box or expanding/contracting it.  When you are
  655. happy with the size and position of the box, click with the mouse
  656. or press Enter to save it, or to abandon the box press Esc.
  657.  
  658. To edit or delete a box select "EDIT" or "DELETE" from the BOX
  659. option on the menu.  Move the cursor to the box to edit or delete
  660. and either click on it with the mouse or press Enter.  If you are
  661. deleting the box you will be asked whether you wish to go ahead
  662. with the deletion.  If you answer "Y" the box will disappear. If
  663. are editing the box you will enter Box Edit mode and you should
  664. progress as mentioned previously when adding a box.
  665.  
  666. Hotkey to Add a Box.
  667. --------------------
  668. If you are in Screen Edit Mode you may add a box without
  669. resorting to the pulldown menu bar.  If you press F3 you will
  670. enter Box Edit Mode, from where you can place a box on the
  671. screen.  Note however that you cannot use F3 to edit or delete an
  672. existing box.
  673. To Add a Title:
  674. --------------
  675. You may add a box from the Screen Edit Menu by selecting "TITLE".
  676. From here you may add a NEW title, EDIT or DELETE an existing
  677. one. If you are in Screen Edit Mode you may press "Alt" and "T"
  678. which will take you straight to the new title menu option on the
  679. Screen Edit Menu (you may also do this by pressing "Esc" and then
  680. selecting "TITLE" from the menu). The pulldown menu will
  681. disappear and a window will appear prompting you to enter the
  682. title text.  The title text can be up to 78 characters in length. 
  683. Leading spaces will may be used to left pad the title. To save
  684. the title text press Enter (to exit without saving press Esc).
  685. You will enter Screen Edit Mode and then Title Edit Mode.  Move
  686. the cursor, using the cursor keys or mouse, to the position where
  687. you want the left side of the title to start, then press Enter,
  688. or click with the mouse.  Now when you move the cursor the title
  689. will expand or contract from its origin. When the title is at its
  690. correct size you may move it around the screen by pressing F3. 
  691. F3 can be used to toggle between moving the title or
  692. expanding/contracting it.  When you are happy with the size and
  693. position of the title, click with the mouse or press Enter to
  694. save, or press Esc to abandon it.
  695.  
  696. To edit or delete a box select "EDIT" or "DELETE" from the TITLE
  697. option on the menu.  Move the cursor to the title to edit or
  698. delete and either click on it with the mouse or press Enter.  If
  699. you are deleting the title you will be asked whether you wish to
  700. go ahead with the deletion.  If you answer "Y" the title will
  701. disappear.  If are editing the title a window will appear
  702. enabling you to edit the title text as previously.  When you have
  703. changed the text save it with Enter, or press Esc to abandon the
  704. edit. You will then enter Title Edit mode and you should progress
  705. as mentioned previously when adding a Title.
  706.  
  707. Hotkey to Add a Title.
  708. ----------------------
  709. If you are in Screen Edit Mode you may add a title without
  710. resorting to the pulldown menu bar.  If you press F4 you will
  711. enter Title Edit Mode, from where you can place a title on the
  712. screen.  Note however that you cannot use F4 to edit or delete an
  713. existing title.
  714.  
  715. Adding Menu Systems and Options your Screens.
  716. ---------------------------------------------
  717. To improve the functionality of your data entry screens you can
  718. add menu sytems to them.  To each menu system you may can add a
  719. number of menu options.
  720.  
  721. To Add a Menu System:
  722. ---------------------
  723. From the Screen Edit Menu select "MENU" and then "ADD" .  From
  724. here you can add a new menu system. The menu system will be added
  725. to the current screen on view. You should plan your menus and
  726. remember not to clutter your screens with too many menus.
  727.  
  728.  
  729. dBase II and IV Menus:
  730. ----------------------
  731. If the language you are using is dBase III or IV then you may use
  732. one of 3 slightly different menu types. When adding a new menu
  733. you will first of all be prompted: 
  734. "Use Conventional dBase Menu style (Y/N)?". 
  735. If you answer "NO" to this the menu generated will be a bounce
  736. bar type, and if you answer "YES" the menu will be of the
  737. conventional dBase type. If you do answer "YES" you will be
  738. prompted: 
  739. "Use an @GET to Select menu options (Y/N)?". 
  740. If you select "NO" to this the user's menu choice will be input
  741. by an INKEY() statement, but if you answer "YES" the user's
  742. choice will be input by an @GET and you will be prompted for the
  743. row and column where you wish the @GET prompt to be initially
  744. placed on the screen. If you answer "YES" you should save the row
  745. and column that you have entered by pressing the "Ctrl" and
  746. "Enter" keys. If you press the "Esc" key you will be returned the
  747. the previous "(Y?N)?" prompt. Remember that if you are adding
  748. more than one menu to the screen the @GET prompt should be placed
  749. in a different position for each menu. In any case you may move
  750. the prompt later by entering Menu Edit Mode.
  751.  
  752. Note: if you add a conventional dBase menu system without an @GET
  753. to select options on this menu then you may only add a maximum of
  754. nine selectable options to this menu. This type of menu is
  755. available for efficient small menus for dBase applications. Adding Options to Menus:
  756. ------------------------
  757. Once you have created your menu system it will be of no use until
  758. you have added menu options to it. To add an option select
  759. "MENU", then "OPTION", followed by "NEW" from the Screen Edit
  760. Menu.  NOTE: If you are in Screen Edit Mode you may get straight
  761. to here by pressing "Alt" and "M".
  762.  
  763. You will be prompted to enter the heading text for the menu
  764. option you are adding and the number of the menu system on which
  765. it will appear. The heading may be up to 40 characters, for
  766. example you may have a heading of "EDIT" on your menu. If you are
  767. unsure of which menus are active on the screen in view, press the
  768. F3 key and you will be presented with a list box of available
  769. menu numbers active on this screen. You should use the up or down
  770. arrow keys to highlight a menu number and select it using the
  771. Enter key. To save the heading and menu number information press
  772. "Ctrl" and "Enter", or "Esc" to abandon the whole operation.
  773.  
  774. If you save the menu heading information you will enter Screen
  775. Edit Mode and then Menu Edit Mode.  Move the cursor, using the
  776. cursor keys or mouse, to the position where you want the left
  777. side of the menu option to start, then press Enter, or click with
  778. the mouse. When you move the cursor keys or mouse the menu option
  779. will expand or contract it from its origin.  When the menu option
  780. is at its correct size you may move it around the screen by
  781. pressing F3.  F3 can be used to toggle between moving the option
  782. or expanding/contracting it.  When you are happy with the size
  783. and position of the menu option, click with the mouse or press
  784. Enter to save it. 
  785.  
  786.  
  787. To edit or delete a menu option select "EDIT" or "DELETE" from
  788. MENU/OPTION  on the menu.  Move the cursor to the menu option to
  789. edit or delete and either click on it with the mouse or press
  790. Enter.  If you are deleting the option you will be asked whether
  791. you wish to go ahead with the deletion.  If you answer "Y" the
  792. menu option will disappear.  If are editing the option a window
  793. will appear enabling you to edit the menu option text as
  794. previously.  You may also attach the menu option to another menu
  795. system. 
  796. When you have changed the text save it with Enter, or press Esc
  797. to abandon the edit. You will then enter Menu Edit mode and you
  798. should progress as mentionedpreviously when adding a menu option.
  799.  
  800. Hotkey to Add a Menu Option.
  801. ---------------------------
  802. If you are in Screen Edit Mode you may add a menu option without
  803. resorting to the pulldown menu bar.  If you press F5 you will
  804. enter Menu Edit Mode, from where you can place a menu option on
  805. the screen.  Note however that you cannot use F5 to edit or
  806. delete an existing menu option.
  807. Adding a Standard Menu System.
  808. -----------------------------
  809. To save you the time taken in creating a standard menu system,
  810. you may select a Standard menu from the Screen Edit Menu. This
  811. standard menu has seven options already created for you, these
  812. are: "ADD", "EDIT", "DELETE", "NEXT", "PREV", "FIND" and "QUIT".
  813. These menu options are drawn on the second to last row of the
  814. current screen when you select "MENU", followed by "STANDARD",
  815. from the Screen Edit Menu. You may only add one standard menu to
  816. each screen. These menu options may be edited in the same way as
  817. previosuly described.
  818.  
  819. Letter Selection of dBase Menus.
  820. --------------------------------
  821. To improve your dBaseIII/IV menus you may wish to select a menu
  822. option by pressing a letter, rather than using the cursor/tab key
  823. to highlight it and then pressing the enter key. For example: if
  824. you have amenu option called "EDIT" you may wish to select it by
  825. simply pressing the letter "E".  To enable letter selection then,
  826. when you edit the menu option heading, insert a ^ (hat) symbol
  827. before the selection letter (normally the first letter). The
  828. ^ symbol will not appear on the finished menu system, but the
  829. letter selection code will be generated. (So then in our example
  830. we would enter the option title as "^EDIT" ). Note that when you
  831. select the standard menu system the ^ symbol is added before
  832. the first character of each option automatically.
  833.  
  834.  
  835. Notes: 
  836.  
  837. 1)    in the case of Clipper menus it is not necessary to include
  838.       the ^ symbol in option headings because Clipper
  839.       automatically allows first letter selection in menus.
  840.  
  841. 2)    If you select Clipper for the Language setting, then
  842.       generate a Standard Menu, and you then change the language
  843.       to dBase, remember that the Standard Menu will have no ^
  844.       symbols for first letter selection.
  845.  
  846.  
  847. The Expand/Contract or Move HotKey - F3
  848. ----------------------------------------
  849. It is worth emphasising that when editing Boxes, Titles or Menu
  850. options and moving them around the screen the F3 key toggles
  851. between movement of the object and expanding/contracting the size
  852. of the object.
  853. CHANGING DEFAULT COLORS FOR GENERATED SCREENS.
  854. ----------------------------------------------
  855.  
  856. If you select "SCREENCOLORS" from Main Menu, at any time, you
  857. will be able to change the colors, etc, of the data entry screen
  858. you will generate (NOTE: this should not be confused with the
  859. system colors for SLD system menus and windows available from the
  860. Setup Menu).
  861.  
  862. The settings you can change from SCREENCOLORS are as follows:
  863.  
  864.  BACKFILL:  this option allows you to change the character that
  865.             will be used to fill the background of your data
  866.             entry screen. It may be a space character, or ASCII
  867.             code.
  868.  
  869.  BACKGROUND: this allows you to change the background color of 
  870.             the data entry screen.  The actual color and
  871.             appearance of the background will depend on the
  872.             combination of this setting and the BACKFILL
  873.             character you selected.
  874.  
  875.  FIELD:     this determines the color of text and background of
  876.             unselected data entry fields.  To assist you in
  877.             choosing the color of the field text, an asterisk is
  878.             displayed in the blank field.
  879.  
  880.  SELECTED:  this determines the text and background color in
  881.             which the currently selected data entry field will
  882.             appear. 
  883.  HEADING:   this allows you to select the text and background 
  884.             color for headings which correspond to a data entry
  885.             field.
  886.  
  887.  TITLE:     this option allows you to select the text and
  888.             background color for additional titles on your data
  889.             entry screen.
  890.  
  891.  MENU:      this option allows you to select the text and
  892.             background color for selected user created menu
  893.             options. These menus should not be confused with the
  894.             main SLD pulldown menu bar.
  895.  
  896.  UNSELMENU: this allows you to select the text and background
  897.             color for unselected user created menu options.
  898.  
  899.  BOX:       this determines the frame background and foreground
  900.             color of boxes you add to your data entry screen.
  901.  
  902.  FRAME:     you can select the default frame characters which
  903.             boxes will use by default.  This setting can be
  904.             overridden temporarily when you add a new box.  The
  905.             frame you may select can be one of: No Frame, Single
  906.             Lined Frame, Double Lined Frame, Double Lined Top and
  907.             Single Lined Side, or Single Lined Top and Double
  908.             Lined side.
  909.  
  910.  SETFRAMES: if you change the default frame type this change will
  911.             not be reflected in the previously defined boxes
  912.             already displayed on the screen, unless you change
  913.             each box individually. However by selecting this
  914.             option all boxes will be updated with the new default
  915.             frame type at the same time.
  916.  
  917.   Note:     if you are using the monochrome display mode the
  918.             color palette colors will be translated to gray scale
  919.             tones. Some colors in the palette will be displayed
  920.             with an underline. These colors will be displayed
  921.             with underlining in the system colors, and on
  922.             completed data entry screens if you have selected
  923.             Clipper for the language type. However the
  924.             underlining will not be displayed if you select dBase
  925.             for the language type, so bear this in mind when
  926.             selecting colors.
  927. CHANGING DEFAULT SLD SYSTEM COLORS.
  928. -----------------------------------
  929. If you select "SETUP" from Main Menu, the System Setup Menu will
  930. appear. You may change the default system settings for Screen
  931. Layout Designer from here. By selecting "COLORS" you may change
  932. the colors for the pulldown menus, information windows/dialog
  933. boxes, data entry, and listboxes, etc.
  934.  
  935. The settings you can change from COLORS are as follows:
  936.  
  937.  MENUBAR - this option allows the setting of pulldown menu colors
  938.  -------
  939.  UNSELECTED: this option allows you to change the color of        
  940.             currently unselected options on the pulldown menus.
  941.  
  942.  HIGHLIGHT: unselected menu options have a highlighted character.
  943.             If you select "Alt" and this character, or just this
  944.             character on its own you will select this option on
  945.             the menu. You may change the highlight color here.
  946.  
  947.  SELECTED:  this option allows you to change the color of the
  948.             currently selected menu option.
  949.  
  950.  DISABLED:  some menu options will not be valid for the state of
  951.             the current menu. These options will disabled and
  952.             should appear in a dimmer color than normal selected
  953.             or unselected options. Change this color here.
  954.  
  955.  FRAME:     this option allows you to change the frame and
  956.             heading text color of pulldown menus.
  957.  
  958.  HELP:      this option allows the setting of the single help
  959.             line positioned at the bottom of the screen.
  960.  
  961.  WINDOWS - this option allows the setting of windows/dialog box -
  962. -------   colors.
  963.  
  964.    TEXT:    this option allows you to change the color of the
  965.             text of information and dialog boxes,as well as the
  966.             background on which it is displayed.
  967.  
  968.    FRAME:   this allows you to change the frame color for info.
  969.             windows and dialog boxes.
  970.  
  971.    SBUTTON: some dialog boxes will present you with options
  972.             presented as buttons responding to operator response
  973.             (eg. 'Y' or 'N'). You to change the color of the
  974.             currently selected push button.
  975.  
  976.    UBUTTON: this allows you to change the color of currently
  977.             unselected push buttons.
  978.  
  979.   ENTRY - this option allows the setting of data entry box colors
  980.   -----
  981.    WINDOW:  this option allows you to change the frame, heading 
  982.             and background colors for data entry windows
  983.             requiring user input (eg. the name of a file for SLD
  984.             to process).
  985.  
  986.    PROMPT:  this option allows you to change the text and
  987.             background color for the text prompting the user for
  988.             data entry. (eg. Filename: ).
  989.  
  990.    SELECTED: this allows you to change the color of the currently
  991.             selected item in in a data entry window.
  992.  
  993.    UNSELECTED: if there is more than one item in a data entry
  994.             window the currently unselected items will be
  995.             presented in a different color to the selected item.
  996.             You may change this color here.
  997.  
  998.   LISTBOX - this option allows the setting of listbox colors.
  999.   --------  Listboxes will present the user with multiple lines
  1000.             of information and may also allow the user to select
  1001.             a line for input into a data entry screen.
  1002.  
  1003.   FRAME:    this allows you to change the color of the frame
  1004.             surrounding a list box.
  1005.  
  1006.   HIGHLIGHT: this allows you to change the color of the
  1007.             currently highlighted line in a list box.
  1008.  
  1009.   NORMAL:   this allows you to change the color of all other
  1010.             non-highlighted items in a list box.
  1011.  
  1012.  
  1013.   HELP  - this option allows you to change the help window
  1014.   ------  and index colors.
  1015.  
  1016.    FRAME:   this allows you to change the color of the frame and
  1017.             heading colors of the help window and help index.
  1018.  
  1019.    NORMAL:  this allows you to change the background and text
  1020.             color for of the help window and index.
  1021.  
  1022.    HIGHLIGHT: this allows you to change the color of higlighted
  1023.             words within the help window (ie. for important
  1024.             titles and points).
  1025.  
  1026.    INDEX:   the index window highlights the currently selected
  1027.             index topic. This allows you to change the the color
  1028.             of the highlighted item.
  1029.              
  1030. GENERATING SCREEN OUTPUT SOURCE CODE.
  1031. -------------------------------------
  1032.  
  1033. Once you have laid out your data entry screen(s), complete with
  1034. any necessary boxes and titles, you are ready to generate source
  1035. code so that the screen can be incorporated into the database
  1036. program under development.
  1037.  
  1038. The built in code generator will generate code in dBase or
  1039. Clipper generic code.  To generate the code you should ensure
  1040. that you have entered a file name in the FILE/OUTPUT/CODE option
  1041. from the pulldown menu bar, then you should select "GEN" from the
  1042. menu bar, followed by "CODE".  The source code for the screen(s)
  1043. will be placed in the selected file. You should then paste the
  1044. code into your program and compile it with your dBase generic
  1045. compiler.  The code will be in the form of a procedure.  If your
  1046. program will incorporate multiple data entry screens then one
  1047. procedure will be generated for each screen.  Please see Appendix
  1048. C for information on the code generated by SLD.
  1049.  
  1050. The default filename extension for generated Screen Code Files is
  1051. ".PRG". 
  1052.  
  1053.  
  1054. GENERATING A SCREEN LAYOUT FILE.
  1055. --------------------------------
  1056.  
  1057. In addition to source code, you can store the contents and
  1058. settings of a data entry screen you have laid out in a type of
  1059. file unique to SLD.  This file contains a header record and a
  1060. record for each screen you have assigned in the current session. 
  1061. The Screen Layout Files have a ".SLF" extension name.  Once you
  1062. have laid out your screen(s) you can generatean SLF, first
  1063. ensuring that you have entered a file name with the correct
  1064. extension in the FILE/OUTPUT/SLF option from the pulldown menu
  1065. bar.  To generate the SLF select "GEN", followed by "SLF" from
  1066. the menu bar. The full information and settings relating to the
  1067. current screen(s) will be stored in the selected Screen Layout
  1068. File.
  1069.  
  1070. At any time in the future you can read from this SLF by selecting
  1071. SETUP/INPUT/SLF from the menu bar and entering its file name when
  1072. you select FILE/INPUT/SLF.  Then when you select VIEW the
  1073. previously stored screen will be redisplayed.
  1074. This type of file is probably the most powerful feature of SLD
  1075. because any third party program can be written to read its
  1076. contents to generate screen code in almost any language.  This
  1077. feature is one being developed further.
  1078.  
  1079. For information on the fields in the records of a Screen Layout
  1080. File please see Appendix A.
  1081.  
  1082. AUTOMATIC BACKUP
  1083. ----------------
  1084. When you change screens, exit from the Screen Edit Menu, or
  1085. perform certain critical screen editing operations, the contents
  1086. of the screens currently being edited are automatically saved to
  1087. a temporary file called "BACKUP.SLF" in the current directory so
  1088. that your data is backed up. BACKUP.SLF" can be read just the
  1089. same as any other Screen Layout File. When SLD is backing up a
  1090. message "Saving to BACKUP.SLF" appears briefly.
  1091.  
  1092.  
  1093. UPDATING THE INPUT TEXT FILE.
  1094. -----------------------------
  1095.  
  1096. If you are reading the data fields direct from a .DBF file then
  1097. an intermediate input text file will be created.  You may also
  1098. create your own text file containing the data fields, either
  1099. manually with an editor (see Chapter 4), or by dumping the fields
  1100. from a .DBF file into a text file (a program example, written in
  1101. Clipper is given in Chapter 4).  Screen Layout Designer will read
  1102. the data fields from this text file.  You may update the contents
  1103. of this file, in a limited way, by selecting "UPDATE", followed
  1104. by "TEXT", from the menu bar.  The data fields listed in the text
  1105. file will be saved in the order in which they appear on the
  1106. screen you have laid out, and according to them screen number on
  1107. which they appear.  The update operation may make use of the
  1108. #SCREEN command, unique to SLD.  
  1109.  
  1110. NOTE: beware that if you have updated the text file and you are
  1111. reading direct from a database .DBF file, the text file will be
  1112. overwritten when you re-run SLD or select NEW from the menu bar,
  1113. unless you select a new text file name for input.
  1114.  
  1115.  
  1116. EDITING A FILE.
  1117. ----------------
  1118.  
  1119. You may edit an input text file (default extension .TXT), an
  1120. output Screen Code File (default extension .PRG), or a dBase FMT
  1121. file (default extension .FMT), but you should not attempt to edit
  1122. any other type of file used by SLD.  Before you can edit a file
  1123. you must ensure that a valid editor has been selected.  The
  1124. executable file name of your editor should be entered by
  1125. selecting SETUP, then EDITOR from the menu bar. The default
  1126. editor is SCREDIT.EXE, however you may want to use a more
  1127. sophisticated editor.  Do not use a wordprocessor from within
  1128. SLD, as it is likely to use too much memory and may add unwanted
  1129. control characters to the file being edited.  If you have to use
  1130. a wordprocessor use it outside of the SLD program and save your
  1131. files as ASCII text, without control characters.
  1132.  
  1133. To edit the input text file select "EDIT", followed by "INPUT"
  1134. from the pulldown menu bar, then enter the name of the input text
  1135. file you wish to edit.  The default file extension for input text
  1136. files is ".TXT". 
  1137.  
  1138. To edit the output Screen Code File select "EDIT", followed by
  1139. "OUTPUT" from the menu bar, then enter the output Screen Code
  1140. File name that you wish to edit.  The default file extension for
  1141. Screen Code files is ".PRG".
  1142.  
  1143. To edit a dBase FMT file select "EDIT", followed by "FMT". The
  1144. default extension for these files is ".FMT".
  1145.  
  1146. PRINTING A FILE.
  1147. ----------------
  1148.  
  1149. You may print an input text file (default extension .TXT), an
  1150. output Screen Code File (default extension .PRG), or a dBase FMT
  1151. file (default extension .FMT), but you should not attempt to
  1152. print any other type of file used by SLD. You may additionally
  1153. print information about the current system settings. The
  1154. information is sent to the printer in normal ASCII text form. 
  1155. Before printing you must ensure that you have selected the
  1156. correct printer port for your printer. This should be LPT1, LPT2,
  1157. LPT3, COM1, COM2 or COM3, depending on whether your printer
  1158. interface is parallel or serial, and on how many ports your
  1159. system has free and available. To setup the printer, run the
  1160. Setup Menu, by selecting "SETUP" from the Main Menu, and then
  1161. select "PRINTER". You should enter the printer port and other
  1162. information here (see Setup).
  1163.  
  1164. To print the input text file select "PRINT", followed by "INPUT"
  1165. from the Main Menu bar. The file to be printed will be the input
  1166. text file name that you have entered by selecting "File", "Input"
  1167. and "Text" from the Main Menu.
  1168.  
  1169.  
  1170. To print the output Screen Code File select "PRINT", followed by
  1171. "OUTPUT" from the Main Menu. The file to be printed will be the
  1172. output program file name that you have entered by selecting
  1173. "File", "Output" and "Code" from the Main Menu.
  1174.  
  1175. To edit a dBase FMT file select "PRINT", followed by "FMT". The
  1176. file to be printed will be the input text file name that you have
  1177. entered by selecting "File", "Output" and "FMT" from the Main
  1178. Menu.
  1179.  
  1180. To print information about the current system setup select
  1181. "PRINT" followed by "SETTINGS". 
  1182.  
  1183. SELECTING A NEW INPUT FILE.
  1184. ---------------------------
  1185.  
  1186. You do not need to exit Screen Layout Designer to clear the
  1187. screen and read data fields from a new file.  If you select "NEW"
  1188. from the menu bar you will be able to clear the current fields
  1189. from the screen and either re-read the current input file, or
  1190. read a new input file.  If you have not saved the current screen
  1191. and settings you will be prompted to save them before reading of
  1192. the new input file commences.
  1193.  
  1194.  
  1195. USING ONLINE HELP.
  1196. ------------------
  1197.  
  1198. A HELP option is available from the pulldown menu.  This is
  1199. effectively an online manual with an index of topics.  If you are
  1200. stuck at any point then pressing "Esc" will get you out of
  1201. trouble and take you back to the menu bar, where you can select
  1202. online help which will be of assistance to you in the task you
  1203. are trying to perform.
  1204.  
  1205.  
  1206. LEAVING THE PROGRAM.
  1207. --------------------
  1208.  
  1209. To Exit SLD from Screen Edit Mode, press "Esc" until the menu bar
  1210. appears.  From the main pulldown menu bar press "Esc" again to
  1211. quit the program.  If you have not saved your screen and settings
  1212. you will be prompted to do so. 
  1213.  
  1214.  
  1215.                         Chapter 4.
  1216.                         ==========
  1217.  
  1218. CREATING AN INPUT TEXT FILE.
  1219. ----------------------------
  1220.                         
  1221. If you opt to read data fields onto your screen by
  1222. directlyreading from a database .DBF file then Screen Layout
  1223. Designer will automatically create an intermediate text file for
  1224. you.  You can use the file thus created in future screen editing
  1225. sessions without having to re-read the database file.   
  1226.  
  1227. If you do not want to read fields directly from the database file
  1228. then you can create the text file in two ways:
  1229.  
  1230. 1)    by running a program which lists the fields from your
  1231.       database file and dumps them into the text file.
  1232. 2)    by using an editor to create the file manually yourself.
  1233.  
  1234.  
  1235. Method 1:
  1236. ---------
  1237. Here is a sample program, written in Clipper, which can be used
  1238. to read the structure of a database file, in this case MEDIA.DBF,
  1239. and copy the field information into a text file, in this case
  1240. INPUT.TXT:
  1241.  
  1242. use MEDIA
  1243. COPY STRUCTURE EXTENDED TO newlist
  1244. USE newlist
  1245. LIST field_name,field_type,field_len,field_dec TO FILE input.txt
  1246.  
  1247.  
  1248. The above program is all you need to create the input text file. 
  1249. You might call this program "STRUC.PRG" and then compile it using
  1250. the Clipper compiler.  When you run the executable, STRUC.EXE,
  1251. you will create the text file.  (Note that newlist is an
  1252. intermediate file).
  1253.  
  1254. Method 2:
  1255. ---------
  1256. You can get an initial idea of how to create a text file manually
  1257. by looking at the sample file INPUT.TXT supplied on the
  1258. distribution disks.  The text file must contain, for each field,
  1259. the field name, field type, field length and decimal places (for
  1260. numeric types).  The field types can be one of: C (character), D
  1261. (date), N (numeric) or M (memo).  Here is an example:
  1262.  
  1263.       SHORTCODE C 10  0
  1264.       ACCNO     C 10  0  
  1265.       COMPANY   C 30  0  
  1266.       ADDRESS1  C 30  0  
  1267.       ADDRESS2  C 30  0  
  1268.       ADDRESS3  C 30  0  
  1269.       ADDRESS4  C 30  0  
  1270.       POSTCODE  C 15  0
  1271.  
  1272.  
  1273. Each line corresponding to each field can optionally be prefixed
  1274. by a number for compatibility reasons, although SLD ignores the
  1275. number. For example:
  1276.  
  1277.       1     SHORTCODE C 10  0
  1278.       2     ACCNO     C 10  0
  1279.       3     COMPANY   C 30  0
  1280.       4     ADDRESS1  C 30  0
  1281.       5     ADDRESS2  C 30  0
  1282.       6     ADDRESS3  C 30  0
  1283.       7     ADDRESS4  C 30  0
  1284.       8     POSTCODE  C 15  0
  1285.  
  1286.  
  1287. In addition the file can contain a "#SCREEN" command, unique to
  1288. SLD, which splits a number of fields into screens.  This command
  1289. is the only "hash" command currently supported by SLD. The syntax
  1290. is:     #SCREEN  <number>
  1291. where "number" is the screen number.  All data fields after the
  1292. #SCREEN command will be placed onto the screen with the specified
  1293. number, until another #SCREEN command is encountered.   Note:
  1294. When you do not include a #SCREEN command in the input text file
  1295. SLD automatically splits the screens for you, but if you include
  1296. #SCREEN commands SLD allows these to split the screens, so be
  1297. careful that you do not try to push too many fields onto one
  1298. screen. Example:
  1299.  
  1300.       #SCREEN 1
  1301.  
  1302.       SHORTCODE C 10  0
  1303.       ACCNO     C 10  0
  1304.       COMPANY   C 30  0
  1305.  
  1306.       #SCREEN 2
  1307.  
  1308.       ADDRESS1  C 30  0
  1309.       ADDRESS2  C 30  0
  1310.       ADDRESS3  C 30  0
  1311.       ADDRESS4  C 30  0
  1312.       POSTCODE  C 15  0
  1313.       
  1314. In the above example, SHORTCODE, ACCNO and COMPANY will appear on
  1315. screen number 1 and ADDRESS1,2,3,4 and POSTCODE will appear on
  1316. screen 2.
  1317.  
  1318.  
  1319. Multiple Database Files.
  1320. ------------------------
  1321. You may enter fields from more than one databse file on you data
  1322. entry screens. This features allows SLD to produce relational
  1323. applications. The layout is as follows:
  1324.  
  1325. COMPANY->SHORTCODE C 10  0
  1326. COMPANY->ACCNO     C 10  0
  1327. COMPANY->COMPANY   C 30  0
  1328. COMPANY->ADDRESS1  C 30  0
  1329. COMNPNY->ADDRESS2  C 30  0
  1330. COMPANY->ADDRESS3  C 30  0
  1331. COMPANY->ADDRESS4  C 30  0
  1332. COMPANY->POSTCODE  C 15  0
  1333. CONTACTS->SHORTNAME C 10 0
  1334. CONTACTS->FIRSTNAME C 30 0
  1335. CONTACTS->SURNAME   C 30 0
  1336.  
  1337. Two data files are used in the example above, COMPANY and
  1338. CONTACTS, so that fields from both files will appear on the same
  1339. screen.
  1340.  
  1341.  
  1342. As previously mentioned SLD will automatically generate an
  1343. intermediate text file for you if you opt to read the database
  1344. fields directly from  database .DBF files. However you may wish
  1345. to edit the input text file to suit your needs.                         APPENDIX A.
  1346.                         ===========
  1347. THE FORMAT OF SCREEN LAYOUT FILES.
  1348. ----------------------------------
  1349. The format of SLF files have changed. The older format is however
  1350. still supported by the later releases of SLD. However SLD version
  1351. 2 does not directly support version 1 files. If you want to read
  1352. version 1 files from version 2 you must convert your old version
  1353. 1 .SLF files to version 2 to by running the SLFCONV1.EXE program.
  1354. The syntax is:
  1355.   SLFCONV1  <old SLF> <new SLF>
  1356. or:
  1357.  SLFCONV1  ALL           
  1358. (this converts all SLF V1 files to V2 in the current directory)
  1359.  
  1360. Screen Layout Files (SLF) contain full information about screens
  1361. that you have built, plus other settings, including colors.  
  1362.  
  1363. The only difference between version 1 and version 2 SLFs is in
  1364. the header record. The differences are shown below.
  1365.  
  1366. STRUCTURE OF VERSION 1 SLFs
  1367. ----------------------------
  1368. Each SLF version 1 file has a 222 byte header record, followed by
  1369. a 109 byte record for each field, box or title on all active
  1370. screens.  The information about version 1 files is only shown for
  1371. reference. The file looks like this:
  1372.  
  1373.           byte
  1374.           pos'n
  1375.           -----
  1376.              1  _______________
  1377.                |    Header     |
  1378.            223 |---------------|
  1379.                |  Field Info.  |
  1380.            332 |---------------|
  1381.                |  Field Info.  |
  1382.            441 |---------------|
  1383.                |  Field Info.  |
  1384.            550 |---------------|
  1385.                     etc...
  1386. The Header Record will be as follows:
  1387.  
  1388. Byte   Data
  1389. Pos'n  Type     Purpose of Data
  1390. -----  ------   -----------------------
  1391.  1     byte     Color used for background of data entry screen
  1392.  2     byte     Color used for unselected data entry fields
  1393.  3     byte     Color used for selected data entry fields
  1394.  4     byte     Color used for data entry field headings
  1395.  5     byte     Color used for additional titles
  1396.  6     byte     Color used for boxes
  1397.  7     byte     Color used for selected menu options
  1398.  8     byte     Color used for unselected menu options
  1399.  9     char     ASCII character used for background
  1400. 10     Boolean  Text mode (true=80x25, false=80x50)
  1401. 11     byte     Language type (1=Cl5, 2=Cl87, 3=DB3, 4=DB4)
  1402. 12     Boolean  Use a space after field headings.
  1403. 13-102 array of 10 strings of length 8 bytes, containing
  1404.        .DBF filenames
  1405. 103    Boolean  Monochrome colors (true=mono, false=color)
  1406. 104    byte     Default frame type (see table)
  1407. 105    byte     Number of active data fields on the screen(s)
  1408. 106    byte     Number of boxes on the data entry screen(s)
  1409. 107    byte     Number of titles on the data entry screen(s)
  1410. 108    byte     Maximum number of screens active in this session
  1411. 109    byte     Number of menus on the data entry screen(s)
  1412. 110-149 array of bytes (1 to max. menu number) one byte for each
  1413.       active menu containing the screen on which it appears.
  1414. 150    byte     Display type (1=MDA, 2=CGA, 3=EGA, 4=VGA)
  1415. 151    byte     Display rows (25, 43 or 50)
  1416. 152    byte     Dos version no.
  1417. 153-168 array of bytes - Each bit of 16 bytes representing a 
  1418.       screen, if the bit is set it has a standard menu on it.
  1419. 169-208 array of bytes (1 to max menu no.) one byte for each 
  1420.       active menu containing menu type.
  1421. 209-216 byte    reserved
  1422. 217-220 byte    Representing ASCII characters giving 'END$'
  1423. 221    byte     byte value for SLD file type (4 = 1.04)
  1424. 222    byte     reserved
  1425. STRUCTURE OF VERSION 2 SLFs
  1426. ----------------------------
  1427. NOTE: Screen Layout Designer Version 2+ can only save and read
  1428. the SLF file structures shown below:
  1429. Each SLF version 2 file has a 502 byte header record, followed by
  1430. a 109 byte record for each field (the field info. field is the
  1431. same as version 1), box or title on all active screens.  The file
  1432. looks like this:
  1433.  
  1434.           byte
  1435.           pos'n
  1436.           -----
  1437.              1  _______________
  1438.                |    Header     |
  1439.            503 |---------------|
  1440.                |  Field Info.  |
  1441.            612 |---------------|
  1442.                |  Field Info.  |
  1443.            721 |---------------|
  1444.                |  Field Info.  |
  1445.            830 |---------------|
  1446.                     etc...
  1447.  
  1448. The Header Record will be as follows:
  1449.  
  1450. Byte   Data
  1451. Pos'n  Type     Purpose of Data
  1452. -----  ------   -----------------------
  1453. 1-2    byte     File identification (version 2 = FFEE hex)
  1454. 3-4    byte     SLD version no. (2.01 = 201)
  1455.  5     byte     Color used for background of data entry screen
  1456.  6     byte     Color used for unselected data entry fields
  1457.  7     byte     Color used for selected data entry fields
  1458.  8     byte     Color used for data entry field headings
  1459.  9     byte     Color used for additional titles
  1460. 10     byte     Color used for boxes
  1461. 11     byte     Color used for selected menu options
  1462. 12     byte     Color used for unselected menu options
  1463. 13     char     ASCII character used for background
  1464. 14     Boolean  Text mode (true=80x25, false=80x50)
  1465. 15     byte     Language type (1=Cl5, 2=Cl87, 3=DB3, 4=DB4)
  1466. 16     Boolean  Use a space after field headings.
  1467. 17-196 array of 20 strings of length 8 bytes (+1), containing
  1468.        .DBF filenames
  1469. 197    Boolean  Monochrome colors (true=mono, false=color)
  1470. 198    byte     Default frame type (see table)
  1471. 199-200 byte     Number of active data fields on the screen(s)
  1472. 201    byte     Number of boxes on the data entry screen(s)
  1473. 202    byte     Number of titles on the data entry screen(s)
  1474. 203    byte     Maximum number of screens active in this session
  1475. 204    byte     Number of menus on the data entry screen(s) 205-284 array of bytes (1 to max. menu number) one byte for each
  1476.       active menu containing the screen on which it appears.
  1477. 285    byte     Display type (1=MDA, 2=CGA, 3=EGA, 4=VGA)
  1478. 286    byte     Display rows (25, 43 or 50)
  1479. 287    byte     Dos version no.
  1480. 288-303 array of bytes - Each bit of 16 bytes representing a 
  1481.       screen, if the bit is set it has a standard menu on it.
  1482. 304-383 array of bytes (1 to max menu no.) one byte for each 
  1483.       active menu containing menu type. (80 bytes)
  1484. 384-433  string   Contains the default working directory 
  1485. 434-497 byte    reserved (64 bytes)
  1486. 498-501 byte    Representing ASCII characters giving 'END$'
  1487. 502     byte     reserved
  1488.  
  1489.  
  1490. Version 1 and 2 SLF files both have the same field info.
  1491. structure as shown below:
  1492.  
  1493. The frame types are numbered.  This number represents frame types
  1494. as follows:
  1495.  
  1496.  0 = No Frame
  1497.  1 = Single Frame  (ASCII codes 218,192,191,217,196,179)
  1498.  2 = Double Frame  (ASCII codes 201,200,187,188,205,186)
  1499.  3 = Single Top Double Sided (ASCII 214,211,183,189,196,186)
  1500.  4 = Double Top Single Sided (ASCII 213,212,184,190,205,179)
  1501.  
  1502.  
  1503. Following the header, information relating to each active data
  1504. field for the session being recorded is stored in the form of one
  1505. record field, including its heading, as follows:
  1506.  
  1507. Byte
  1508. Pos'n
  1509. From  Data
  1510. Start Type        Purpose of Data
  1511. ----- ------      ---------------------------
  1512.   1   double byte Field reference number
  1513.   3   byte        DBF file number (this number corresponds to an
  1514.                   index in the array of DBF files in the header)
  1515.   4   string[10]  Field name in the database file
  1516.  15   string[78]  Heading as it appears on screen for this field
  1517.  94   character   The data type of this field (C,N,D, or M)
  1518.  95   byte        The length of the field
  1519.  96   byte        The number of decimal places (numeric fields)
  1520.  97   byte        Left column of start of data entry field on
  1521.                   screen
  1522.  98   byte        Top row of start of data entry field
  1523.  99   byte        Right column of data entry field
  1524. 100   byte        Bottom row of data entry field (same as top)
  1525. 101   byte        Left column of start of field heading on screen
  1526. 102   byte        Top row of field heading
  1527. 103   byte        Right column of field heading
  1528. 104   byte        Bottom row of field heading (same as top) 105   byte        The screen number on which this field appears
  1529. 106   byte        (reserved for boxes,titles and menus... see
  1530.                   below)
  1531. 107   byte        Color attribute of unselected data entry fields
  1532. 108   byte        Color attribute of field headings
  1533. 109   byte        Color attribute of selected data entry fields
  1534.  
  1535. Note: the color attributes for individual fields are not
  1536. currently supported.
  1537.  
  1538. After the fields have been stored, information on titles and menu
  1539. options will be stored in the same manner, with one record per
  1540. title or per menu option. The record format is identical to that
  1541. used for the data entry fields, however the record fields are
  1542. re-used. The only differences between titles and menu options
  1543. are: (a) the title type is 'T', whereas this will be 'Y' or 'Z'
  1544. for menus,  (b) a byte is used to store the menu system number in
  1545. the case of menu options, and this will be 0 for titles. The
  1546. information will be stored as follows:
  1547.  
  1548.       Data
  1549. Byte  Type        Purpose of Data
  1550. ----  ------      -----------------------------------
  1551.   1   double byte Reference number
  1552.   3   byte        unused
  1553.   4   string[10]  unused
  1554.  15   string[78]  This contains the text for this title
  1555.  94   character   The data type of this field = 'T' for a title,
  1556.                   but 'Y' or 'Z' for menu options.
  1557.  95   byte        unused
  1558.  96   byte        unused
  1559.  97   byte        Left column of start of title/menu option on
  1560.                   screen
  1561.  98   byte        Row of title
  1562.  99   byte        Right column of title/menu option
  1563. 100   byte        unused
  1564. 101   byte        unused
  1565. 102   byte        unused
  1566. 103   byte        unused
  1567. 104   byte        unused
  1568. 105   byte        The screen number on which this title/menu
  1569.                   option appears.
  1570. 106   byte        must always be set to 0 for titles, but in the
  1571.                   case of menu options this must be the menu
  1572.                   system number on which this menu option
  1573.                   appears.
  1574. 107   byte        Color attribute for this title or menu option.
  1575. 108   byte        unused
  1576. 109   byte        unused
  1577.  
  1578. Note: the color attributes for individual titles or menu options 
  1579.       are not currently supported.
  1580. After the title and menu records, information relating to Boxes
  1581. on the screen(s) will be stored in a similarly.  The record
  1582. fields are re-used as follows:
  1583.  
  1584.       Data
  1585. Byte  Type        Purpose of Data
  1586. ----  ------      -----------------------------------
  1587.   1   double byte Reference number
  1588.   3   byte        unused
  1589.   4   string[10]  unused
  1590.  15   string[78]  unused
  1591.  94   character   The data type of this field = 'X' for boxes
  1592.  95   byte        unused
  1593.  96   byte        unused
  1594.  97   byte        Left column of start of box on screen
  1595.  98   byte        Top row of box
  1596.  99   byte        Right column of box
  1597. 100   byte        Bottom row of box
  1598. 101   byte        unused
  1599. 102   byte        unused
  1600. 103   byte        unused
  1601. 104   byte        unused
  1602. 105   byte        The screen number on which this box appears
  1603. 106   byte        The frame type number for this box (see above)
  1604. 107   byte        Color attribute for this box
  1605. 108   byte        unused
  1606. 109   byte        unused
  1607.  
  1608. Note: the color attribute for individual boxes is not currently
  1609. supported.
  1610.                         Appendix B.
  1611.                         ===========
  1612. NEW FILES FOR OLD.
  1613. ------------------
  1614. Version 2 setup files, with the extension .SET, and version 2
  1615. Screen Layout Files, with the extension .SLF, differ from their
  1616. version 1 counterparts. Version 2 of Screen Layout Designer does
  1617. not directly support the earlier setup and SLF files. However two
  1618. programs are included to convert the old files to the new format,
  1619. SETCONV1.EXE and SLFCONV1.EXE.
  1620.  
  1621. How to convert an old setup file to the new format:
  1622.  
  1623.   SETCONV1  <old filename>  <new filename>
  1624.  
  1625.   eg.  SETCONV1  SETUPS.SET  NEWONE.SET
  1626.  
  1627.   or
  1628.   --
  1629.  
  1630.   SETCONV1  ALL        
  1631.  
  1632.   (This converts all setup files in the current directory to the  
  1633.   new format)
  1634.  
  1635.  
  1636.  
  1637. To convert an old SLF to the new format:
  1638.  
  1639.   SLFCONV1  <old filename>  <new filename>
  1640.  
  1641.   eg.  SLFCONV1  SCREEN.SLF  NEWONE.SLF
  1642.  
  1643.   or
  1644.   --
  1645.  
  1646.   SLFCONV1  ALL
  1647.  
  1648.  
  1649.  
  1650. Notes:
  1651.       - For both utilities, if the second (new) filename is
  1652.       omitted the first filename is converted to the new format.
  1653.       A backup of the old file is made to the same name with a
  1654.       .BAK extension.
  1655.  
  1656.       - If you try to run SLD V2 with an old setup file or read
  1657.       an old SLF an error message will appear.
  1658.                         Appendix C.
  1659.                         ===========
  1660.  
  1661. THE GENERATED SCREEN CODE.
  1662. --------------------------
  1663.  
  1664. The Screen Layout Designer is capable of producing dBase generic
  1665. source code directly.  The source code representing the screens
  1666. that you have laid out will be stored in a text file which may
  1667. bepasted directly into your dBase generic program source code. 
  1668. You can then compile this code, using your dBase generic
  1669. compiler, into an executable ".EXE" file.  
  1670.  
  1671. The default extension for files containing generated screen code
  1672. is ".PRG". 
  1673.  
  1674. When you select dBase language generation a "MAIN.PRG" file will
  1675. be generated for you to enable you to test the code in the
  1676. generated .PRG file. This file may form the basis for your
  1677. application, though you should obviously rename it if you make
  1678. changes to it.
  1679.  
  1680. FMT FILES
  1681. ---------
  1682. SLD version 2.01 is also capable of producing dBaseIII "FMT"
  1683. files.  These FMT files contain only @SAY and @GET statements
  1684. corresponding to data entry fields and headings. Any menus, boxes
  1685. or titles you have laid out on the screen will not be included.
  1686. The default extension for these files is ".FMT".
  1687.  
  1688.  
  1689. The source code will be generated as follows:
  1690.  
  1691. Start and End of a Screen.
  1692. --------------------------
  1693. The contents of each screen will be placed in a procedure,
  1694. beginning with:
  1695.  
  1696.  PROC SCREEN#     ,where # is the screen number, and ending with:
  1697.  RETURN
  1698.  
  1699.  
  1700. Colors for Screens.
  1701. ------------------
  1702. Colors for each screen as a whole, boxes or titles will be set by
  1703. the following command:
  1704.  
  1705.  SET COLOR TO <expC1>,<expC2>,<expC3>,<expC4>,<expC5>
  1706.  
  1707. where expC1 = standard color, expC2 = enhanced color, expC3 =
  1708. border color, expC4 is left blank, expC5 = unselected color.  
  1709. For example:
  1710.  
  1711.  SET COLOR TO "GR+/R,BG+/R,W+/G,,N/W"
  1712.  
  1713.  In the case of Clipper V5 this will take the form of:
  1714.  
  1715.  SETCOLOR("GR+/R,BG+/R,W+/G,,N/W")
  1716.  
  1717.  
  1718. Drawing Boxes.
  1719. ---------------
  1720. Boxes are drawn with the following command syntax for Clipper:
  1721.   
  1722.   @ <toprow>,<leftcol>,<botrow>,<rightcol> BOX <frame> COLOR
  1723. <color>
  1724.  
  1725. For example:
  1726.  
  1727.   @ 13,32,17,62 BOX "┌─┐│┘─" COLOR "W+/G"
  1728.  
  1729.  
  1730. In the case of dBaseIII the box drawing is different:
  1731. Firstly the colors are set, then the box may have a double or
  1732. single lined frame:
  1733.  
  1734.   @ <toprow>,<leftcol> TO <botrow>,<rightcol> [DOUBLE]
  1735.  
  1736. Note: "DOUBLE" is omitted in the case of single lined frames.
  1737.  
  1738. Example:
  1739.  
  1740.       SET COLOR TO "W+/G"
  1741.       @ 8,36 TO 13,54 DOUBLE
  1742.       SET COLOR TO "GR+/RB,N/BG,,,N/W"
  1743.  
  1744.  
  1745. For dBaseIV the code will be similar to this example:
  1746.  
  1747.       SET COLOR TO "W+/G"
  1748.       @ 8,36 TO 13,55 "┌─┐│┘─└│"
  1749.       SET COLOR TO "GR+/RB,N/BG,,,N/W"
  1750.  
  1751. Titles.
  1752. -------
  1753. The command syntax for titles will be a simple @SAY statement,
  1754. preceded by coloring information:
  1755.  
  1756.      @ <row>,<col> SAY  "<text>"
  1757.  
  1758. For example:
  1759.   
  1760.    @  1,12  SAY "   Sales Database  "
  1761.  
  1762.  
  1763.  
  1764. Data Entry Fields.
  1765. ------------------
  1766. The colors for unselected and selected data entry fields will be
  1767. taken from the SET COLOR command immediately preceding the @GET
  1768. commands.  The data entry field code will be as follows:
  1769.  
  1770.    @ <row>,<col>  GET  <field_name>
  1771.  
  1772. For example:
  1773.  
  1774.    @ 3,17 GET company
  1775.  
  1776.  
  1777. Data Field Headings.
  1778. --------------------
  1779. The headings corresponding to data entry fields will be generated
  1780. using @SAY statements as follows:
  1781.  
  1782.    @ <row>,<col>  SAY  <heading>
  1783.  
  1784. For example:
  1785.  
  1786.    @ 3,5  SAY  "Company Name"
  1787.  
  1788.  
  1789. Reading Data Fields.
  1790. --------------------
  1791. The @GET statements in a procedure are terminated with a 
  1792. READ command.
  1793.  
  1794.  
  1795.  
  1796. Menu Systems
  1797. ------------
  1798. The way in which menus are implemented in Clipper differs from
  1799. dBase. In Clipper @PROMPT commands are used to build the menu and
  1800. the selected menu option stored using a MENU TO MKey command. In
  1801. the case of dBase menus the process of menu building is more
  1802. complicated, and an example is more suitable to illustrate this.
  1803. Each menu system is formed by a separate procedure in which the
  1804. menu is defined and laid out on the screen. This procedure is
  1805. called:
  1806. PROCEDURE MENU#   ,where # is the menu number.
  1807. Another procedure contains CASE statements where appropriate
  1808. action is taken in accordance with the selected menu option. 
  1809. This is called:
  1810. PROCEDURE MENUCASE#   ,where # is the menu number.
  1811.  
  1812. Clipper menu syntax:
  1813. -------------------
  1814. The menu is defined within the MENU# procedure:
  1815.  
  1816. To define a menu option:
  1817.  
  1818.   @ <row>,<col> PROMPT <heading>  MESSAGE <message>
  1819.  
  1820. Foe example:
  1821.  
  1822.   @ 14,20 PROMPT "QUIT" MESSAGE " "
  1823.  
  1824. Note that the message is blank, but you may add your own help
  1825. text.
  1826.  
  1827. Storing the menu to a variable:
  1828.  
  1829.   MENU TO <key>
  1830.  
  1831. For example:
  1832.  
  1833. MENU TO MKey
  1834.  
  1835. dBaseIII/IV Menus
  1836. -----------------
  1837. This is rather more complicated. Please study the sample program
  1838. DBASE3.PRG.
  1839.  
  1840. The last statement before RETURN in the MENU# procedure should
  1841. be a call to the procedure containing CASE statements:
  1842.   DO MENUCASE#
  1843. Clipper example:
  1844.  
  1845.   PROCEDURE MENU1
  1846.     LOCAL MKey
  1847.     @ 1,1 PROMPT "SAVE" MESSAGE " "
  1848.     @ 3,1 PROMPT "QUIT" MESSAGE " "
  1849.     MENU TO MKey
  1850.     DO MENUCASE1 WITH MKey
  1851.   RETURN
  1852.  
  1853.  
  1854. To Define the Menu Case Statements:
  1855. ----------------------------------
  1856. As mentioned previously the final stage of the menu process is a
  1857. separate procedure in which CASE statements perform appropriate
  1858. action according to the selected key from the menu.  The syntax
  1859. for this procedure is as follows:
  1860.  
  1861. PROCEDURE MENUCASE#
  1862.    PARAMETER <key>
  1863.    DO CASE
  1864.        CASE <key> = 1
  1865.          DO <procedure>
  1866.        CASE <key> = 2
  1867.          DO <procedure>
  1868.        ....
  1869.        ....
  1870.    ENDCASE
  1871. RETURN
  1872.  
  1873.  
  1874. For example:
  1875.  
  1876.  PROCEDURE MENUCASE1
  1877.    PARAMETER MKey
  1878.    DO CASE
  1879.       CASE MKey = 1
  1880.         DO SaveIt
  1881.       CASE MKey = 2
  1882.         RETURN
  1883.    ENDCASE
  1884.  RETURN
  1885.  
  1886.  
  1887. Note: SLD directs the case statements to a dummy procedure with
  1888.       DO DUMMY.  You should enter your own user defined procedure
  1889.       in each case statement. The DUMMY procedure is defined as:
  1890.       PROCEDURE DUMMY 
  1891.       RETURN
  1892.  
  1893. Selecting Menu Options at Runtime.
  1894. ---------------------------------
  1895. When you have generated the code for your menus you may, in
  1896. addition to first letter selection, select menu options when you
  1897. run the program as follows:
  1898.  
  1899.   dBaseIII/IV:    using the tab key, or the up or down  arrow
  1900.                   keys.
  1901.   Clipper:  using the cursor keys (arrow keys).
  1902.  
  1903.  
  1904.  
  1905. How the Generated Source Code is Constructed.
  1906. --------------------------------------------
  1907. The source code is formed of several modules. Each screen has its
  1908. own associated set of procedures, which are as follows:
  1909.  
  1910. Procedure 1: Displays titles and framed boxes, @SAY and @GETs for
  1911.             the data field memory variables.
  1912. Procedure 2: Declares data field memory variables corresponding
  1913.             to the open database fields. They are declared as
  1914.             PUBLIC.
  1915. Procedure 3: Initialises the memory variables so that they do
  1916.             not contain garbage.
  1917. Procedure 4: sets the memory variables to the contents of the
  1918.             database fields, so that editing procedures can make
  1919.             use of this.
  1920. Procedure 5: replaces the database field values with the values
  1921.             of the corresponding memory variables.
  1922. Procedure 6: this is a dummy procedure used by case statements
  1923.             in menus for testing purposes only.
  1924. Procedure 7: this defines menus and the menu options, and passes
  1925.             a menu selection to the next procedure.
  1926. Procedure 8: this is a series of case statements which act on the
  1927.             appropriate menu selection in procedure 7. The case
  1928.             statements call the dummy procedure at the moment
  1929.             -you should replace this with your own procedures.
  1930.  
  1931.  
  1932. An Example of Generated Screen Source Code.
  1933. --------------------------------------------
  1934. There are sample programs supplied with .PRG file extensions.
  1935. These will undoubtedly give you more insight into how SLD
  1936. generates its screen code. Howeever here is a simple single
  1937. screen example of the typical output of the Screen Layout
  1938. Designer.  It includes, boxes, a title, and data fields, with
  1939. appropriate headings:
  1940.  PROCEDURE SCREEN1
  1941.  
  1942.   LOCAL WinStr,iRow
  1943.  
  1944.     SETMODE(25,80)
  1945.  
  1946.       WinStr=""
  1947.       SETCOLOR("B+/B")
  1948.       FOR iRow = 0 TO 25
  1949.         @ iRow,0 SAY PADC(WinStr,80,"░")
  1950.       NEXT
  1951.  
  1952.       SETCOLOR("W+/BG")
  1953.       @ 0,0,24,79 BOX "┌─┐│┘─└│"
  1954.  
  1955.       SETCOLOR("GR+/R,W/R,,,N/W")
  1956.       @ 2,25 SAY "    ACME Sales Database   "
  1957.  
  1958.       SETCOLOR("GR+/RB,N/BG,,,N/W")
  1959.  
  1960.       @ 4,8 SAY "Short Name "
  1961.       @ 6,11 SAY "Company "
  1962.       @ 8,11 SAY "Address "
  1963.       @ 9,20 SAY aADDRESS2 PICTURE "XXXXXXXXXX"
  1964.       @ 10,20 SAY aADDRESS3 PICTURE "XXXXXXXXXX"
  1965.       @ 11,14 SAY "City "
  1966.       @ 13,5 SAY "Zip/Post Code "
  1967.       @ 15,15 SAY "Tel "
  1968.       @ 16,15 SAY "Fax "
  1969.       @ 18,9 SAY "Sales Area "
  1970.       @ 20,9 SAY "Sales Rep. "
  1971.       @ 18,44 SAY "Credit Limit "
  1972.       @ 14,43 SAY "Business Type "
  1973.       @ 4,39 SAY "Account No. "
  1974.       @ 16,48 SAY "Turnover "
  1975.       @ 20,46 SAY "Last Order "
  1976.      DO GETSCR1
  1977.      DO MENU2
  1978.  
  1979.  RETURN
  1980.  
  1981.  PROCEDURE SCREEN2
  1982.  
  1983.   LOCAL WinStr,iRow
  1984.  
  1985.     SETMODE(25,80)
  1986.  
  1987.       WinStr=""
  1988.       SETCOLOR("B+/B")
  1989.       FOR iRow = 0 TO 25
  1990.         @ iRow,0 SAY PADC(WinStr,80,"░")
  1991.       NEXT
  1992.  
  1993.       SETCOLOR("W+/BG")
  1994.       @ 0,0,24,79 BOX "┌─┐│┘─└│"
  1995.  
  1996.       SETCOLOR("GR+/R,W/R,,,N/W")
  1997.       @ 2,25 SAY "    Customer Contacts    "
  1998.       @ 16,8 SAY "Received: "
  1999.  
  2000.       SETCOLOR("GR+/RB,N/BG,,,N/W")
  2001.       @ 9,49 SAY "Importance "
  2002.       @ 5,15 SAY "Short ID "
  2003.       @ 7,14 SAY "Firstname "
  2004.       @ 8,16 SAY "Surname "
  2005.       @ 10,18 SAY "Title "
  2006.       @ 12,14 SAY "Call Rate "
  2007.       @ 14,14 SAY "Interests "
  2008.       @ 16,21 SAY "Xmas Card? "
  2009.       @ 16,37 SAY "XMas Gift? "
  2010.       @ 16,53 SAY "Golf Day Invite? "
  2011.       @ 19,12 SAY "Note: "
  2012.      DO GETSCR2
  2013.      DO MENU2
  2014.  
  2015.  RETURN
  2016.  
  2017.  PROCEDURE GETSCR1
  2018.  
  2019.       @ 4,20 GET aSHORTNAM PICTURE "XXXXXXXXXX"
  2020.       @ 6,20 GET aCOMPANY PICTURE "XXXXXXXXXX"
  2021.       @ 8,20 GET aADDRESS1 PICTURE "XXXXXXXXXX"
  2022.       @ 9,20 GET aADDRESS2 PICTURE "XXXXXXXXXX"
  2023.       @ 10,20 GET aADDRESS3 PICTURE "XXXXXXXXXX"
  2024.       @ 11,20 GET aADDRESS4 PICTURE "XXXXXXXXXX"
  2025.       @ 13,20 GET aPOSTCODE PICTURE "XXXXXXXXXX"
  2026.       @ 15,20 GET aTELNO PICTURE "XXXXXXXXXX"
  2027.       @ 16,20 GET aFAXNO PICTURE "XXXXXXXXXX"
  2028.       @ 18,21 GET aSALEAREA PICTURE "XXXXXXXXXX"
  2029.       @ 20,21 GET aSALESREP PICTURE "XXXXXXXXXX"
  2030.       @ 18,58 GET aCREDIT PICTURE "XXXXXXXXXX"
  2031.       @ 14,58 GET aBUSTYPE PICTURE "XXXXXXXXXX"
  2032.       @ 4,52 GET aACCNO PICTURE "XXXXXXXXXX"
  2033.       @ 16,58 GET aTURNTARG PICTURE "XXXXXXXXXX"
  2034.       @ 20,58 GET aLASTORD PICTURE "@D"
  2035.  
  2036.  RETURN
  2037.  
  2038.  PROCEDURE GETSCR2
  2039.  
  2040.       @ 9,61 GET aIMPORT PICTURE "XXXXXXXXXX"
  2041.       @ 5,25 GET bSHORTID PICTURE "XXXXXXXXXX"
  2042.       @ 7,25 GET bFIRSTNAM PICTURE "XXXXXXXXXX"
  2043.       @ 8,25 GET bSURNAME PICTURE "XXXXXXXXXX"
  2044.       @ 10,25 GET bTITLE PICTURE "XXXXXXXXXX"
  2045.       @ 12,25 GET bCALLRATE PICTURE "XXXXXXXXXX"
  2046.       @ 14,25 GET bINTEREST PICTURE "XXXXXXXXXX"
  2047.       @ 16,33 GET bXMASCARD PICTURE "XXXXXXXXXX"
  2048.       @ 16,49 GET bXMASGIFT PICTURE "XXXXXXXXXX"
  2049.       @ 16,71 GET bGOLFDAY PICTURE "XXXXXXXXXX"
  2050.       @ 19,20 GET bNOTE PICTURE "XXXXXXXXXX"
  2051.  
  2052.  RETURN
  2053.  PROCEDURE DECVARS1
  2054.     PUBLIC aSHORTNAM
  2055.     PUBLIC aCOMPANY
  2056.     PUBLIC aADDRESS1
  2057.     PUBLIC aADDRESS2
  2058.     PUBLIC aADDRESS3
  2059.     PUBLIC aADDRESS4
  2060.     PUBLIC aPOSTCODE
  2061.     PUBLIC aTELNO
  2062.     PUBLIC aFAXNO
  2063.     PUBLIC aSALEAREA
  2064.     PUBLIC aSALESREP
  2065.     PUBLIC aCREDIT
  2066.     PUBLIC aBUSTYPE
  2067.     PUBLIC aACCNO
  2068.     PUBLIC aTURNTARG
  2069.     PUBLIC aLASTORD
  2070.  RETURN
  2071.  
  2072.  
  2073.  PROCEDURE DECVARS2
  2074.     PUBLIC aIMPORT
  2075.     PUBLIC bSHORTID
  2076.     PUBLIC bFIRSTNAM
  2077.     PUBLIC bSURNAME
  2078.     PUBLIC bTITLE
  2079.     PUBLIC bCALLRATE
  2080.     PUBLIC bINTEREST
  2081.     PUBLIC bXMASCARD
  2082.     PUBLIC bXMASGIFT
  2083.     PUBLIC bGOLFDAY
  2084.     PUBLIC bNOTE
  2085.  RETURN
  2086.  
  2087.  
  2088.  PROCEDURE INITVARS1
  2089.    aSHORTNAM = SPACE(10)
  2090.    aCOMPANY = SPACE(30)
  2091.    aADDRESS1 = SPACE(30)
  2092.    aADDRESS2 = SPACE(30)
  2093.    aADDRESS3 = SPACE(30)
  2094.    aADDRESS4 = SPACE(30)
  2095.    aPOSTCODE = SPACE(15)
  2096.    aTELNO = SPACE(15)
  2097.    aFAXNO = SPACE(15)
  2098.    aSALEAREA = SPACE(1)
  2099.    aSALESREP = SPACE(20)
  2100.    aCREDIT = SPACE(9)
  2101.    aBUSTYPE = SPACE(12)
  2102.    aACCNO = SPACE(20)
  2103.    aTURNTARG = SPACE(11)
  2104.    aLASTORD = DATE()
  2105.  RETURN
  2106.  PROCEDURE INITVARS2
  2107.    aIMPORT = SPACE(1)
  2108.    bSHORTID = SPACE(10)
  2109.    bFIRSTNAM = SPACE(20)
  2110.    bSURNAME = SPACE(20)
  2111.    bTITLE = SPACE(20)
  2112.    bCALLRATE = SPACE(10)
  2113.    bINTEREST = SPACE(40)
  2114.    bXMASCARD = SPACE(1)
  2115.    bXMASGIFT = SPACE(1)
  2116.    bGOLFDAY = SPACE(1)
  2117.    bNOTE = SPACE(50)
  2118.  RETURN
  2119.  
  2120.  
  2121.  PROCEDURE SETVARS1
  2122.     aSHORTNAM = a->SHORTNAM
  2123.     aCOMPANY = a->COMPANY
  2124.     aADDRESS1 = a->ADDRESS1
  2125.     aADDRESS2 = a->ADDRESS2
  2126.     aADDRESS3 = a->ADDRESS3
  2127.     aADDRESS4 = a->ADDRESS4
  2128.     aPOSTCODE = a->POSTCODE
  2129.     aTELNO = a->TELNO
  2130.     aFAXNO = a->FAXNO
  2131.     aSALEAREA = a->SALEAREA
  2132.     aSALESREP = a->SALESREP
  2133.     aCREDIT = a->CREDIT
  2134.     aBUSTYPE = a->BUSTYPE
  2135.     aACCNO = a->ACCNO
  2136.     aTURNTARG = a->TURNTARG
  2137.     aLASTORD = a->LASTORD
  2138.  RETURN
  2139.  
  2140.  
  2141.  PROCEDURE SETVARS2
  2142.     aIMPORT = a->IMPORT
  2143.     bSHORTID = b->SHORTID
  2144.     bFIRSTNAM = b->FIRSTNAM
  2145.     bSURNAME = b->SURNAME
  2146.     bTITLE = b->TITLE
  2147.     bCALLRATE = b->CALLRATE
  2148.     bINTEREST = b->INTEREST
  2149.     bXMASCARD = b->XMASCARD
  2150.     bXMASGIFT = b->XMASGIFT
  2151.     bGOLFDAY = b->GOLFDAY
  2152.     bNOTE = b->NOTE
  2153.  RETURN
  2154.  
  2155.  PROCEDURE REPLVARS1
  2156.     REPLACE a->SHORTNAM WITH aSHORTNAM
  2157.     REPLACE a->COMPANY WITH aCOMPANY
  2158.     REPLACE a->ADDRESS1 WITH aADDRESS1
  2159.     REPLACE a->ADDRESS2 WITH aADDRESS2
  2160.     REPLACE a->ADDRESS3 WITH aADDRESS3
  2161.     REPLACE a->ADDRESS4 WITH aADDRESS4
  2162.     REPLACE a->POSTCODE WITH aPOSTCODE
  2163.     REPLACE a->TELNO WITH aTELNO
  2164.     REPLACE a->FAXNO WITH aFAXNO
  2165.     REPLACE a->SALEAREA WITH aSALEAREA
  2166.     REPLACE a->SALESREP WITH aSALESREP
  2167.     REPLACE a->CREDIT WITH aCREDIT
  2168.     REPLACE a->BUSTYPE WITH aBUSTYPE
  2169.     REPLACE a->ACCNO WITH aACCNO
  2170.     REPLACE a->TURNTARG WITH aTURNTARG
  2171.     REPLACE a->LASTORD WITH aLASTORD
  2172.  RETURN
  2173.  
  2174.  
  2175.  PROCEDURE REPLVARS2
  2176.     REPLACE a->IMPORT WITH aIMPORT
  2177.     REPLACE b->SHORTID WITH bSHORTID
  2178.     REPLACE b->FIRSTNAM WITH bFIRSTNAM
  2179.     REPLACE b->SURNAME WITH bSURNAME
  2180.     REPLACE b->TITLE WITH bTITLE
  2181.     REPLACE b->CALLRATE WITH bCALLRATE
  2182.     REPLACE b->INTEREST WITH bINTEREST
  2183.     REPLACE b->XMASCARD WITH bXMASCARD
  2184.     REPLACE b->XMASGIFT WITH bXMASGIFT
  2185.     REPLACE b->GOLFDAY WITH bGOLFDAY
  2186.     REPLACE b->NOTE WITH bNOTE
  2187.  RETURN
  2188.  
  2189.  
  2190.  PROCEDURE RELVARS1
  2191.     RELEASE aSHORTNAM
  2192.     RELEASE aCOMPANY
  2193.     RELEASE aADDRESS1
  2194.     RELEASE aADDRESS2
  2195.     RELEASE aADDRESS3
  2196.     RELEASE aADDRESS4
  2197.     RELEASE aPOSTCODE
  2198.     RELEASE aTELNO
  2199.     RELEASE aFAXNO
  2200.     RELEASE aSALEAREA
  2201.     RELEASE aSALESREP
  2202.     RELEASE aCREDIT
  2203.     RELEASE aBUSTYPE
  2204.     RELEASE aACCNO
  2205.     RELEASE aTURNTARG
  2206.     RELEASE aLASTORD
  2207.  RETURN
  2208.  PROCEDURE RELVARS2
  2209.     RELEASE aIMPORT
  2210.     RELEASE bSHORTID
  2211.     RELEASE bFIRSTNAM
  2212.     RELEASE bSURNAME
  2213.     RELEASE bTITLE
  2214.     RELEASE bCALLRATE
  2215.     RELEASE bINTEREST
  2216.     RELEASE bXMASCARD
  2217.     RELEASE bXMASGIFT
  2218.     RELEASE bGOLFDAY
  2219.     RELEASE bNOTE
  2220.  RETURN
  2221.  
  2222.  
  2223.  PROCEDURE DUMMY
  2224.  RETURN
  2225.  
  2226.  
  2227.  PROCEDURE MENU1
  2228.   LOCAL MKey
  2229.  
  2230.       SET ESCAPE OFF
  2231.         SETCOLOR("R/W,W/R,,,N/W")
  2232.  
  2233.       @ 22,5 PROMPT " ADD  " MESSAGE " "
  2234.       @ 22,14 PROMPT " EDIT " MESSAGE " "
  2235.       @ 22,23 PROMPT "DELETE" MESSAGE " "
  2236.       @ 22,32 PROMPT " NEXT " MESSAGE " "
  2237.       @ 22,41 PROMPT " PREV " MESSAGE " "
  2238.       @ 22,50 PROMPT " FIND " MESSAGE " "
  2239.       @ 22,69 PROMPT " QUIT " MESSAGE " "
  2240.       @ 22,59 PROMPT "CONTACT" MESSAGE " "
  2241.  
  2242.        MENU TO MKey
  2243.        DO MENUCASE1 WITH MKey
  2244.  RETURN
  2245.  
  2246.  PROCEDURE MENU2
  2247.   LOCAL MKey
  2248.  
  2249.       SET ESCAPE OFF
  2250.  
  2251.         SETCOLOR("R/W,W/R,,,N/W")
  2252.       @ 22,9 PROMPT " ADD  " MESSAGE " "
  2253.       @ 22,18 PROMPT " EDIT " MESSAGE " "
  2254.       @ 22,27 PROMPT "DELETE" MESSAGE " "
  2255.       @ 22,36 PROMPT " NEXT " MESSAGE " "
  2256.       @ 22,45 PROMPT " PREV " MESSAGE " "
  2257.       @ 22,54 PROMPT " FIND " MESSAGE " "
  2258.       @ 22,63 PROMPT "RETURN" MESSAGE " "
  2259.        MENU TO MKey
  2260.        DO MENUCASE2 WITH MKey
  2261.  RETURN
  2262.  
  2263.  
  2264.  PROCEDURE MENUCASE1
  2265.    PARAMETER MKey
  2266.     DO CASE
  2267.  
  2268.       CASE MKey = 1
  2269.          DO Dummy
  2270.       CASE MKey = 2
  2271.          DO Dummy
  2272.       CASE MKey = 3
  2273.          DO Dummy
  2274.       CASE MKey = 4
  2275.          DO Dummy
  2276.       CASE MKey = 5
  2277.          DO Dummy
  2278.       CASE MKey = 6
  2279.          DO Dummy
  2280.       CASE MKey = 7
  2281.          DO Dummy
  2282.       CASE MKey = 8
  2283.          DO Dummy
  2284.  
  2285.      ENDCASE
  2286.  RETURN
  2287.  PROCEDURE MENUCASE2
  2288.    PARAMETER MKey
  2289.     DO CASE
  2290.  
  2291.       CASE MKey = 1
  2292.          DO Dummy
  2293.       CASE MKey = 2
  2294.          DO Dummy
  2295.       CASE MKey = 3
  2296.          DO Dummy
  2297.       CASE MKey = 4
  2298.          DO Dummy
  2299.       CASE MKey = 5
  2300.          DO Dummy
  2301.       CASE MKey = 6
  2302.          DO Dummy
  2303.       CASE MKey = 7
  2304.          DO Dummy
  2305.  
  2306.      ENDCASE
  2307.  RETURN
  2308.  
  2309.  
  2310. Note: you may use this program by adding a few lines of code to
  2311.       it. If you place "DO SCREEN1" before the declaration of
  2312.       procedure SCREEN1 and you add "USE COMPANY" and "USE
  2313.       CONTACT" after the local variable declarations, then
  2314.       compile the program, you will be able to see the data entry
  2315.       screen as it would appear in a Clipper program. You will of
  2316.       course need to add SET RELATION or similar commands to
  2317.       relate the fields in the two database files, and if you
  2318.       intend to use the program on a network you will need to
  2319.       open your files accordingly. You will need to add the code
  2320.       to add, edit and delete records. SLD should greatly reduce
  2321.       the time taken to produce screens and menus. Our further
  2322.       planned releases will do even more for you.
  2323.  
  2324. Test programs are also generated at the same time as you generate
  2325. the main code .PRG. These test programs can be used to test the
  2326. operation of the main code: 
  2327.  
  2328. For Clipper:      CLIPTEST.PRG for Clipper code. Compile and link
  2329.                   the generated code with the CLIPMAKE.BAT batch
  2330.                   file (also generated at the SAME TIME).
  2331.             
  2332. For dBase:        DBTEST.PRG for dBase code. Run this program
  2333.                   from the applications generator.
  2334.  
  2335. How To Complete Your Application.
  2336. ---------------------------------
  2337. Whilst Screen Layout Designer takes care of the bulk of the task
  2338. of generating source code you will need to open your data files,
  2339. take care of database file relations, record locking and general
  2340. record operations. SLD was designed to take the hit and miss
  2341. frustration out of data entry screen layout and menu design, but
  2342. not to replace the programmer. (Please note: future versions SLD
  2343. will be able to open data files, take care of relational code and
  2344. record locking, and more).
  2345.  
  2346.  
  2347.                        Appendix D.
  2348.                        ===========
  2349.  
  2350. Two Tutorials.
  2351. --------------------
  2352. Here are two examples of how to read input from two previously
  2353. created input files.  The first example demonstrates how to get
  2354. SLD to read directly from a database file, COMPANY.DBF, and the
  2355. second example demonstrates how to read fields from a previously
  2356. created Screen Layout File, SCREEN.SLF or TUTOR1.SLF.  You will
  2357. be shown how to generate the code in the form of a .PRG file and
  2358. view it with an editor.
  2359.  
  2360. Tutorial One: Direct from a .DBF
  2361. ------------------------------
  2362. Action 1:  Start SLD.
  2363. Action 2:  select Setup from the Main Menu bar, followed by
  2364.             InputType.
  2365. Action 3: select Direct (the system is set to read directly from
  2366.             a .DBF)
  2367. Action 4:  press Esc until you return to the Main Menu bar.
  2368. Action 5:  select File, followed by Input.
  2369. Action 6:  select DBase.
  2370. Action 7:  enter "COMPANY" in the box next to the DB File 1
  2371.             prompt and ensure that all other boxes are empty.
  2372. Action 8:  press Ctrl and Enter.
  2373. Action 9:  select Text.
  2374. Action 10: enter the name of the intermediate text file, eg.
  2375.             TUTOR1.TXT
  2376. Action 11: press Esc until you return to the Main Menu bar.
  2377. Action 12: select SHOW  (if the file TUTOR1.TXT exists you will
  2378.             be prompted to overwrite it, so enter "Y" in this
  2379.             case)
  2380. Action 13: you will now be in the Screen Edit Menu. Select
  2381.             ScreenEdit, or alternatively press  the Esc key.
  2382. Action 14: you will now be in Screen Edit Mode, so, either use
  2383.             a mouse or the arrow keys to move the cursor onto a
  2384.             data field displayed on the screen.
  2385. Action 15: with the cursor on a data field, or its heading, click
  2386.             with the left mouse button or press the Enter key.
  2387. Action 16: you may now move the field around the screen.
  2388. Action 17: when you are satisfied with the position of the field
  2389.             on the screen click with the left mouse button or
  2390.             press Enter.
  2391. Action 18: to see information about the contents of the field,
  2392.             ensure that the cursor is over the field or its
  2393.             heading and double the left mouse button quickly or
  2394.             press F2.
  2395. Action 19: you may edit the heading text or change the screen on
  2396.             which it will be displayed. For the moment move down
  2397.             to the Field Description prompt and change the text.
  2398. Action 20: Press Ctrl and Enter to save the text. The field
  2399.             heading will change accordingly. Adding a box:
  2400.  
  2401. Action 21: Press Esc to return to the Screen Edit Menu bar.
  2402. Action 22: select Box.
  2403. Action 23: select New. You will enter Box Edit Mode.
  2404. Action 24: move the cursor around the screen to the position
  2405.             where you want the box to start.
  2406. Action 25: click with the left mouse button or press enter.
  2407. Action 26: when you move the cursor with the mouse or arrow keys
  2408.             the box will expand or contract from its origin.
  2409. Action 27: Press F3. Now when you move the cursor the box will
  2410.             remain the same size, but will move around the
  2411.             screen.
  2412. Action 28: press F3 again. The box will expand or contract when
  2413.             you move the cursor again.
  2414. Action 29: When you are happy with the size and position of the
  2415.             box press the Enter key or click the left mouse
  2416.             button. You have succeeded in drawing a box! 
  2417.  
  2418. Adding a Title:
  2419.  
  2420. Action 30: Press Esc to return to the Screen Edit Menu bar.
  2421. Action 31: Select Title.
  2422. Action 32: select New.
  2423. Action 33: you will be prompted to enter some text for your
  2424.             title. Do so and press Enter. You will enter Title
  2425.             Edit Mode.
  2426. Action 34: Move the cursor to where you want the title to begin, 
  2427.             then click with the left mouse button or press Enter.
  2428. Action 35: when you move the cursor the title will expand or
  2429.             contract.
  2430. Action 36: press F3. Now when you move the cursor the title will
  2431.             move.
  2432. Action 37: press F3 again. You will be able to expand/ contract
  2433.             and move the title.
  2434. Action 38: when you are satisfied with the position and size of
  2435.             your title press Enter, or click the left mouse
  2436.             button. You have drawn a title.
  2437.  
  2438. Adding a User defined Menu:
  2439. Action 39: Press Esc to return to the Screen Edit Menu bar.
  2440. Action 40: Select Menu.
  2441. Action 41: select Add. You have now added a new menu system to
  2442.             the screen on view.
  2443. Action 42: select New. This will add a new menu option to the new
  2444.             menu.
  2445. Action 43: you will be prompted to enter a heading text for your
  2446.             menu option (eg. "EDIT"). Do so and press Enter. You
  2447.             will enter Menu Edit Mode.
  2448. Action 44: Move the cursor to where you want the menu option to
  2449.             begin, then click with the left mouse button or press
  2450.             Enter. Action 45: when you move the cursor the menu option will expand
  2451.             or contract.
  2452. Action 46: press F3. Now when you move the cursor the menu option
  2453.             will move.
  2454. Action 47: press F3 again. You will be able to expand/ contract
  2455.             and move the menu option.
  2456. Action 48: when you are satisfied with the position and size of
  2457.             your menu option press Enter, or click the left mouse
  2458.             button.
  2459.  
  2460. You have drawn the first option on your new menu.(You may repeat
  2461. steps 42 to 48 if you want to continue adding options to your new
  2462. menu, or continue to 48).
  2463.  
  2464.  
  2465. Generating the Code:
  2466.  
  2467. Action 49: Press Esc to return to the Screen Edit Menu bar.
  2468. Action 50: Select Quit. You will be returned to the Main Menu.
  2469. Action 51: from the Main Menu select File, followed by Output,
  2470.             then Code.
  2471. Action 52: enter the name of the source code output file, eg.
  2472.             TUTOR1.PRG
  2473. Action 53: press Esc until you return to the top level of the
  2474.             Main Menu.
  2475. Action 54: select Generate, followed by Code.
  2476. Action 55: if the TUTOR1.PRG or other file exists you will be
  2477.             warned. In this case enter "Y" to overwrite it. The
  2478.             screen code will be generated.
  2479.  
  2480. Viewing the generated Code:
  2481.  
  2482. Action 56: select Edit, followed by Output from the Main Menu
  2483.             bar.
  2484. Action 57: enter the name of your output code file, eg.
  2485.             TUTOR1.PRG (or press Enter if it is shown). Your
  2486.             output source code wil be displayed.
  2487. Action 58: To exit the editor, press F4.
  2488.  
  2489. Saving Your Work:
  2490.  
  2491. Action 59: pres Esc to return to the top level of the Main Menu
  2492.             bar.
  2493. Action 60: select File, followed by Output, then SLF.
  2494. Action 61: enter the name of a Screen Layout File, eg. TUTOR1.SLF
  2495. Action 62: Esc to the Main Menu bar.
  2496. Action 63: select Generate, followed by SLF.
  2497. Action 64: if the file TUTOR1.SLF, etc. exists then enter "Y" to
  2498.             the prompt to overwrite it.
  2499.  
  2500. To exit SLD:
  2501.  
  2502. Action 65: Select Exit (or just press Esc) from the Main Menu
  2503.             bar. You will be prompted to confirm whether you wish
  2504.             to exit, and whether to save setup and screen
  2505.             information. For the moment respond "Y" to confirm
  2506.             that you want to exit and "N" to save setup/screen
  2507.             information.
  2508.  
  2509. Well done, you have generated your first application!
  2510.  
  2511. Tutorial Two: Reading from an SLF:
  2512. ----------------------------------
  2513. Action 1:  Start SLD.
  2514. Action 2:  select Setup from the Main Menu, then InputType from 
  2515.             the Setup Menu.
  2516. Action 3:  select SLF (the system is set to read from a
  2517.             previously generated Screen Layout File).
  2518. Action 4:  press Esc until you return to the Main Menu bar.
  2519. Action 5:  select File, followed by Input.
  2520. Action 6:  select SLF.
  2521. Action 7:  enter the name of a previously generated SL File in
  2522.             the box,  eg. TUTOR1.SLF that you generated in
  2523.             Tutorial One.
  2524. Action 8:  press Enter.
  2525. Action 9:  press Esc until you return to the Main menu bar.
  2526. Action 10: select SHOW.
  2527. Action 11: you will now be in the Screen Edit Menu. Select
  2528.             ScreenEdit, or alternatively press  the Esc key.
  2529. Action 12: the data fields from the SLF will be displayed and
  2530.             your screen and you will enter Screen Edit Mode.
  2531.  
  2532. You may now proceed according to the Actions from 14 onwards in 
  2533. Tutorial 1.
  2534.                         Appendix E.
  2535.                         ===========
  2536.  
  2537. FUTURE ENHANCEMENTS OF THE SCREEN LAYOUT DESIGNER.
  2538. --------------------------------------------------
  2539.  
  2540. Development is continuing on this software and related products
  2541. too.  Of course we would appreciate your interest and feedback. 
  2542. By listening to users of this software we can provide you with
  2543. what you want. In addition to planned enhancements to this
  2544. program we are developing one related program in particular:
  2545.  
  2546. A separate program, as part of a suite of software, for creating
  2547. .DBF files and for defining relational links between files,
  2548. including definition of primary and foreign keys, which will be
  2549. used by SLD to generate complete relational database
  2550. applications, including network record and file locking for
  2551. multi-user environments. This will reduce greatly the programming
  2552. work required by the developer. Work on this is in progress at
  2553. present. This will complement SLD  and registered users of SLD
  2554. will geat a generous discount on this software when available.
  2555.  
  2556. We also intend to produce further modules for SLD so that it can
  2557. generate screen source code in other languages.
  2558.  
  2559. We are investigating the feasibility of a separate program
  2560. allowing users not developing in dBase generic code to use SLD to
  2561. generate data entry screen source code in other languages. This
  2562. would allow users to define their own procedures or functions for
  2563. generating an object on the screen. SLD would use the defined
  2564. functions/procedures to generate screen source code.                         Appendix F.
  2565.                         ===========
  2566. TECHNICAL SUPPORT
  2567. =================
  2568. If you have any technical problems with Screen Layout Designer,
  2569. or you wish to enquire about other software we are developing,
  2570. then you should contact us at the address below, or you may
  2571. telephone 0703-701936 in the UK or 44 703 701936 outside the UK
  2572. (The best time is after 18:00 hrs UK time). Another number you
  2573. may call at weekends if you are unable to contact us is 0329
  2574. 833488 in the UK, or 44 329 833488 outside the UK. 
  2575.  
  2576. Almost certainly the best method of contacting us is via Email,
  2577. where you can send us full information on your problem or
  2578. enquiry, this may be via Compuserve or BBS.
  2579.  
  2580. Our Compuserve id. is 100116,370. This is probably your most
  2581. efficient means of contacting us.
  2582.  
  2583. You may send mail via the "Cardboard Box" BBS in the UK on 
  2584. 0962 880278  (44 962 880278 outside UK). Modem settings: 1200 to
  2585. 9600 baud, 8, 1, no parity. This BBS can also be contacted via
  2586. Fidonet (the Fidonet address is 2:252/201), or via Chatnet (the
  2587. Chatnet address is 44:1000/16). Mail should be addressed to "Nev
  2588. Palmer".  
  2589.  
  2590. Address:
  2591.  
  2592.       Neville T. Palmer
  2593.       PDM Associates
  2594.       17 Heathlands
  2595.       Shedfield
  2596.       Southampton
  2597.       Hants  SO3 2JD
  2598.       England
  2599.  
  2600. When you have a technical question please let us know the
  2601. following information:
  2602.  
  2603.   1) your name
  2604.   2) your company (if any)
  2605.   3) your Compuserve id. and/or telephone number
  2606.   4) your fax number (if available)
  2607.   5) your country and city
  2608.   6) your model of PC
  2609.   7) operating system version
  2610.   8) display type (if relevant)
  2611.   9) full details of the problem 
  2612.   10) relevant SLD system settings 
  2613.   11) any other relevant information (eg. free memory)                         REGISTRATION.
  2614.                         =============
  2615. If you register your copy of Screen Layout Designer we will send
  2616. you the latest version of the software, which will include any
  2617. enhancements. The cost of registration is US $40 or £25 Sterling. 
  2618. To register, please print and fill in the form below,
  2619. then send it, together with the appropriate payment, made out to
  2620. Neville T. Palmer, to this address:
  2621.  
  2622.       Neville T. Palmer
  2623.       PDM Associates
  2624.       17 Heathlands
  2625.       Shedfield
  2626.       Southampton
  2627.       Hants  SO3 2JD
  2628.       England
  2629.       
  2630. Registration Form - Screen Layout Designer V2 Plus
  2631. -----------------------------------------------------
  2632.  
  2633.       Name:    ____________________________________
  2634.  
  2635.       Company: ____________________________________
  2636.  
  2637.       Address: ____________________________________
  2638.  
  2639.                ____________________________________
  2640.       
  2641.       City:    _____________________
  2642.  
  2643.       State/County:  _______________    
  2644.       
  2645.       Zip/Post Code: _______________  
  2646.       
  2647.       Country:       _______________
  2648.  
  2649.       Telephone: __________________  Fax:__________________
  2650.  
  2651.       Compuserve: _________________
  2652.  
  2653.       IMPORTANT!! Please enter the Name that you wish to appear
  2654.       on your registration screen when running the program (14 to
  2655.       40 alphanumeric characters; see next page for full info):
  2656.       Registered Name:
  2657.       
  2658.       ______________________________________________________
  2659.  
  2660.       Disk Size for Update(s):  5.25" [ ]      3.25" [ ]
  2661.  
  2662.       If you have a copy of SLD, version number: ___________
  2663.  
  2664.       Please enclose $40 US or £25 Sterling (or equivalent)
  2665. HOW TO COMPLETE PROGRAM REGISTRATION:
  2666. ------------------------------------
  2667.  
  2668. To register you should send us the appropriate fee along with the
  2669. name that you will register this software under. This name must
  2670. consist of at least 14 alphamumeric characters. Valid characters
  2671. are capital 'A' to 'Z', lower case 'a' to 'z', number '0' to '9'
  2672. and figures &',/()-   (ampersand, apostrophe, comma, forward
  2673. slash, left bracket, right bracket and hyphen). Spaces are of
  2674. course permitted between words, but note that there must be at
  2675. least 11 non-space characters in the name. No other characters
  2676. are valid. Case sensitivity is not important. When we receive the
  2677. registration fee and name we will generate a registration number
  2678. encoded from the name, so it is important that you send us the
  2679. exact name you will use for registration. We will send you the
  2680. latest version of this software. You will also be entitled to
  2681. full support and discounts on our other programs. We will send
  2682. you the registration number and confirmation of the name. You
  2683. should then run SLD and go into the Setup Menu from the main
  2684. menu, then select "OTHER", followed by "REGISTER" from this menu.
  2685. From here enter the name and registration number.  When you have
  2686. entered them satisfactorily.  Press the F2 function key to to
  2687. complete registration. You will see a message telling you that
  2688. registration has been successful. If you see an error message
  2689. "invalid registration number" then check that you have entered
  2690. the name and number correctly. 
  2691.  
  2692. The registration number and name are stored in a text file called
  2693. 'REGISTER.SLD'. This file must be present in the directory from
  2694. which you run SLD otherwise the registration information will not
  2695. be picked up by the program. You can generate this file in more
  2696. than one directory. Keep your registration number and name safe
  2697. so that if you accidentally delete this file you can re-generate
  2698. it.
  2699.  
  2700. When you complete registration the delay on the message at the
  2701. start and end of the program will be removed. You will only see
  2702. the opening screen with your rgistered name on it and you may
  2703. press any key or click a mouse button to continue immediately.
  2704.  
  2705.  
  2706. RESTRICTIONS
  2707. ------------
  2708. Your registration entitles you to use this software on a single
  2709. computer and make a copy for backup purposes. If you intend to
  2710. use this software on more than one computer then you should
  2711. register each copy.
  2712.  
  2713. If you are reading this text at registration time then thankyou
  2714. for your support.
  2715. METHODS OF PAYMENT
  2716. ------------------
  2717. If you are a Compuserve  member you may pay via the Compuserve
  2718. shareware registration service, where the registration
  2719. identification number of SLD is 795. 
  2720. To use this service enter GO SWREG. When you register via
  2721. Compuserve the fee will be deducted from your account and we will
  2722. be notified of the registration. We will despatch an update disk
  2723. via airmail as soon as we receive notification from Compuserve.
  2724.  
  2725. You may also send the payment direct. Suggested methods of
  2726. payment for registrants outside the United Kingdom are as
  2727. follows:
  2728.  1)  An International Money Transfer 
  2729.  2)  An International Money Order.
  2730.  
  2731. It is best if the amount is made out in Pounds Sterling. The
  2732. amount should be 25 Pounds Sterling or $40 U.S., or the
  2733. equivalent, converted to Sterling at the exchange rate in force
  2734. at the time of registration, whichever favours you.
  2735.  
  2736. Registrants in the United Kingdom are advised to pay by cheque or
  2737. postal order.
  2738.  
  2739. If you follow the above advice you will avoid delays in
  2740. processing your registration. However other methods of payment
  2741. acceptable to United Kingdom banks will be accepted. Payment in
  2742. U.S. Dollars is fine, though the payment may be in any currency
  2743. acceptable to U.K. banks as the equivalent of $40 U.S. or £25
  2744. Sterling.
  2745.  
  2746. Your registration includes handling fees, but we reserve the
  2747. right to refuse registration if your method of payment is not
  2748. acceptable to U.K. banks, or it incurs unacceptably high bank
  2749. charges.
  2750.  
  2751. You are advised not to send cash.
  2752.  
  2753. WHERE YOUR MONEY GOES
  2754. ---------------------
  2755. This product is currently shareware. Your registration fee pays
  2756. for postage of the update disk to you, support of the program via
  2757. Compuserve, telephone, fax and surface mail. Your registration
  2758. fee also enables us to pay for new hardware and software
  2759. development tools, development of this and other programs,
  2760. uploads of updates onto Compuserve, postage of updates to
  2761. shareware libraries, administration, etc. etc. Your registration
  2762. will enable us to continue providing you with useful tools.
  2763. Please support shareware.
  2764.  
  2765.  
  2766.                   SOFTWARE FOR YOU!
  2767.                   =================
  2768.  
  2769. This software has been aimed at professional and amateur software
  2770. developers and dealers with experience ranging from novice to
  2771. advanced. We always welcome any comments regarding our software
  2772. so that we can write software that people want. The whole purpose
  2773. of this software is to make life easier for you!
  2774.  
  2775. Additionally we may be able to customise this product for your
  2776. individual requirements. Contact us today.
  2777.  
  2778. We are also working on other developement/database projects.
  2779. Details upon request!
  2780.  
  2781.