home *** CD-ROM | disk | FTP | other *** search
-
-
- WINFORMAT
- (V 1.0)
-
- Winformat is now in the public domain. You may use any/all portions
- of the code in any programs you develop or sell. Winformat is NOT
- shareware. You may run Winformat as often as you like without
- feeling guilty.
-
-
-
- What is Winformat?
-
- Winformat is a simple utility program that I use to develop
- window TEXT layouts. When designing a window, I frequently
- have parts of the window where I want to display text literals
- or constant values. For example, for a window that shows a
- persons name, I may want to show the last name and the first name.
- So that the user can easily determine which field is what part
- of the name, I label each field with a text literal. In this
- example it would be something like "Last Name" and "First Name".
- So far, so good. The problem is how to position the two literals
- on the window. How do I determine what the x and y coordinates
- are going to be for the display? The solution is Winformat!
-
- Using any text editor (ed, dme, ect.) create a text file that is
- laid out exactly as you want your window to appear (24 lines max).
- Put your literals on whatever line and column you want them to
- appear on you window. Save the text file as a simple ascii file.
-
- Now you can run Winformat. Winformat will read your ascii file
- and create a new file, suitable for #including in your C program.
- It will create an Intuitext structure for each literal in the text
- file. To display all of the literals on you window you need
- make one call to PrintItext as follows:
- PrintIText (win->RPort, &IntuiTextList1, 0, 0);
-
-
-
- How do I use Winformat?
-
- Winformat is run from the Cli and takes up to 3 parameters. If
- you forget what each parameter is, just run Winformat with no
- parameters and it will tell you what it wants!
-
- The first parameter is the name of the ascii text file that
- winformat will read. This paramenter is required.
- ie: df0:documents/myfile.txt
- winformat will attempt to read a file called "myfile.txt"
- located on drive "df0:" in a directory called "documents".
-
- The second parameter is the name of the file that you want
- created. This paramenter is required.
- ie: df0:development/mywindowtext.c
- winformat will create a file called "mywindowtext.c" on
- drive "df0:" in directory "development".
- NOTE: WINFORAMT WILL OVERWRITE ANY PRE-EXISTING FILE BY
- THE NAME YOU SPECIFY, SO BE CAREFUL!
-
- The third parameter is the name of the font to use for
- calculating the x and y coordinates. This parameter is
- NOT required. It defaults to topaz8, which is the standard
- startup font.
- ie: topaz.9
- Winformat version 1.0 only supports 2 fonts.
- ie: topaz.8 and topaz.9 If anyone needs other fonts,
- let me know and I can include them also.
-
-
- An example of using winformat:
- "winformat textfile.doc textfile.c topaz.8"
-
-
-
-
- Helpful Hints:
-
- When creating the text file that winformat will read, use the same
- type of sceen and font that your program will use. This is so the
- correct line spacing will occur. If you create a text file using
- topaz.8 in hi-rez mode (640 X 200) and then run winformat with a
- font of topaz.9 but use the results in a screen of lo-rez (320 X 400)
- you can expect bad results.
-
- Other Files:
-
- samplewin.c is the source for a sample window program that shows
- how to use the code generated by winformat. It was successfully
- compiled using Lattice 5.04.
-
- samplewin is the executable for samplewin.c. Run it from the
- cli.
-
- textfile.doc is a sample text file I created with dme for use with
- this program.
-
- textfile.c is the result of running winformat against textfile.doc
- using topaz.8
-
- winformat.c is the source code to winformat. It was successfully
- compiled using Lattice 5.04.
-
- winformat is the executable for winforat.c. Run it from the cli.
-
-
-
- Misc:
-
- direct your questions or comments to:
-
- PLINK: Big*Lar
- CI$: 74565,633
-
-
-
- -Larry-
-
-
-