Contents of the PULLDOWN.DOC file
by Bill Bane
Rt 1 Box 214
Sumner, TX 75486
tel 214-785-5767 work: 214-784-1424
Files in this archive:
PULLDOWN.PAS : Source code for the pulldown menu unit.
PULLDOWN.TPU : The compiled unit.
XPULLDW .PAS : A simple demonstration program using a
pulldown menu system.
PULLDOWN.DOC : THIS FILE.
The pulldown menu implemented here is much simpler than the one used in
PULLDOWN.MS (in the Editor Toolbox), and much easier to tailor to your
particular application. To us it, you simply define, in order, a series of
typed constant strings: The first one will become the top bar menu; the
subsequent lines will each become a sub-menu.
Menu items are delimited within each string by the '|' character.
The procedure is invoked with the following parameters:
var txt1 : anystr;
subdefault : integer;
subchoice : integer
where txt1 is the typed constant representing the top bar menu, default
is the starting position on the bar menu, subdefault is the starting position
in the submenu under default. Vars choice and subchoice return the top menu
choice, and sub-menu choice, respectively. The last choice made from a
sub-menu becomes the default subchoice when it is next called.
The menu starts as a bar menu: pressing enter or DOWNKEY will activate the
appropriate pulldown menu; once activated, moving left or right will activate
adjacent pulldown menus. Pressing ESC will deactivate the pulldown menus; if
they are already deactivated, pressing ESC will return a 0 in choice.
Instead of moving left or right (or up or down) the initial letter of the
desired choice may be pressed. If pulldown is activated, it will work within
the current submenu. In order for this to work properly, choices within a
submenu should begin with different letters ( or else the FIRST matching
letter will be selected).
PULLDOWN.PAS contains some windowing routines that can be built upon to
make a complete windowing system like Turbo Prolog's. For now, though, they
are in a skeletal state, but servicable for menus and the like.