Dec 232017
 
Bar menus for Searchlight BBS in Turbo Pascal.
File SLMENU.ZIP from The Programmer’s Corner in
Category Pascal Source Code
Bar menus for Searchlight BBS in Turbo Pascal.
File Name File Size Zip Size Zip Type
SLMENU.DOC 3234 1236 deflated
SLMENU5.TPU 16832 5647 deflated
SLMENU6.TPU 16800 5656 deflated

Download File SLMENU.ZIP Here

Contents of the SLMENU.DOC file


SLMenu.TPU v1.0 by David Sward


This unit (SLMENU5.TPU for TP5.5 & SLMENU6.TPU for TP6.0) is designed to let
the programmer worry about the program itself, not the interface so much. This
unit lets the programmer specify the commands to use and the unit will show
either a lightbar or the single word according to the procedure called. It
even supports Help which is temporarily added to the command list for internal
usage (therefore, DO NOT define a Help command if you are going to use the
single-word menu). The menu displayed are very close to what Searchlight
uses, but I decided on the changes, not that I couldn't make them identical.


Usage:

uses SLMenu5;
(* I use Turbo Pascal 5.5, hate the 6.0 IDE *)

var m:tMenu;
(* Define a menu *)
k:char;
(* Define the character for the result of the menu *)

begin
uses_Color := TRUE;
(* Either TRUE or FALSE (since it's a boolean), there is no monochrome mode *)

help_Default := TRUE;
(* Either TRUE or FALSE (ditto), this will determine if the help lines are *)
(* shown, just like Searchlight in both Color(Mono) and None modes... *)

clearMenu(m);
(* Clear the memory used by the menu to remove all trash *)

addCommand(m,'List','List available subboards');
(* Add the List command with it's help line to the menu *)
(* Note: The commands can only be up to 10 characters long and the help *)
(* lines only 25 characters *)

addCommand(m,'Goodbye','Logoff the BBS');
(* Add the Goodbye command with it's help line to the menu *)

setMenu(m,'Bit Stream BBS','Main Menu: ','L',3,TRUE);
(* Set the title, prompt, default command, color of the prompt and the help *)
(* setting of the menu. The Title and prompt can only be 25 characters, the *)
(* default command is actually the key used to select the command, the color *)
(* is the color the prompt will be displayed with, and the help setting is *)
(* whether or not help will be available for the menu.. If not, then the *)
(* [?=Help] prompt won't even be shown with menuBar, and none of the help *)
(* lines will be shown... But the Help command will still be available in *)
(* menuWord... The title is used for Help when using menuWord, and prompt is *)
(* what is displayed on the line but before the actual commands *)

sortMenu(m);
(* Make sure all the commands are in order by select key *)

k := menuBar(m);
(* Run the lightbar menu procedure and put the select key of the command in *)
(* k... *)

k := menuWord(m);
(* Run the single-word menu and put the result into k *)

killCommand(m,'Goodbye');
(* Remove the Goodbye command from the menu.. *)

end.

This demo should actually run ... Enjoy

David Sward


 December 23, 2017  Add comments

Leave a Reply