Category : C Source Code
Archive   : TOOLS4C.ZIP
Filename : MG.TXT

 
Output of file : MG.TXT contained in archive : TOOLS4C.ZIP












TOOLS FOR C
Application Development Package
MENUGEN
Interactive Window and Menu Generator


Shareware Distribution Version 1.0






This version of TOOLS FOR C and it's associated manuals and
support files may be freely copied and distributed as long as
it is distributed in it's entirety and no fees other than
nominal handling fees are charged. The routines in this
library are NOT Public Domain. This is copyrighted material.
The intent behind distributing this version of TOOLS FOR C is
to allow you to use the package on a trial basis and determine
if it meets your needs. If you find yourself using this
package, you MUST register by sending $45.00 to the address
listed below. Upon receipt of your registration fee we will
send you an expanded manual, compiled libraries for all of the
memory models available with your compiler, and the complete
source code to the library. In NO EVENT may you use any of the
routines in TOOLS FOR C for commercial purposes until you
register your copy. We feel that you will find the value of
TOOLS FOR C far exceeds the registration fee and we at BP
SOFTWARE SOLUTIONS, INC. thank you in advance for your
support.





BP Software Solutions, Inc.
642 N. Commodore Drive
Plantation, Fl. 33325





Copyright (C) 1987
BP Software Solutions Inc.
All Rights Reserved









INTRODUCTION



MENUGEN is a program which, in concert with the TOOLS FOR C
function library, allows you to quickly and interactively design
pop-up windows and menus for your 'C' programs. Because it
generates 'C' code which you "#include" in the source code of
your program, implementing these windows and menus is a snap.
What you see on the screen is what you get when the file
that is produced by the generator is incorporated into your 'C'
code.

MENUGEN has the power you need to exercise full control over the
development of menus and windows for your programs. You can
control the size of the window, it's location, type of graphics
used for the window borders, attribute of the border and the
attribute of the area inside the window. There is no limit to
the number of menu selections allowed in a window. If you can
fit it into the window, it will work! You can put the menu
selections anywhere within a window you wish... e.g., single
columns, double columns, triple columns, etc., or even random
placements!

Included in the TOOLS FOR C Application Development Package is a
copy of MENUGEN.EXE, three object module libraries, and
necessary reference manuals in DOS text form. There is an
object module library for the small memory model of each
supported compiler (Lattice C (R) version 3.x, Microsoft C (R)
version 4.0, and Turbo C (R) version 1.0). These are all you
need to start building your Menus and Windows. As a matter of
fact, this was all that was used in producing the MENUGEN
program.

MENUGEN has two main sections. The first allows you to define
a window structure. If a window is all you need, then you
simply write the structure to an #include file and leave the
program. If you want to define a menu, then you must first
define a window for it. After it's window is defined, you enter
the other section of the program. This section allows you to
define the menu's cursor type, title, and the positions,
video attributes, and functions of each of the menu selections.
After you are satisfied with your menu you write it's
structures to an #include file, just as you would for a window.

We recommend that you work through the tutorial to get an
overview of MENUGEN'S capabilities.



TUTORIAL

Getting Started

First, load and run the program "MENUGEN.EXE". When you're
through reading the title page, press any key to continue.

The next screen you see will be mostly blank except for the
Help Lines (two lines on top of the screen) and the Cursor
Status (an area on the bottom of the screen). These can be
toggled on and off independently by pressing [F1] or [ALT-F1].
The [F1] key toggles the Help Lines, and [ALT-F1] toggles the
Cursor Status Area.


Cursor Movement

The cursor can be moved around the screen using the arrow keys,
HOME, END, PGUP and PGDN keys. As you move the cursor around
the screen notice that the cursor position is being displayed
near the lower left hand corner of the screen. The cursor
location is relative to 0,0 being the upper-left-corner of the
screen. The UP,LEFT,RIGHT and DOWN arrow keys will move the
cursor one character position. The HOME, PGUP, END and PGDN
keys will move the cursor to the corners of the screen.

Key Screen Location Col Row
======================================================
HOME Upper Left Corner of screen 0 0
PGUP Upper Right Corner of screen 79 0
END Lower Left Corner of screen 0 24
PGDN Lower Right Corner of screen 79 24


Set Anchor

The 'Anchor' represents one corner of your window. The SET
ANCHOR key, [F2], toggles the Anchor ON and OFF. When the Anchor
is toggled ON, the "Anchor Set" message is shown in the lower
left corner (assuming you haven't toggled the status area OFF
with [ALT-F1]).

To begin defining a window, move the cursor to an area on the
screen which will represent a corner of your window. Set the
Anchor (Press [F2]). Draw your box using the cursor movement
keys.


Swap Anchor

Press [F3] to "Swap Anchor". This function swaps the current
cursor position with the Anchor. The original Anchor position
becomes the new cursor position and the original cursor position
becomes the new Anchor position. This greatly adds to the
flexibility of the window definition.



Border Type

Press [F4]. A window will pop up in the middle of the screen.
By pressing the UP and DOWN arrow keys, you can scroll through
the selection of border types for the window. The border type
of your window will change as you move up and down the selection
list. (The border of the window which popped up in the middle
of your screen will change also). When you find a selection
you're happy with, press ESC. You'll be left with the selected
border type.


Border Attribute

Press [F5]. A menu will pop up with attribute options. The UP
and DOWN arrow keys will move you through the menu selections.
Press [RETURN] when the desired selection is high-lighted. An
alternate method of selecting an option is by pressing a number
(1-6) for the 6 predefined attributes or the letters 'U'or 'u'
for 'User Defined '(if the desired attribute isn't among the
selections).

Choose an attribute using selections 1-6. Notice that the
attribute of the border changes as the selection is made. Now
choose the "-USER DEFINED-" option. A window will open which
will prompt you for a 'Border Attribute'. Enter a number in
hexadecimal form and press [RETURN]. The window will be updated
with the new attribute and you'll be returned to the 'BORDER
ATTRIBUTE' menu. When you've completed your selection, pressing
ESC will exit this function.


Fill Attribute

Press [F6]. A menu will pop up with the Fill Attribute Options.
You can define the attribute of the inside area of your windows
(fill attribute). Selections are made in this menu the same way
they're mad in the 'Border Attribute Menu' above. You can
choose one of the selections offered, or enter the attribute via
the '-USER DEFINED-" option. Again, pressing ESC will exit this
function.


Write (Generate) the code.

You've just defined a window! Let's write the code to a file.
Press [F9]. A window will open prompting you for a header
file name. Enter the name of a file you wish to save this to.
(This must be a legal DOS file name format... no spaces allowed,
8 characters plus an optional 3 character extension separated by
a period). Let's call the file "TEST1.HDR". (Type TEST1.HDR
as the file name and press [RETURN]).

If the name you've entered as the file name already exists, a
window will pop up warning you of this. You're given the options
of either 'Replacing' the file, 'Browsing' the file, 'Appending'
to the file or aborting this function. For this example, choose
the "Replace" option to make sure we have a fresh file called
"TEST1.HDR".



You'll next be prompted for the name of the window. This is the
name which you'll use to identify this window in your code. It's
length should conform to the limits set by your compiler. Let's
call our window "testwndw". Enter "testwndw" (without the
quotes, of course) as the window name.

The Menu/Window Generator will create a file that can be
included in your 'C Code'. Its contents will resemble ...

/****** Include file for testwndw Window ******/
struct WNDW testwndw_structure =
{'º','Í','º','Í','É','»','È','¼',' ',0x7,0x7,5,4,72,
20,0,0,0,NULL,NULL,NULL};
WNDW *testwndw = &testwndw_structure;

This file when #include'd in your code can be used as
demonstrated in the following code fragment...

#include
#include "tools4c.h"
#include "test1.hdr"

main()
{
vid_type(); /* necessary call to determine */
/* type of video adaptor */
open_window(testwndw);
.
.
.
close_window(testwndw);
}


if preferred, the file can be physically included in your code...

#include
#include "tools4c.h"

/****** Include file for testwndw Window ******/
struct WNDW testwndw_structure =
{'º','Í','º','Í','É','»','È','¼',' ',0x7,0x7,5,4,72,
20,0,0,0,NULL,NULL,NULL};
WNDW *testwndw = &testwndw_structure;

main()
{
vid_type();
open_window(testwndw);
.
.
.
close_window(testwndw);
}



File Browse

'File Browse' allows you to view any text file. You can scroll
up and down through the file a line at a time or a page at a
time. It allows horizontal scrolling, (good if your text is
wider than 80 columns), and it allows you to jump to the
beginning or end of the file. You can safely use browse to view
your program code or any other text file without worrying about
altering the file.

Key Function
=================================================
UP Arrow Scroll UP one line
DOWN Arrow Scroll Down one line
RIGHT Arrow Scroll Right
LEFT Arrow Snap to beginning of the line
PGUP Scroll up one Screen
PGDN Scroll down one Screen
HOME Goto beginning of the file
END Goto end of the file
ESC EXIT


DOS Shell

Pressing the DOS shell key, [F10], loads and executes another
copy of COMMAND.COM above MENUGEN. Type "exit" at the DOS
prompt to return to MENUGEN. DOS must be able to find a copy of
COMMAND.COM in the path defined by the environment variable
"COMSPEC".


Define Menu

Pressing [F7] drops you into the menu definition subsection of
the program. Before beginning to define a menu, you should
define the menu's window completely. Window size and position
are the only changes you can make to the window after entering
the menu subsection.

When you press [F7], you will notice the cursor now moves inside
the window. Use the cursor, Home, End, PgUp, and PgDn keys to
move to the starting position of the first menu selection.
Pressing [F7] again begins the selection definition process.

From here on, the best way to learn the power of MENUGEN is to
experiment. The help lines on the top of the screen will direct
you through the each phase of the process. Pop-up windows and
sub-menus allow you to define the menu's video attributes, title,
screen position, window size, and each selection's screen
position, video attributes, function calls, etc.

Once your menu is defined, pressing [F9] allows you to write the
structure code for the menu to an #include file, just as you did
for a window.




Conclusion

This tutorial is not a complete reference manual for MENUGEN, but
is instead intended only to get you started. Most of MENUGEN's
features are obvious from the help line's prompts. With a
little experimentation, you will be efficiently defining windows
and menus in no time at all. A complete reference manual on
MENUGEN, an expanded Reference and User Manual for the TOOLS FOR
C Library, the complete source code to the library and compiled
libraries for all of the memory models for your compiler is
included in the package sent to you when you register your copy
of TOOLS FOR C. Use the form below to register your copy today.



THE TURBO LIBRARY
USER REGISTRATION FORM

============================================================

Please list this form to your printer and use it to register
your copy. Send the completed form and a check for $45.00 to:

BP Software Solutions, Inc.
642 N. Commodore Drive
Plantation, Fl. 33325

Florida residents please be sure to include the 5% FL. state
sales tax ($2.25).

------------------------------------------------------------

Name ______________________________________________________

Company ___________________________________________________

Address ___________________________________________________

City _________________________ State _______ Zip __________


Compiler_______________________________ Version __________


Comments: _________________________________________________

___________________________________________________________

___________________________________________________________

___________________________________________________________




  3 Responses to “Category : C Source Code
Archive   : TOOLS4C.ZIP
Filename : MG.TXT

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/