home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 420.lha / winformat_v1.0 / WINFORMAT.DOC < prev    next >
Encoding:
Text File  |  1990-10-02  |  4.4 KB  |  120 lines

  1.  
  2.  
  3.                                WINFORMAT
  4.                                 (V 1.0)
  5.  
  6.    Winformat is now in the public domain.  You may use any/all portions
  7.    of the code in any programs you develop or sell.  Winformat is NOT
  8.    shareware.  You may run Winformat as often as you like without
  9.    feeling guilty.
  10.  
  11.  
  12.  
  13.    What is Winformat?
  14.  
  15.       Winformat is a simple utility program that I use to develop
  16.       window TEXT layouts.  When designing a window, I frequently
  17.       have parts of the window where I want to display text literals
  18.       or constant values.  For example, for a window that shows a
  19.       persons name, I may want to show the last name and the first name.
  20.       So that the user can easily determine which field is what part
  21.       of the name, I label each field with a text literal.  In this
  22.       example it would be something like "Last Name" and "First Name".
  23.       So far, so good.  The problem is how to position the two literals
  24.       on the window.  How do I determine what the x and y coordinates
  25.       are going to be for the display?   The solution is Winformat!
  26.  
  27.       Using any text editor (ed, dme, ect.) create a text file that is
  28.       laid out exactly as you want your window to appear (24 lines max).
  29.       Put your literals on whatever line and column you want them to
  30.       appear on you window.  Save the text file as a simple ascii file.
  31.  
  32.       Now you can run Winformat.  Winformat will read your ascii file
  33.       and create a new file, suitable for #including in your C program.
  34.       It will create an Intuitext structure for each literal in the text
  35.       file.  To display all of the literals on you window you need
  36.       make one call to PrintItext as follows:
  37.          PrintIText (win->RPort, &IntuiTextList1, 0, 0);
  38.  
  39.  
  40.  
  41.    How do I use Winformat?
  42.  
  43.       Winformat is run from the Cli and takes up to 3 parameters.  If
  44.       you forget what each parameter is, just run Winformat with no
  45.       parameters and it will tell you what it wants!
  46.  
  47.          The first parameter is the name of the ascii text file that
  48.             winformat will read.  This paramenter is required.
  49.             ie: df0:documents/myfile.txt
  50.             winformat will attempt to read a file called "myfile.txt"
  51.             located on drive "df0:" in a directory called "documents".
  52.  
  53.          The second parameter is the name of the file that you want
  54.             created.  This paramenter is required.
  55.             ie: df0:development/mywindowtext.c
  56.             winformat will create a file called "mywindowtext.c" on
  57.             drive "df0:" in directory "development".
  58.             NOTE: WINFORAMT WILL OVERWRITE ANY PRE-EXISTING FILE BY
  59.                   THE NAME YOU SPECIFY, SO BE CAREFUL!
  60.  
  61.          The third parameter is the name of the font to use for
  62.             calculating the x and y coordinates.  This parameter is
  63.             NOT required.  It defaults to topaz8, which is the standard
  64.             startup font.
  65.             ie: topaz.9
  66.             Winformat version 1.0 only supports 2 fonts.
  67.             ie: topaz.8 and topaz.9  If anyone needs other fonts,
  68.             let me know and I can include them also.
  69.  
  70.  
  71.       An example of using winformat:
  72.          "winformat textfile.doc textfile.c topaz.8"
  73.  
  74.  
  75.  
  76.  
  77.    Helpful Hints:
  78.  
  79.       When creating the text file that winformat will read, use the same
  80.       type of sceen and font that your program will use.  This is so the
  81.       correct line spacing will occur.  If you create a text file using
  82.       topaz.8 in hi-rez mode (640 X 200) and then run winformat with a
  83.       font of topaz.9 but use the results in a screen of lo-rez (320 X 400)
  84.       you can expect bad results.
  85.  
  86.    Other Files:
  87.  
  88.       samplewin.c is the source for a sample window program that shows
  89.          how to use the code generated by winformat.  It was successfully
  90.          compiled using Lattice 5.04.
  91.  
  92.       samplewin is the executable for samplewin.c.  Run it from the
  93.          cli.
  94.  
  95.       textfile.doc is a sample text file I created with dme for use with
  96.         this program.
  97.  
  98.       textfile.c is the result of running winformat against textfile.doc
  99.          using topaz.8
  100.  
  101.       winformat.c is the source code to winformat.  It was successfully
  102.          compiled using Lattice 5.04.
  103.  
  104.       winformat is the executable for winforat.c.  Run it from the cli.
  105.  
  106.  
  107.  
  108.    Misc:
  109.  
  110.       direct your questions or comments to:
  111.  
  112.          PLINK: Big*Lar
  113.            CI$: 74565,633
  114.  
  115.  
  116.  
  117.                            -Larry-
  118.  
  119.  
  120.