home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.wwiv.com
/
ftp.wwiv.com.zip
/
ftp.wwiv.com
/
pub
/
MISC
/
PBAPI10.ZIP
/
APIDOCS.ZIP
/
MENU.DOC
< prev
next >
Wrap
Text File
|
1998-02-21
|
5KB
|
106 lines
Author....... : Gary Price
Copyrighted by: Freejack's Software 1997-98
MENU API for TriBBS v10.x/11.x written in PowerBasic v3.5
---------------------------------------------------------------------------
NOTE:
In order to save on documentation, I have supplied a Demo for the Menu API
Unit called "DEMOMENU.BAS". This should give a good example of how to build
your own menus and use these sub's below.
To calculate a color number for the Attr, select a color from 1 to 15, then
mulptiply x 16. If you want to do forground, then add the number of color to
the sum of the multiplied answer like so: 1 x 16 = 16 for Blue Background,
add 15 for a total of 31 to give you Blue background with White forground.
---------------------------------------------------------------------------
The MENU unit is supplied as an effort to help programmers design better
looking GUI's and Better control for their Main Program Design. The MENU
unit is declared in PBAPI10.INC as follows:
SUB HorizontalMenu(Choices() AS STRING, _
BarSave AS STRING, _
HiLight AS INTEGER, _
Mouse AS INTEGER, _
HPointer AS INTEGER, _
HotKey AS INTEGER, _
BarAttr AS INTEGER, _
HiAttr AS INTEGER, _
MenuRow AS INTEGER, _
Gap AS INTEGER, _
Marker AS INTEGER)
SUB VerticalMenu(Choices() AS STRING, _
Infoline() AS STRING, _
Rtrn AS STRING, _
BarSave AS STRING, _
Mouse AS INTEGER, _
HotKey AS INTEGER, _
HelpTextColor AS INTEGER, _
HelpAttr AS INTEGER, _
HiAttr AS INTEGER, _
MenuRow AS INTEGER, _
Marker AS INTEGER, _
HPointer AS INTEGER, _
Attr AS INTEGER, _
Shadow AS INTEGER, _
Border AS INTEGER)
SUB MGInset(TRow AS INTEGER, _
LCol AS INTEGER, _
BRow AS INTEGER, _
RCol AS INTEGER, _
Attr AS INTEGER)
---------------------------------------------------------------------------
SUB HorizontalMenu(Choices() AS STRING, _
BarSave AS STRING, _
HiLight AS INTEGER, _
Mouse AS INTEGER, _
HPointer AS INTEGER, _
HotKey AS INTEGER, _
BarAttr AS INTEGER, _
HiAttr AS INTEGER, _
MenuRow AS INTEGER, _
Gap AS INTEGER, _
Marker AS INTEGER)
This sub will allow you to create and control menu control item across the
top portion of your Menu. Please see the DemoMenu.bas to see how to setup.
---------------------------------------------------------------------------
SUB VerticalMenu(Choices() AS STRING, _
Infoline() AS STRING, _
Rtrn AS STRING, _
BarSave AS STRING, _
Mouse AS INTEGER, _
HotKey AS INTEGER, _
HelpTextColor AS INTEGER, _
HelpAttr AS INTEGER, _
HiAttr AS INTEGER, _
MenuRow AS INTEGER, _
Marker AS INTEGER, _
HPointer AS INTEGER, _
Attr AS INTEGER, _
Shadow AS INTEGER, _
Border AS INTEGER)
This will allow Vertical Menu controls pop down windows from the Horizontal
Menu after a selection is made. Depending on the tag such as "@" sign, the
Vertical Menu will search a select case statement base on your selection,
then perform any Sub, or Gosub routines that you define. Pleae view the
DemoMenu.bas for a better understanding of this setup.
---------------------------------------------------------------------------
SUB MGInset(TRow AS INTEGER, _
LCol AS INTEGER, _
BRow AS INTEGER, _
RCol AS INTEGER, _
Attr AS INTEGER)
This sub will create a background screen for your Menu allow you to pass a
color Attribute to the sub for background and foreground colors that will
give a inset windowed effect.