Dec 172017
 
PBTools Lite 1.1 - Outstanding library for PowerBASIC users. Includes screen I/O, keyboard I/O, windowing, and string handling. Shareware.
File PBTLTE11.ZIP from The Programmer’s Corner in
Category BASIC Language
PBTools Lite 1.1 – Outstanding library for PowerBASIC users. Includes screen I/O, keyboard I/O, windowing, and string handling. Shareware.
File Name File Size Zip Size Zip Type
CONSTANT.INC 1407 410 deflated
DEMO.BAS 12630 3518 deflated
DEMO.EXE 84278 33667 deflated
ORDER.FRM 9023 3221 deflated
PBTLITE.CMD 6014 1699 deflated
PBTLITE.DEC 268 181 deflated
PBTLITE.DES 285 190 deflated
PBTLITE.DOC 82161 11664 deflated
PBTLITE.HIS 767 429 deflated
PBTLITE.PBU 61856 18181 deflated
TPCREAD.ME 199 165 deflated

Download File PBTLTE11.ZIP Here

Contents of the PBTLITE.DOC file


















PBTools:Lite 1.1

Programmer's Toolkit for PowerBASIC 2.1x

Copyright (c) 1990,1991 by Dave Navarro, Jr., All Rights Reserved

Shareware Release Documentation




About PBT:Lite

PBTools:Lite is a library of PowerBASIC routines to help
programmers create professional looking programs without having
to spend the time to develop such routines on their own.
The shareware version contains the full documentation and is
fully functional. However, the source code is supplied only
to registered owners of PBTools:Lite.

PBTools:Lite contains the windowing and screen I/O functions
from PBTools for those people who don't need the whole package.
Many routines have been revised to fix bugs, enhance their
usefulness, or "streamline" them for minimum size.

Support:

Support for PBT:Lite is provided by Dave Navarro, Jr. who
may be contacted at 64-38 Admiral Ave, Middle Village, NY
11379 or through The Bard's Lair BBS at 718-381-3651 with your
1200, 2400, 9600, V32, V42bis, HST modem at 8 bits, No parity,
1 stop bit. Registered users will also have access to a
technical support voice number.

Warranty:

PBT:Lite is supplied "AS IS", and there is no warranty of any
type expressed or implied, including, without limitation, the
warranties of merchantability and of the fitness for any
purpose. The author assumes no liability for damages, direct
or consequential, which may result from the use of PBT:Lite.

Author's Note:

These routines were fully tested on several 80286 and 80386
clone systems with monochrome, EGA, and VGA setups, and
operated without any problems. I have left out error handling
routines in most of the library functions and subs to make the
routines run as fast as possible.

I have included the source code to the demo supplied with
PBT:Lite. I have done my best to add comments to help with
the usage for all commands. If you are still having trouble,
please feel free to contact me, either through US Mail, or
The Bard's Lair BBS. For more information please contact me.










Page i




Acknowledgments:

I would like to thank Richard D. Fothergill and Barry Erick
for their wonderful routines that served as the inspiration
for PBT:Lite. Many of the routines found in PBT:Lite are
based on their demo programs and the syntax of the commands
were derived from their documentation.

I would also like to thank Bob Zale for what I feel is the
best BASIC compiler available, and in many cases the best
compiler overall for any language.

The PBTools libraries have been tested by the following
people:

James Davis James Jarvis
Ronnie Pierce Dave Navarro

Documentation was re-written and formatted by James Davis.

Source code was reformatted by James Davis.










































Page ii

----------------------------------------------------------------
T A B L E O F C O N T E N T S
----------------------------------------------------------------
About PBT:Lite .............................................. i
Support ..................................................... i
Warranty .................................................... i
Author's Note ............................................... i
Acknowledgements ............................................ ii
Command Summary ............................................. v
AddShadow() ........................................... 1
Attr% ................................................. 2
Back%() ............................................... 3
Box() ................................................. 4
CapsOff ............................................... 5
CapsOn ................................................ 6
CapStat% .............................................. 7
ChangeWin() ........................................... 8
CheckKey% ............................................. 9
ClearWin .............................................. 11
CloseWin .............................................. 12
ClrKbd ................................................ 13
CurBot% ............................................... 14
CurDisplay% ........................................... 15
CurTop% ............................................... 16
DelChar$() ............................................ 17
Fill() ................................................ 18
Fore%() ............................................... 19
GetFrst$() ............................................ 20
GetKey$ ............................................... 21
GetScrn$() ............................................ 22
InitPBScreen .......................................... 23
InsChar$() ............................................ 24
InsertOff ............................................. 25
InsertOn .............................................. 26
InsStat% .............................................. 27
IsAlpha%() ............................................ 28
IsAlphaNum%() ......................................... 29
IsAlt% ................................................ 30
IsASCII%() ............................................ 31
IsCaps% ............................................... 32
IsCtrl% ............................................... 33
IsInsert% ............................................. 34
IsLShift% ............................................. 35
IsMouse% .............................................. 36
IsNum%() .............................................. 37
IsNumLock% ............................................ 38
IsPunct%() ............................................ 39
IsRShift% ............................................. 40
IsScroll% ............................................. 41
LPad$() ............................................... 42
LScroll() ............................................. 43
MLocate() ............................................. 44
MaskIn() .............................................. 45
Menu%() ............................................... 46
MouseKey$ ............................................. 47
MouseOff .............................................. 48
MouseOn ............................................... 49
MouseStat() ........................................... 50
MouseWin() ............................................ 51
MoveWin() ............................................. 52
NoShadow .............................................. 53

Page iii





NumIn() ............................................... 54
NumOff ................................................ 55
NumOn ................................................. 56
NumStat% .............................................. 57
OpenWin() ............................................. 58
PFirst() .............................................. 59
PutScrn() ............................................. 60
RPad$() ............................................... 61
RScroll() ............................................. 62
ReAttr() .............................................. 63
Recolor() ............................................. 64
ScrollDn() ............................................ 65
ScrollOff ............................................. 66
ScrollOn .............................................. 67
ScrollPrint() ......................................... 68
ScrollStat% ........................................... 69
ScrollUp() ............................................ 70
ScrollWin ............................................. 71
SetText() ............................................. 72
StuffKey() ............................................ 73
TextEd() .............................................. 74
TextIn() .............................................. 75
Title() ............................................... 76
Trim$() ............................................... 77
VidMode% .............................................. 78
VidSeg% ............................................... 79
WPrint() .............................................. 80
WPrintC() ............................................. 81
WPrintCF() ............................................ 82
WinColor() ............................................ 83
ZoomBox() ............................................. 84
Appendix ...................................................... 85





























Page iv




PBTools:Lite Documentation

AddShadow() - Adds a shadow to current window.
Attr% - Calculates a single integer from foreground and
background.
Back%() - Calculates background color from a single integer.
Box() - Draws a box on the screen.
CapsOff - Toggles Caps Lock key off.
CapsOn - Toggles Caps Lock key on.
CapStat% - Returns status of Caps Lock key.
Center$() - Pad a string to the left and right with spaces.
ChangeWin() - Changes the size of the current window.
CheckKey% - True if key in keyboard buffer.
ClearWin - Clears the contents of the current window.
CloseWin - Closes a previously opened window.
ClrKbd - Clears keyboard buffer without removing keys.
CurBot% - Bottom scanline of cursor.
CurDisplay% - Returns active display adaptor.
CurTop% - Top scanline of cursor.
DelChar$() - Deletes one character from a specified string.
Fill() - Fills a box on the screen with a character.
Fore%() - Calculates foreground color from an integer.
GetFrst$() - Returns the first uppercase or number character of a
string.
GetKey$ - Get a single key from keyboard buffer, wait if no key
is present.
GetScrn$() - Places any portion of the screen into a string.
InitPBScreen - Initialize all variables for window routines.
InsChar$() - Inserts a character into a specified string.
InsertOff - Toggles insert status off.
InsertOn - Toggles insert status on.
InsStat% - Returns status of INS key.
IsAlpha%() - Returns true if character is alpha (A-Z or a-z).
IsAlphaNum%() - Returns true if character is alphanumeric.
IsAlt% - True if ALT key is depressed.
IsASCII%() - Returns true if character is a printable ASCII
character.
IsCaps% - True if Caps Lock key is depressed.
IsCtrl% - True if Ctrl key is depressed.
IsInsert% - True if INS key is depressed.
IsLShift% - True if Left Shift key is depressed.
IsMouse% - Returns number of buttons on mouse if installed.
IsNum%() - Returns true if character is numeric.
IsNumLock% - True if Num Lock key is depressed.
IsPunct%() - Returns true if character is punctuation.
IsRShift% - True if Right Shift key is depressed.
IsScroll% - True is Scroll Lock key is depressed.
LPad$() - Pads the left side of a string with a character.
LScroll() - Scrolls any portion of the screen to the left.
MLocate() - Locate the mouse cursor at any place on screen.
MaskIn() - Get masked input from user.
Menu%() - Displays a menu and returns choice from user.
MouseKey$ - Gets a key from keyboard, mouse movement detected.
MouseOff - Turns mouse cursor off.
MouseOn - Turns mouse cursor on.
MouseStat() - Returns mouse position, and button pressed.
MouseWin() - Define the window for mouse cursor.
MoveWin() - Moves the current window in any one of 4 directions.
NoShadow - Removes the shadow form the current window.

Page v




PBTools:Lite Documentation

NumIn() - Get numeric input from user.
NumOff - Toggles Num Lock key off.
NumOn - Toggles Num Lock Key on.
NumStat% - Returns status of Num Lock Key.
OpenWin() - Pops a window on the screen saving whatever is
underneath.
PFirst() - Print the first uppercase character of a string
highlighted.
PutScrn() - Puts a string created with GetScrn$() back onto the
screen.
RPad$() - Pads the right side of a string with a character.
RScroll() - Scrolls any portion of the screen to the right.
ReAttr() - Changes the color of any position on the screen.
Recolor() - Changes color attribute of all positions on screen.
ScrollDn() - Scrolls any part of the screen down.
ScrollOff - Toggles Scroll Lock key off.
ScrollOn - Toggles Scroll Lock key on.
ScrollPrint() - Scroll window up and print text on the bottom of the
window.
ScrollStat% - Returns the status of the scroll-lock key.
ScrollUp() - Scrolls any part of the screen up.
ScrollWin - Scrolls the text within the current window in one of
4 directions.
SetText() - Sets cursor color from single integer.
StuffKey() - Stuff the keyboard buffer with up to 16 characters.
TextEd() - Lets user edit the characters within a line.
TextIn() - Gets ASCII input from user with editing options.
Title() - Displays a title in one of 6 positions.
Trim$() - Removes spaces from the beginning and end of a
string.
VidMode% - Returns current video mode.
VidSeg% - Returns the segment of the video address.
WPrint() - Displays a string within the current window.
WPrintC() - Centers a text string horizontally within the current
window.
WPrintCF() - Print string centered in window with first
character highlighted.
WinColor() - Changes the text color of the current window.
ZoomBox() - Explodes a box on the screen with noise option.

Page vi


PBTools:Lite Documentation

--------------------------------------------------------------------
AddShadow() SUB Adds a shadow to current window.
---------------------------------------------------------------------
By using this sub-routine you can put a shadow in any of 2 predefined
positions under the current active window using either blank spaces
or by changing the attributes of the characters beneath the window.

Usage:
CALL AddShadow(Dir%)

Where Dir% = 1 for Drop Left shadow using black spaces
= 2 for Drop Right using black spaces
= 3 for Drop Left changing background attributes
= 4 for Drop Right changing background
attributes
See Also: NoShadow










































Page 1




PBTools:Lite Documentation

---------------------------------------------------------------------
Attr% FUNCTION Single integer of fore/background.
---------------------------------------------------------------------
Calculates a single integer from foreground and background values
that you specify. Use this function to change colors in any sub-
routine or function in PBTools:Lite that requires a single integer
color variable.

Usage:
Color% = Attr%(foreground%,background%)
Where Foreground% = Any color of the color table below.
Background% = Any color from 0 to 7 of color table.

Color Table:

0 - Black 8 - Grey
1 - Blue 9 - Light Blue
2 - Green 10 - Light Green
3 - Cyan 11 - Light Cyan
4 - Red 12 - Light Red
5 - Magenta 13 - Light Magenta
6 - Brown 14 - Yellow
7 - White 15 - Bright White

See Also: Back%(), Fore%(), ReAttr(), WinColor()

































Page 2




PBTools:Lite Documentation

---------------------------------------------------------------------
Back%() FUNCTION Calculates background from integer.
---------------------------------------------------------------------
Calculates the background attribute from a single foreground/
background integer byte.

Usage:
Background% = Back%(ColorByte%)

See Also: Attr%, Fore%(), ReAttr(), WinColor()
















































Page 3




PBTools:Lite Documentation

---------------------------------------------------------------------
Box() SUB Draws a box on the screen.
---------------------------------------------------------------------
Draws a box on the screen with one of 14 borders types.

Usage:
CALL Box(Ypos%, Xpos%, Ylen%, Xlen%, Bor%, Shad%, BorC%, TextC%)

Where Ypos% = Top most row of the box
Xpos% = Left most column of the box
Ylen% = Total number of rows to draw the box in, not
including the shadow
Xlen% = Total number of columns to draw the box, not
including the shadow
Bor% = The selected border outline is one of the
following:
0 - No shadow
1 - Single line box
2 - Double line box
3 - Single sides/double top & bottom
4 - Double sides/single top & bottom
5 - Pulldown single box
6 - Pulldown double box
7 - Pulldown single top/double sides &
bottom
8 - Pulldown double top/single sides &
bottom
9 - Single top & bottom/no sides
10 - Double top & bottom/no sides
11 - Solid style 1
12 - Medium hatch
13 - Solid style 2
Shad% = Placement of shadow is one of the following:
1 - Drop Left shadow using black spaces
2 - Drop Right using black spaces
3 - Drop Left changing background
attributes
4 - Drop Right changing background
attributes
BorC% = Single integer for border color (see Attr%)
TextC% = Single integer for text color (see Attr%)

See Also: Attr%















Page 4




PBTools:Lite Documentation

---------------------------------------------------------------------
CapsOff SUB Toggles Caps Lock key off.
---------------------------------------------------------------------
Toggles the Caps Lock key to its OFF state.

Usage:
CALL CapsOff

See Also: CapsOn, CapStat%

















































Page 5




PBTools:Lite Documentation

---------------------------------------------------------------------
CapsOn SUB Toggles Caps Lock key on.
---------------------------------------------------------------------
Toggles the Caps Lock key to its ON state.

Usage:
CALL CapsOn

See Also: CapsOff, CapStat%

















































Page 6




PBTools:Lite Documentation

---------------------------------------------------------------------
CapStat% FUNCTION Status of Caps Lock key.
---------------------------------------------------------------------
Returns a non-zero number if Caps Lock is on.

Usage:
IF CapStat% THEN CALL CapsOff

See Also: CapsOff, CapsOn

















































Page 7




PBTools:Lite Documentation

---------------------------------------------------------------------
ChangeWin() SUB Changes the size of the current window.
---------------------------------------------------------------------
Changes the size of the current window. There can be NO shadow on
the window when you resize it.

Usage:
CALL ChangeWin(Dir%)

Where Dir% = the direction that you want to resize.
If Dir% = 1 then adds to the right one position.
= 2 then removes from the right one position.
= 3 then adds to the bottom one row.
= 4 then removes from the bottom one row.

See Also: MoveWin()










































Page 8




PBTools:Lite Documentation

---------------------------------------------------------------------
CheckKey% FUNCTION True if key is in keyboard buffer.
---------------------------------------------------------------------
Checks the keyboard buffer to see if a key is present without
removing it.

Usage:
IF CheckKey% THEN GOSUB GetAllKeys

See Also: ClrKbd, GetKey$, IsAlt%, IsCaps%, IsCtrl%, IsInsert%,
IsLShift%, IsNum%, IsRShift%, IsScroll%, StuffKey()















































Page 9




PBTools:Lite Documentation

---------------------------------------------------------------------
ClearWin SUB Clears contents of the current window.
---------------------------------------------------------------------
Clears the contents of the current window.

Usage:
CALL ClearWin

See Also: OpenWin(), WinColor(), WPrint(), WPrintC(), WPrintCF()

















































Page 10




PBTools:Lite Documentation

---------------------------------------------------------------------
CloseWin SUB Closes the current active window.
---------------------------------------------------------------------
Closes the current active window. DO NOT close a window unless it is
the last window you popped onto the screen, otherwise you lose
access to all windows following it.

Usage:
CALL CloseWin

See Also: OpenWin()















































Page 11




PBTools:Lite Documentation

---------------------------------------------------------------------
ClrKbd SUB Clear all keys from keyboard buffer.
---------------------------------------------------------------------
Clears all keys from the keyboard buffer.

Usage:
CALL ClrKbd

See Also: CheckKey%, GetKey$, StuffKey()

















































Page 12




PBTools:Lite Documentation

---------------------------------------------------------------------
CurBot% FUNCTION Scanline for bottom of cursor.
---------------------------------------------------------------------
Returns a numeric value of the scanline for the bottom of the cursor.
The cursor need not be displayed when routine is called.

Usage:
CursorBottom% = CurBot%

See Also: CurTop%
















































Page 13




PBTools:Lite Documentation

---------------------------------------------------------------------
CurDisplay% FUNCTION Returns the active video display.
---------------------------------------------------------------------
This function returns a numerical value of the type of active video
display found in the BIOS ROM.

Usage:
VidType% = CurDisplay%

Where 0 is returned when the display is Monochrome
1 is returned when the display is CGA
2 is returned when the display is EGA
3 is returned when the display is MCGA
4 is returned when the display is VGA

See Also: VidSeg%, VidMode%










































Page 14




PBTools:Lite Documentation

---------------------------------------------------------------------
CurTop% FUNCTION Scanline for the top of cursor.
---------------------------------------------------------------------
Returns a numeric value of the scanline for the top of the cursor.

Usage:
CursorTop% = CurTop%

See Also: CurBot%

















































Page 15




PBTools:Lite Documentation

---------------------------------------------------------------------
DelChar$() FUNCTION Deletes one character from a string.
---------------------------------------------------------------------
Deletes one character from the user specified string.

Usage:
A$ = DelChar$(Tmp$, Xpos%)

Where Xpos% = The position of the character you wish to
delete.

See Also: InsChar$()














































Page 16




PBTools:Lite Documentation

---------------------------------------------------------------------
Fill() SUB Fills box with given character.
---------------------------------------------------------------------
Fills a box on the screen with a given character and background
attribute.

Usage:
CALL Fill(Ypos%, Xpos%, Ylen%, Xlen%, Char%, Atr%)

Where Char% = Characters to fill box with
Atr% = Attribute to display character in

See Also: Attr%, Box(), ReAttr(), Recolor













































Page 17




PBTools:Lite Documentation

---------------------------------------------------------------------
Fore%() FUNCTION Calculates foreground from integer.
---------------------------------------------------------------------
Calculates foreground from a single color attribute integer.

Usage:
ForeGround% = Fore(Atr%)

See Also: Attr%, Back%()

















































Page 18




PBTools:Lite Documentation

---------------------------------------------------------------------
GetFrst$() FUNCTION Gets the first character from string.
---------------------------------------------------------------------
Returns the first valid alphanumeric character of a string.

Usage:
A$ = GetFrst$(Temp$)

See Also: PFirst(), WPrintCF()

















































Page 19




PBTools:Lite Documentation

---------------------------------------------------------------------
GetKey$ FUNCTION Gets single key from keyboard buffer.
---------------------------------------------------------------------
Gets a single key from the keyboard buffer, waits if no key
is pressed. Does not check the status of the shift keys.

Usage:
I$ = GetKey$

See Also: CheckKey%, ClrKbd, MaskIn(), MouseKey$, NumIn(), TextEd(),
TextIn()















































Page 20




PBTools:Lite Documentation

---------------------------------------------------------------------
GetScrn$() FUNCTION Puts portion of screen into a string.
---------------------------------------------------------------------
Places any portion of the screen and it's color attributes in
a string.

Usage:
Top$ = GetScrn$(Ypos%, Xpos%, Xlen%)

See Also: PutScrn()
















































Page 21




PBTools:Lite Documentation

---------------------------------------------------------------------
InitPBScreen SUB Initializes all variables for windows.
---------------------------------------------------------------------
This command should be called upon before using any of the windowing
subroutines or functions. It initializes all variables necessary for
proper windowing to occur.

Usage:
CALL InitPBScreen

See Also: CloseWin, OpenWin()















































Page 22




PBTools:Lite Documentation

---------------------------------------------------------------------
InsChar$() FUNCTION Inserts single character in a string.
---------------------------------------------------------------------
Inserts a single character into a user specified string.

Usage:
A$ = InsChar$(Tmp$, Tmp2$, Xpos%)
Where Tmp$ = The string to be used
Tmp2$ = The character to insert into Tmp$
Xpos% = The position in Tmp$ where Tmp2$ should go

See Also: DelChar$()














































Page 23




PBTools:Lite Documentation

---------------------------------------------------------------------
InsertOff SUB Toggles Insert key off.
---------------------------------------------------------------------
Toggles the Insert key to its OFF state.

Usage:
CALL InsertOff

See Also: InsertOn, InsStat%, IsInsert%

















































Page 24




PBTools:Lite Documentation

---------------------------------------------------------------------
InsertOn SUB Toggles Insert key on.
---------------------------------------------------------------------
Toggles the Insert key to its ON state.

Usage:
CALL InsertOn

See Also: InsertOff, InsStat%, IsInsert%

















































Page 25




PBTools:Lite Documentation

---------------------------------------------------------------------
InsStat% FUNCTION Returns status of Insert key.
---------------------------------------------------------------------
Returns the status of the insert key. If it is ON it returns a
non-zero number.

Usage:
Status%=InsStat%

See Also: InsertOff, InsertOn, IsInsert%
















































Page 26




PBTools:Lite Documentation

---------------------------------------------------------------------
IsAlpha%() FUNCTION Tests if a character is alpha.
---------------------------------------------------------------------
Returns a non-zero number if a character passed to it is alpha (A-Z
or a-z).

Usage:
IF IsAlpha%(A$) THEN Yep

See Also: IsASCII%(), IsAlphaNum%(), IsNum%(), IsPunct%()
















































Page 27




PBTools:Lite Documentation

---------------------------------------------------------------------
IsAlphaNum%() FUNCTION Tests if a characters is alphanumeric.
---------------------------------------------------------------------
This function returns a non-zero value if the character passed to it
is an alphanumeric character.

Usage:
IF IsAlphaNum%(A$) THEN Yep

See Also: IsAlpha%(), IsASCII%(), IsNum%(), IsPucnt%()
















































Page 28




PBTools:Lite Documentation

---------------------------------------------------------------------
IsAlt% FUNCTION True if Alt key is depressed.
---------------------------------------------------------------------
Returns a non-zero number if an Alt key is depressed.

Usage:
IF IsAlt% THEN AltKeyPressed

See Also: GetKey$, IsCaps%, IsCtrl%, IsInsert%, IsLShift%,
IsNumLock%, IsRShift%
















































Page 29




PBTools:Lite Documentation

---------------------------------------------------------------------
IsASCII%() FUNCTION Tests if a character is printable ASCII.
---------------------------------------------------------------------
This function returns a non-zero number if the character passed to it
is a printable ASCII character. Valid characters range from 32 to
126.

Usage:
IF IsASCII%(A$) THEN Yep

See Also: IsAlpha%(), IsAlphaNum%(), IsNum%(), IsPunct%()















































Page 30




PBTools:Lite Documentation

---------------------------------------------------------------------
IsCaps% FUNCTION True if Caps Lock key is depressed.
---------------------------------------------------------------------
Returns a non-zero number if the Caps Lock key is depressed.

Usage:
IF IsCaps% THEN Yep

See Also: GetKey$, IsAlt%, IsCtrl%, IsInsert%, IsLShift%,
IsNumLock%, IsRShift%
















































Page 31




PBTools:Lite Documentation

---------------------------------------------------------------------
IsCtrl% FUNCTION True if Ctrl key is depressed.
---------------------------------------------------------------------
Returns a non-zero number if a Ctrl key is depressed.

Usage:
IF IsCtrl% THEN Yep

See Also: GetKey$, IsAlt%, IsCaps%, IsInsert%, IsLShift%,
IsNumLock%, IsRShift%
















































Page 32




PBTools:Lite Documentation

---------------------------------------------------------------------
IsInsert% FUNCTION True if Insert key is depressed.

---------------------------------------------------------------------
Returns a non-zero number if the Insert key is depressed.

Usage:
IF IsInsert% THEN Yep

See Also: GetKey$, IsAlt%, IsCaps%, IsCtrl%, IsLShift%, IsNumLock%,
IsRShift%
















































Page 33




PBTools:Lite Documentation

---------------------------------------------------------------------
IsLShift% FUNCTION True if Left Shift key is depressed.
---------------------------------------------------------------------
Returns a non-zero number if the Left Shift Key is depressed.

Usage:
IF IsLShift% THEN Yep

See Also: IsRShift%

















































Page 34




PBTools:Lite Documentation

---------------------------------------------------------------------
IsMouse% FUNCTION Number of buttons on a mouse.
---------------------------------------------------------------------
Returns the number of buttons a mouse has if one is installed.

Usage:
IF IsMouse% THEN Buttons%=IsMouse%

See Also: MLocate(), MouseKey$, MouseOff, MouseOn, MouseStat(),
MouseWin()
















































Page 35




PBTools:Lite Documentation

---------------------------------------------------------------------
IsNum%() FUNCTION Test if character is a number.
---------------------------------------------------------------------
This function returns a non-zero number if the character passed to it
is a number character. The characters evaluated are "0" [CHR$(48)]
thru 9 [CHR$(57)].

Usage:
IF IsNum%(A$) THEN Yep

See Also: IsAlpha%(), IsAlphaNum%(), IsASCII%(), IsPunct%()















































Page 36




PBTools:Lite Documentation

---------------------------------------------------------------------
IsNumLock% FUNCTION True if Num Lock key is depressed.
---------------------------------------------------------------------
Returns a non-zero number if the Num Lock key is depressed.

Usage:
IF IsNumLock% THEN Yep

See Also: GetKey$, IsAlt%, IsCaps%, IsCtrl%, IsInsert%, IsLShift%,
IsRShift%
















































Page 37




PBTools:Lite Documentation

---------------------------------------------------------------------
IsPunct%() FUNCTION Tests if a character is punctuation.
---------------------------------------------------------------------
This function returns a non-zero number if a character is a valid
punctuation symbol. Valid punctuation symbols are: [email protected]#$%^&*(),.:;'"?
/\[]{}-+=<>

Usage:
IF IsPunct%(A$) THEN Yep

See Also: IsAlpha%(), IsAlphaNum%(), IsASCII%(), IsNum%()















































Page 38




PBTools:Lite Documentation

---------------------------------------------------------------------
IsRShift% FUNCTION True if Right Shift key is depressed.
---------------------------------------------------------------------
Returns a non-zero number if the Right Shift key is depressed.

Usage:
IF IsRShift% THEN Yep

See Also: GetKey$, IsAlt%, IsCaps%, IsCtrl%, IsInsert%, IsLShift%,
IsNumLock%
















































Page 39




PBTools:Lite Documentation

---------------------------------------------------------------------
IsScroll% FUNCTION True if Scroll Lock key is depressed.
---------------------------------------------------------------------
Returns a non-zero number if the Scroll Lock key is depressed.

Usage:
IF IsScroll% THEN Yep

See Also: GetKey$, IsAlt%, IsCaps%, IsCtrl%, IsInsert%, IsLShift%,
IsNumLock%
















































Page 40




PBTools:Lite Documentation

---------------------------------------------------------------------
LPad$() FUNCTION Pads left side of string with character.
---------------------------------------------------------------------
This function will pad the left side of a string with any user
defined character.

Usage:
A$ = LPad$(Lin$, Length%, Char%)

Where Lin$ = The string you wish to pad.
Length% = How many characters to pad the left side of
the string with.
Char% = The ASCII value of the character you wish
to pad the string with.

See Also: RPad$(), Trim$()










































Page 41




PBTools:Lite Documentation

---------------------------------------------------------------------
LScroll() SUB Scrolls portion of screen left.
---------------------------------------------------------------------
Scrolls any portion of the screen to the left.

Usage:
CALL LScroll(TopRow%, LeftCol%, BotRow%, RightCol%, Cols%)

See Also: RScroll(), ScrollDn(), ScrollUp(), ScrollWin

















































Page 42




PBTools:Lite Documentation

---------------------------------------------------------------------
MaskIn() SUB Gets masked input from the user.
---------------------------------------------------------------------
By specifying a Mask$ you may get input only in the areas where you
wish.

Usage:
CALL MaskIn(Ypos%, Xpos%, TexCol%, Hilite%, Mask$, Deflt$, Term$)

Where TexCol% = The color of the text when editing is done
Hilite% = The color of the text as it is edited
Mask$ = the desired mask to use for getting input
The following characters can be used in
defining a Mask$:
_ = Any character
@ = Alpha characters only (Upper and Lower)
# = Numeric characters only
! = Uppercase Alpha only
| = Alpha and numeric only (Uppercase)
Deflt$ = The default answer for input.
Term$ = The terminating key returned for editing.

See Also: GetKey$, MouseKey$, NumIn(), TextEd(), TextIn()



































Page 43




PBTools:Lite Documentation

---------------------------------------------------------------------
Menu%() FUNCTION Uses a menu to get choice from user.
---------------------------------------------------------------------
Displays a menu with a moveable scroll bar and allows user to either
choose a selection with the first letter of the menu selection or by
pressing Enter.

Usage:
Choice%=Menu%(Choices$(), Ypos%, Ylen%, Current%, Hilite%, Typ%)

Where Choices$() = Choices to display.
Ypos% = The starting row to the display menu
relative to the current open window.
Ylen% = The number of the choices to display. If
all choices cannot be displayed then
remaining choices will be scrolled onto
the screen.
Current% = The default choice to hilite first.
Hilite% = The color to display the current choice.
Typ% = Defines the type of menu. If Typ% = 0
the menu will be non-hotkey, any other
value defaults to hotkey type menu
allowing for first letter of selection
to be pressed ending routine.

See Also: OpenWin()
































Page 44




PBTools:Lite Documentation

---------------------------------------------------------------------
MLocate() SUB Locates mouse cursor on screen.
---------------------------------------------------------------------
Locates the mouse cursor to a desired position on the screen.

Usage:
CALL MLocate(Ypos%,Xpos%)

See Also: IsMouse%, MouseOff, MouseOn, MouseStat()

















































Page 45




PBTools:Lite Documentation

---------------------------------------------------------------------
MouseKey$ FUNCTION Gets input from mouse buttons.
---------------------------------------------------------------------
Gets keyboard input from user. If mouse is attached, mouse
movements are also used. Left Button = Enter, Right Button = Esc

Usage:
I$=MouseKey$

See Also: GetKey$, IsMouse%
















































Page 46




PBTools:Lite Documentation

---------------------------------------------------------------------
MouseOff SUB Turns mouse cursor off.
---------------------------------------------------------------------
Turns the mouse cursor OFF so that it is hidden and not displayed on
the screen.

Usage:
CALL MouseOff

See Also: IsMouse%, MouseOn, MouseStat()
















































Page 47




PBTools:Lite Documentation

---------------------------------------------------------------------
MouseOn SUB Turns mouse cursor on.
---------------------------------------------------------------------
Turns the mouse cursor ON so it is visible on the screen.

Usage:
CALL MouseOn

See Also: IsMouse%, MouseOff, MouseStat()

















































Page 48




PBTools:Lite Documentation

---------------------------------------------------------------------
MouseStat() SUB Gets status of mouse buttons.
---------------------------------------------------------------------
Returns the status of the mouse buttons if one is installed.

Usage:
CALL MouseStat(Button%, Ypos%, Xpos%)

Where Button% = Current button(s) depressed

See Also: IsMouse%, MouseOff, MouseOn















































Page 49




PBTools:Lite Documentation

---------------------------------------------------------------------
MouseWin() SUB Defines window for mouse cursor.
---------------------------------------------------------------------
Defines the window for the mouse cursor to be displayed in.

Usage:
CALL MouseWin(Ypos%, Xpos%, Ylen%, Xlen%)

See Also: IsMouse%, MouseOff, MouseOn, MouseStat()

















































Page 50




PBTools:Lite Documentation

---------------------------------------------------------------------
MoveWin() SUB Moves current active window.
---------------------------------------------------------------------
Moves the current active window on the screen.

Usage:
CALL MoveWin(Dir%)

Where if Dir% = 1 then moves window Right one position.
= 2 then moves window Left one position.
= 3 then moves window Down one position.
= 4 then moves window Up one position.

See Also: NoShadow, OpenWin()












































Page 51




PBTools:Lite Documentation

---------------------------------------------------------------------
NoShadow SUB Removes shadow from current window.
---------------------------------------------------------------------
Removes the shadow from the current window. (Required when
moving or resizing windows)

Usage:
CALL NoShadow

See Also: AddShadow(), ChangeWin(), MoveWin()
















































Page 52




PBTools:Lite Documentation

---------------------------------------------------------------------
NumIn() SUB Gets numeric input from user.
---------------------------------------------------------------------
Gets numeric input from the user with text editing features.

Usage:
CALL NumIn(Ypos%, Xpos%, Digits%, NumCol%, Hilite%, Answer#, Term$)

Where Digits% = Numbers after decimal point
NumCol% = Color of text after input
Answer# = Double precision real number with input
Term$ = Key used to terminate input

See Also: GetKey$, MaskIn(), TextEd(), TextIn()












































Page 53




PBTools:Lite Documentation

---------------------------------------------------------------------
NumOff SUB Toggles Num Lock key off.
---------------------------------------------------------------------
Toggles the Num Lock key to its OFF state.

Usage:
CALL NumOff

See Also: NumOn

















































Page 54




PBTools:Lite Documentation

---------------------------------------------------------------------
NumOn SUB Toggles Num Lock key on.
---------------------------------------------------------------------
Toggles the Num Lock key to its ON state.

Usage:
CALL NumOn

See Also: NumOff

















































Page 55




PBTools:Lite Documentation

---------------------------------------------------------------------
NumStat% FUNCTION True if Num Lock key is on.
---------------------------------------------------------------------
Returns a non-zero number if Num Lock is on.

Usage:
IF NumStat% THEN Yep

See Also: NumOff, NumOn


















































Page 56




PBTools:Lite Documentation

---------------------------------------------------------------------
OpenWin() SUB Pops window on screen.
---------------------------------------------------------------------
Pops a window on the screen saving all contents underneath.

Usage:
CALL OpenWin(Ypos%,Xpos%,YLen%,Xlen%,Brdr%,BrC%,TxC%,Shd%,Zm%,Ns%)

Where Brdr% = Border selection (see Box())
BrC% = The color attribute to print border
TxC% = The color attribute for text
Shd% = The placement of the shadow (see Box())
Zm% = True - zoom the window onto the screen
Ns% = True - make noise when opening window

See Also: Box(), CloseWin










































Page 57




PBTools:Lite Documentation

---------------------------------------------------------------------
PFirst() SUB Prints string, first char highlighted.
---------------------------------------------------------------------
Prints a user specified string with the first valid character of that
string highlighted.

Usage:
CALL PFirst(Temp$, TextC%, HltC%)

Where Temp$ = The text to be printed.
TextC% = The one byte color of the text to be printed.
(See Attr%)
HltC% = The one byte color of the highlighted text.
(See Attr%)

See Also: Attr%, SetText()










































Page 58




PBTools:Lite Documentation

---------------------------------------------------------------------
PutScrn() SUB Replaces screen created by GetScrn$().
---------------------------------------------------------------------
Puts a string created with GetScrn$() back onto the screen.

Usage:
CALL PutScrn(Ypos%, Xpos%, Text$)

See Also: GetScrn$()

















































Page 59




PBTools:Lite Documentation

---------------------------------------------------------------------
ReAttr() SUB Changes color attribute of position.
---------------------------------------------------------------------
Changes the color attribute of any position on the screen.

Usage:
CALL ReAttr(Ypos%, Xpos%, Ylen%, Ypos%, NewColor%)

See Also: Attr%, Fill(), Recolor

















































Page 60




PBTools:Lite Documentation

---------------------------------------------------------------------
Recolor() SUB Changes color attribute of screen.
---------------------------------------------------------------------
Changes the color attribute of all positions on the screen.

Usage:
CALL Recolor(Old%, New%)

Where Old% = the attribute on the screen you want to change.
New% = the attribute on the screen to replace the Old%
attribute with.

See Also: Attr%, Fill(), ReAttr()













































Page 61




PBTools:Lite Documentation

---------------------------------------------------------------------
RPad$() SUB Pads right of string with a character.
---------------------------------------------------------------------
Pads the right side of a string with a user specified character as
many times as you wish.

Usage:
A$ = RPad$(Lin$, Length%, Char%)

Where Lin$ = The string you wish to pad.
Length% = How many characters to pad the right side of
the string with.
Char% = The ASCII value of the character you wish
to pad the string with.

See Also: LPad$(), Trim$()










































Page 62




PBTools:Lite Documentation

---------------------------------------------------------------------
RScroll() SUB Scrolls portion of screen right.
---------------------------------------------------------------------
Scrolls any portion of the screen to the right.

Usage:
CALL RScroll(TopRow%, LeftCol%, BotRow%, RightCol%, Cols%)

See Also: LScroll(), ScrollDn(), ScrollUp(), ScrollWin

















































Page 63




PBTools:Lite Documentation

---------------------------------------------------------------------
ScrollDn() SUB Scrolls portion of screen down.
---------------------------------------------------------------------
Scrolls any part of the screen down one line.

Usage:
CALL ScrollDn(Left%, Right%, Top%, Bottom%, Rows%, Atr%)

Where Left% = The left corner of the screen
Right% = The right corner of the screen
Top% = The top most line to scroll
Bottom% = The bottom most line to scroll
Rows% = The number of rows to scroll
Atr% = The color attribute to use

See Also: Attr%, ScrollUp(), ScrollWin










































Page 64




PBTools:Lite Documentation

---------------------------------------------------------------------
ScrollOff SUB Toggles Scroll Lock key off.
---------------------------------------------------------------------
Toggles the Scroll Lock key to its OFF state.

Usage:
CALL ScrollOff

See Also: ScrollOn, ScrollStat%

















































Page 65




PBTools:Lite Documentation

---------------------------------------------------------------------
ScrollOn SUB Toggles Scroll Lock key on.
---------------------------------------------------------------------
Toggles the Scroll Lock key to its ON state.

Usage:
CALL ScrollOn

See Also: ScrollOff, ScrollStat%

















































Page 66




PBTools:Lite Documentation

---------------------------------------------------------------------
ScrollPrint() SUB Scrolls window up and prints on bottom.
---------------------------------------------------------------------
This sub-routine scrolls the window up one position and prints the
user specified text at the bottom of that window.

Usage:
CALL ScrollPrint(Text$)

See Also: ScrollDn(), ScrollUp(), ScrollWin

















































Page 67




PBTools:Lite Documentation

---------------------------------------------------------------------
ScrollStat% SUB True if Scroll Lock key is on.
---------------------------------------------------------------------
Returns a non-zero number if Scroll Lock is on.

Usage:
IF ScrollStat% THEN Yep

See Also: ScrollOff, ScrollOn

















































Page 68




PBTools:Lite Documentation

---------------------------------------------------------------------
ScrollUp() SUB Scrolls portion of screen up.
---------------------------------------------------------------------
Scrolls any portion of the screen up one line.

Usage:
CALL ScrollUp(Left%, Right%, Top%, Bottom%, Rows%, Atr%)

See Also: Attr%, ScrollDn(), ScrollWin

















































Page 69




PBTools:Lite Documentation

---------------------------------------------------------------------
ScrollWin SUB Scrolls the window in any direction.
---------------------------------------------------------------------
Scrolls the current window up, down, left or right.

Usage:
CALL ScrollWin(Dir%)

Where if Dir% = 1 then scrolls window Down.
= 2 then scrolls window Up.
= 3 then scrolls window Left.
= 4 then scrolls window Right.

See Also: OpenWin(), ScrollDn(), ScrollUp()












































Page 70




PBTools:Lite Documentation

---------------------------------------------------------------------
SetText() SUB Sets cursor color from attribute.
---------------------------------------------------------------------
Set the cursor color from an attribute created by the Attr%()
function.

Usage:
CALL SetText(Atr%)

See Also: Attr%, Back%(), Fore%()
















































Page 71




PBTools:Lite Documentation

---------------------------------------------------------------------
StuffKey() SUB Stuffs keyboard buffer.
---------------------------------------------------------------------
Stuffs the keyboard buffer with up to 16 characters. May not
work with many keyboard enhancers.

Usage:
CALL StuffKey(Text$)

See Also: ClrKbd, GetKey$, MouseKey$
















































Page 72




PBTools:Lite Documentation

---------------------------------------------------------------------
TextEd() SUB Lets user edit characters in a string.
---------------------------------------------------------------------
Allows user to edit a string that is passed to the routine using all
text editing features.

Usage:
CALL TextEd(Ypos%, Xpos%, Cpos%, TxC%, Hl%, Txt$, Term$)

Where Cpos% = Cursor position within the string
TxC% = The normal text color
Hl% = The highlighted text color
Txt$ = The text to edit
Term$ = The terminating key that ended the routine

See Also: GetKey$, MaskIn(), NumIn(), TextIn()










































Page 73




PBTools:Lite Documentation

---------------------------------------------------------------------
TextIn() SUB Gets text input from the user.
---------------------------------------------------------------------
Get input from the user with all text editing features.

Usage:
CALL TextIn(Ypos%, Xpos%, Max%, TxC%, Hl%, Txt$, Term$)

Where Max% = The maximum characters to allow in Txt$

See Also: GetKey$, MaskIn(), NumIn(), TextEd()















































Page 74




PBTools:Lite Documentation

---------------------------------------------------------------------
Title() SUB Puts title on current window.
---------------------------------------------------------------------
Displays a title on current window in a desired color.

Usage:
CALL Title(Position%, TCol%, Title$)

Where Position% = Placement of title on window.
If Position% = 1 then title is placed at top left.
= 2 then title is placed at top center.
= 3 then title is placed at top right.
= 4 then title is placed at bottom left.
= 5 then title is placed at bottom center.
= 6 then title is placed at bottom right.
TCol% = The color attribute of text to print.

See Also: Attr%, OpenWin(), WPrint(), WPrintC()









































Page 75




PBTools:Lite Documentation

---------------------------------------------------------------------
Trim$() FUNCTION Trims spaces from both ends of string.
---------------------------------------------------------------------
Trims all spaces from the left and right side of a given string.

Usage:
A$ = Trim$(A$)

See Also: LPad$(), RPad$()

















































Page 76




PBTools:Lite Documentation

---------------------------------------------------------------------
VidSeg% FUNCTION Segment for video I/O on display.
---------------------------------------------------------------------
Returns the segment for video I/O on active display.

Usage:
PRINT "The video segment is located at"; HEX$(VidSeg%)

See Also: CurDisplay%, VidMode%

















































Page 77




PBTools:Lite Documentation

---------------------------------------------------------------------
VidMode% FUNCTION Video mode for current display.
---------------------------------------------------------------------
Returns the video mode for current display.

Usage:
PRINT "Current Video Mode is"; VidMode%

See Also: CurDisplay%, VidSeg%

















































Page 78




PBTools:Lite Documentation

---------------------------------------------------------------------
WinColor() SUB Changes text color of current window.
---------------------------------------------------------------------
Changes the text color of the current window.

Usage:
CALL WinColor(Atr%)

See Also: Attr%, Back%(), Fore%(), OpenWin(), WPrint(), WPrintC()

















































Page 79




PBTools:Lite Documentation

---------------------------------------------------------------------
WPrint() SUB Prints string in current window.
---------------------------------------------------------------------
Prints a string within the current window in desired color.

Usage:
CALL WPrint(Ypos%, Xpos%, Text$, Atr%)

Where Ypos% and Xpos% are relative to the top right corner
of the window which is considered to be point 0,0.

See Also: Attr%, OpenWin(), WPrintC()














































Page 80




PBTools:Lite Documentation

---------------------------------------------------------------------
WPrintC() SUB Prints centered string in window.
---------------------------------------------------------------------
Prints a string centered horizontally within the current window in
the desired color.

Usage:
CALL WPrintC(Ypos%, Text$, Atr%)

See Also: Attr%, OpenWin(), WPrint()
















































Page 81




PBTools:Lite Documentation

---------------------------------------------------------------------
WPrintCF() SUB Prints centered with first highlighted.
---------------------------------------------------------------------
This subroutine will print the user specified string centered within
the current window with the first character highlighted.

Usage:
CALL WPrintCF(Lin%, Text$, Atr%)

Where Lin% = The position relative to the active window
where the string is to be printed.
Text$ = The string to be printed.
Atr% = The color to print the highlighted portion
of the text with. (See Attr%)

See Also: Attr%, WPrint(), WPrintC()










































Page 82




PBTools:Lite Documentation

---------------------------------------------------------------------
ZoomBox() SUB Zooms a box onto the screen.
---------------------------------------------------------------------
Zooms a box onto the screen with option for noise.

Usage:
CALL ZoomBox(Ypos%, Xpos%, Ylen%, Xlen%, BDr%, Sh%, BrC%, TxC%, Ns%)

Where BrC% = The color attribute of the border.
TxC% = The color attribute of the window's text.
Ns% = A non-zero number if you wish for the window
to make noise while zooming onto the screen.

See Also: Box(), OpenWin()












































Page 83




PBTools:Lite Documentation

Appendix
--------

A L
AddShadow 1; 52 LPad 41; 62,76
Attr 2; 3,4,17,18 LScroll 42; 63

B M
Back 3; 2,18,71,79 MLocate 43; 35
Box 4; 17,57,82 MaskIn 44; 20,53,73,74
Menu 45
C MouseKey 46; 20,35,43,72
CapsOff 5; 6,7 MouseOff 47; 35,45,48-50
CapsOn 6; 5,7 MouseOn 48; 35,45,47,50
CapStat 7; 5,6 MouseStat 49; 35,45,47-50
ChangeWin 8; 52 MouseWin 50; 35
CheckKey 9; 12,20 MoveWin 51; 8,52
ClearWin 10
CloseWin 11; 22,57 N
ClrKbd 12; 9,20,72 NoShadow 52; 1,51
CurBot 13; 15 NumIn 53; 20,43,73,74
CurDisplay 14; 77,78 NumOff 54; 55,56
CurTop 15; 13 NumOn 55; 54,56
NumStat 56
D
DelChar 16; 23 O
OpenWin 57; 10,11,22,44
F
Fill 17; 60,61 P
Fore 18; 2,3,71,79 PFirst 58; 19
PutScrn 59; 21
G
GetFrst 19 R
GetKey 20; 9,12,31-33 RPad 60; 41,76
GetScrn 21; 59 RScroll 61; 42
ReAttr 62; 2,3,17,61
I Recolor 63; 17,60
InitPBScreen 22
InsChar 23; 16 S
InsertOff 24; 25,26 ScrollDn 64; 42,63,67,69
InsertOn 25; 24,26 ScrollOff 65; 66,68
InsStat 26; 24,25 ScrollOn 66; 65,68
IsAlpha 27; 28,30,36,38 ScrollPrint 67
IsAlphaNum 28; 27,30,36,38 ScrollStat 68; 65,66
IsAlt 29; 9,31-33,37 ScrollUp 69; 42,63,64,67
IsASCII 30; 27,28,36,38 ScrollWin 70; 58
IsCaps 31; 9,29,32,33 SetText 71; 9,12
IsCtrl 32; 9,29,31,33 StuffKey 72;
IsInsert 33; 9,24-26,29
IsLShift 34; 9,29,31-33 T
IsMouse 35; 45-50 TextEd 73; 20,43,53,74
IsNum 36; 9,27,28,30 TextIn 74; 20,43,53,73
IsNumLock 37; 29,31-33,39 Title 75
IsPunct 38; 27,28,30,36 Trim 76; 41,62
IsRShift 39; 9,29,31-34
IsScroll 40; 9


Page 84




PBTools:Lite Documentation

V
VidSeg 77; 14,78
VidMode 78; 14,77

W
WPrint 79; 10,75,79,81
WPrintC 80; 10,75,29,80
WPrintCF 81; 10,19
WinColor 82; 2,3,10

Z
ZoomBox 83














































Page 85




 December 17, 2017  Add comments

Leave a Reply