home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware 1 2 the Maxx
/
sw_1.zip
/
sw_1
/
PROGRAM
/
VUDU31Q.ZIP
/
VUDU.DOC
< prev
next >
Wrap
Text File
|
1992-06-07
|
64KB
|
1,915 lines
V U D U W I N D O W S
Version 3.01
User Interface Tools for MS QuickBASIC and BASIC PDS
Created By Binary Systems
VUDU Utilities and Documentation
Copyright (c) 1991,1992 Binary Systems. All Rights Reserved.
QuickBASIC and BASIC PDS are registered trademarks
of Microsoft Corporation
VUDU 3.01 Page 1
TABLE OF CONTENTS
_____Contents______________________________________________
_______________________________________________________Page
Table of Contents . . . . . . . . . . . . . . . . 1
Packing List . . . . . . . . . . . . . . . . . . 2
Installing Vudu Libraries . . . . . . . . . . . . 2
Developing A Program With VUDU . . . . . . . . . 2
VUDU's Video Requirements . . . . . . . . . . . . 4
Globals . . . . . . . . . . . . . . . . . . . . . 4
ATTRIB Function . . . . . . . . . . . . . . . . . 5
BARMENU Function . . . . . . . . . . . . . . . . 5
BRIDGE Statement . . . . . . . . . . . . . . . . 7
CLICK Function . . . . . . . . . . . . . . . . . 7
CM Function . . . . . . . . . . . . . . . . . . . 8
COLMON Statement . . . . . . . . . . . . . . . . 8
DATIN Function . . . . . . . . . . . . . . . . . 9
DEFBAR Statement . . . . . . . . . . . . . . . . 9
DEFWIN Statement . . . . . . . . . . . . . . . . 10
FLUSHKEY Statement . . . . . . . . . . . . . . . 11
GETCH Function . . . . . . . . . . . . . . . . . 11
HILITE/HILITV Statements . . . . . . . . . . . . 12
INFIELD Function . . . . . . . . . . . . . . . . 13
ISMOUSE Function . . . . . . . . . . . . . . . . 14
MAKEMENU Function . . . . . . . . . . . . . . . . 14
MESSAGE Function . . . . . . . . . . . . . . . . 15
MONOVID Function . . . . . . . . . . . . . . . . 16
MOUSEAREA Statement . . . . . . . . . . . . . . . 16
MOUSEOFF Statement . . . . . . . . . . . . . . . 17
MOUSEON Statement . . . . . . . . . . . . . . . . 17
MOUSEPOLL Function . . . . . . . . . . . . . . . 17
MOUSEXY Statement . . . . . . . . . . . . . . . . 18
OPENWIN Statement . . . . . . . . . . . . . . . . 18
PRINTS/PRINTV Statements . . . . . . . . . . . . 19
RESCREEN Statement . . . . . . . . . . . . . . . 19
RESWIN Statement . . . . . . . . . . . . . . . . 20
SAVSCREEN Statement . . . . . . . . . . . . . . . 20
SAVWIN Statement . . . . . . . . . . . . . . . . 21
SCROLL Statement . . . . . . . . . . . . . . . . 21
SCROLLMENU Function . . . . . . . . . . . . . . . 22
SETBAR Statement . . . . . . . . . . . . . . . . 22
SETMOUSE Statement . . . . . . . . . . . . . . . 23
VCLS Statement . . . . . . . . . . . . . . . . . 23
VCOLOR Statement . . . . . . . . . . . . . . . . 24
VIDCARD Function . . . . . . . . . . . . . . . . 24
VINIT Statement . . . . . . . . . . . . . . . . . 25
VSLEEP Statement . . . . . . . . . . . . . . . . 25
Declared Constants . . . . . . . . . . . . . . . 26
Global Variables . . . . . . . . . . . . . . . . 27
Monochrome Reference Chart . . . . . . . . . . . 28
___________________________________________________________
VUDU 3.01 Page 2
_________________________________________________________________
PACKING LIST
_________________________________________________________________
Contents of ShareWare Version
(Also included with registered version):
README - Quick Information File
VUDU.DOC - Documentation. This file
VUDEMO.EXE - Executable Demo
VUDEMO.BAS - Demo source code
VUDU.QLB - Quick Library
VUDU.INC - Header file
Additional Contents of Registered VUDU Disk
VUDU.LIB - Stand alone library for creating executable
programs (Please do not share this file)
SOURCE.EXE - Archived BASIC source code.
COMPILE.DOC - Short document on recompiling the procedures.
_________________________________________________________________
INSTALLING VUDU LIBRARIES
_________________________________________________________________
If you are developing QB programs on a hard drive or a network
environment, simply copy all the programs which came with your
VUDU package into your BASIC library directory. If you have set
up a different directory for quick libraries, the file VUDU.QLB
would go there. I recommend keeping all libraries within the same
directory as the QB.EXE and BC.EXE.
When developing on a dual floppy system, the trick is to specify
the drive before all file names when compiling. Whichever system
you use, always make a backup disk before you start using the
libraries.
_________________________________________________________________
DEVELOPING A PROGRAM WITH VUDU
_________________________________________________________________
Follow these steps to create a program using the VUDU command
library from within the QuickBASIC environment:
1. Invoke QuickBASIC using '/L' option to load the VUDU.QBL
quick library. The command line to do this is:
QB /L VUDU [program_name]
VUDU 3.01 Page 3
2. With your program loaded into QuickBASIC, choose 'Make
EXE file' from the 'Run' menu. Flag 'Stand Alone EXE
File' at the submenu. Be sure you have $INCLUDEed the
file VUDU.INC which is provided with the VUDU package.
3. Before any executable statements call the statement
VINIT. This initializes the global variables to their
default values. You may call VINIT again at any time
within your program to reinitialize the globals.
IMPORTANT: Any program calling procedures in the VUDU library
requires the statement "REM $INCLUDE: 'VUDU.INC'" before any
executable statements. This is the header file declaring the
global constants and the external procedures.
The VUDU.QLB is included with both versions of VUDU windows to
allow development of a program using VUDU within the interactive
environment. To invoke QuickBASIC and load the VUDU Quick
Library type:
QB /L VUDU [program name]
Once you have developed your program within the interactive
editor, you may create an executable file by compiling your
program according to the instructions in your QuickBASIC
documentation and linking the object with VUDU.LIB.
IMPORTANT: If you are compiling VUDU programs with BASIC PDS
then you must compile using BC's far string option (/Fs).
VUDU 3.01 Page 4
_________________________________________________________________
VUDU's VIDEO REQUIREMENTS
_________________________________________________________________
The video procedures within the VUDU library are for use in 80
column text mode only; they will not work properly while in
any graphics mode. I recommend specifying this mode at the
beginning of your program with SCREEN 0: WIDTH 80. VUDU is sure
to run fluently in this mode. You can also experiment with WIDTH
40 but this is an unsupported VUDU mode.
If you plan to run your programs exclusively on monochrome
systems, including Hercules, the video paging feature is not
available. I will not go into depth on this subject since ample
information is available in your BASIC documentation. VUDU simply
checks to see what the active video page is and does any
requested reading or writing based on that information. For
example, if you copy a screen portion using SAVWIN while at the
default active page (page 0) then switch to page 1 (using
SCREEN,,1) and restore with RESWIN, you could then switch the
visual page to view the newly replaced portion. In essence, the
rules are the same as QB's own PRINT command. If a page is
active, it gets written to, and, like reading a character from
the screen with the SCREEN function, it gets read from as well.
If you have a CGA card, VUDU will detect it's presence and
automatically check the horizontal retrace and read or write
during that interval. That, translated, means VUDU provides
automatic snow checking on any system equipped with a CGA color
card; all this is transparent to the programmer. For details,
see the assembler source code listing.
_________________________________________________________________
GLOBALS
_________________________________________________________________
Globals are a predefined set of variable switches which are
declared in VUDU.INC. The global variables allow you to
customize aspects of the commands' actions. The globals
associated with the commands, if any, are explained in the
following command descriptions. A full listing and explanation
of the globals is given in the last section of this document.
VUDU 3.01 Page 5
_________________________________________________________________
ATTRIB Function
_________________________________________________________________
PURPOSE: To calculate the attribute byte for screen colors.
CALLING EXAMPLE:
var% = ATTRIB(foregnd%, backgnd%)
WHERE: [foregnd] is the foreground color specified.
[backgnd] is the background color specified.
RETURNS: Attribute number
DESCRIPTION:
Converts specified colors to the respective attribute.
GLOBALS: Any color constants may be used.
COMMENTS: A color attribute is a numeric representation of a
foreground/background color combination. ATTRIB can be
used in the immediate window of the interactive editor
to find the attribute of a foreground/background pair
( ie. ? ATTRIB(1,7) ). The numeric literal can then be
used in the program as an argument. This decreases
executable program size and execution time.
_________________________________________________________________
BARMENU Function
_________________________________________________________________
PURPOSE: Displays a bar (pull down) menu and returns the user's
choice.
CALLING EXAMPLE:
var$ = BARMENU(headers$(), Items$(),
MenuSlct%, ItemSlct%)
WHERE: [headers] is a single dimension string array containing
the menu headers to display on the bar.
[Items] is a two dimensional array which references:
(subscr1) Submenu number
(subscr2) The items which will be printed as
choices under the submenus.
[MenuSlct] holds the returned value of the menu
selected.
[ItemSlct] holds the returned value of the item
selected.
VUDU 3.01 Page 6
RETURNS: The ASCII character of the key pressed upon exit from
BARMENU in [var] (NOTE: BARMENU returned ASCII value in
previous versions). The number of the menu selected in
[MenuSlct] The number of the item selected in
[ItemSlct]
GLOBALS: All window attribute globals
All BarMenu attribute globals
FirstLet - Attribute of first letter of item line
BarClear - Do / do not clear the header bar on exit
BarChar - Bar filler character
EscEnable - Enable escape keypress
DESCRIPTION:
The BARMENU function displays headers and submenus in a
bar (pull down) menu format similar to QuickBasic's own
menus. Using cursor control keys, the user may select
an item from various submenus. The choices are
hilighted as they are moved to. An alternative method
of moving among items in a submenu is the 'first
letter' feature. Pressing the first letter of an item
will position the light bar on the next item beginning
with that letter. (The color of this letter is
controlled by the global 'FirstLet'. The filler
character between menu labelson the bar is determined
by the global 'BarChar'.)
The arrays containing the headers and items may be
loaded by individual assignment (most code effecient)
or you might try DATA statements and then read them
into the arrays. For examples of both methods, see the
'VUDEMO.BAS' program.
BARMENU sizes all submenus to enclose an area defined
by the amount of non-blank items in that submenu (rows)
and the width of the longest item. All colors defining
the windows used for the submenus must be predefined by
DEFBAR and DEFWIN. Use SETBAR to display the inactive
bar at row 1, column 1.
VUDU 3.01 Page 7
_________________________________________________________________
BRIDGE Statement
_________________________________________________________________
PURPOSE: To display a horizontal line spanning the interior of a
window box and join the intersections with a 'T'
fitting.
CALLING EXAMPLE:
BRIDGE row%, col1%, col2%, bor%
WHERE: [row] is the row to place the bridge on.
[col1] is the beginning column (left T character).
[col2] is the ending column (right T character).
[bor] is the border type (ILINE, HLINE, etc.).
RETURNS: Nothing.
GLOBALS: Border (if [bor] = 0).
DESCRIPTION:
BRIDGE joins the left and right edges of a window box
with a line. If [bor] = 0 then the current value of
the global [Border] is used.
_________________________________________________________________
CLICK Function
_________________________________________________________________
PURPOSE: To return a character from the keyboard or from
a mouse click.
CALLING EXAMPLE:
var$ = CLICK
RETURNS: The first pending keystroke or mouse button press
or a null string ("") if none are pending.
DESCRIPTION:
CLICK functions the same as INKEY$ with the addition of
detecting mouse button presses. The left and right
buttons are translated so that the LEFT button returns
CR (CHR$(13)) and the RIGHT returns ESC (CHR$(27)).
VUDU 3.01 Page 8
_________________________________________________________________
CM Function
_________________________________________________________________
PURPOSE: To return the color corresponding to the current video
mode. ColorVar if color, MonoVar if monochrome.
CALLING EXAMPLE:
var% = CM(ColorVar%, MonoVar%)
WHERE: [ColorVar] is the integer to be returned if system
is color.
[MonoVar] is the integer to be returned if system
is monochrome.
DESCRIPTION:
CM is handy when the video type is unknown to the
programmer. The color of choice may be customized to
either color or monochrome systems.
_________________________________________________________________
COLMON Statement
_________________________________________________________________
PURPOSE: To translate color foreground/background schemes into
legible monochrome color schemes.
CALLING EXAMPLE:
COLMON FGvar%, BGvar%
WHERE: [FGvar] is the foreground attribute.
[BGvar] is the background attribute.
DESCRIPTION:
COLMON receives two attributes assumed to be the
attributes desired for color display. It then checks
to see if the display is in fact color. If it is, no
action takes place. If the display is monochrome, the
colors are translated to make them as close as possible
in contrast to their color counterparts. These values
are returned in the passed variables.
VUDU 3.01 Page 9
_________________________________________________________________
DATIN Function
_________________________________________________________________
PURPOSE: Allow user input within a date field.
CALLING EXAMPLE:
var$ = DATIN(Daytype%)
WHERE: [var] is the string variable to receive the return
value (a date value or ESC).
[Daytype] is the format of the date field. See global
constants at the end of this document.
RETURNS: The date as a string or ESC (CHR$(27)) if the escape
key was pressed.
GLOBALS: The color of the field is determined by variables set
with VCOLOR. These are Vfgnd and Vbkgnd. The constants
for the date format are recognized (see below).
DESCRIPTION:
Calling DATIN sets up an input field for date input at
the current cursor position. The format of the field
is defined by the '[DayType]' argument. (The global
constants for DayType are MMDDYY, MMDDYYYY, YYMMDD and
DDMMYY.) DATIN performs validity checks on the month
and day portions of the input and beeps if the user has
entered an invalid date. (A blank date,however, may be
entered which returns all zeros.) A date is considered
invalid if it is partial - containing blank spaces and
numbers.
DATIN does not clear the field before receiving input.
This is to allow the display of a date value with the
option of updating that value.
_________________________________________________________________
DEFBAR Statement
_________________________________________________________________
PURPOSE: Assign values to Bar Menu global variables.
CALLING EXAMPLE:
DEFBAR BFG%, BBG%, Bchar%, BCLR%
WHERE: [BFG] and [BBG] are the foreground and background
colors of the bar respectively.
[Bchar] is the ASCII number of the filler character
between the header labels (32 is default).
VUDU 3.01 Page 10
[BCLR%] is a flag indicating whether or not to clear
the bar on exit.
RETURNS: Nothing
GLOBALS: BarFG, BarBG, BarChar and BarClear
DESCRIPTION:
DEFBAR assigns values to the global variables listed
above. These values will be used on all subsequent
calls to BarMenu until changed.
_________________________________________________________________
DEFWIN Statement
_________________________________________________________________
PURPOSE: Assign values to window global variables.
CALLING EXAMPLE:
DEFWIN HedFG%, HedBG%, BorFG%, BorBG%,
WinFG%, WinBG%, Border%, Shadow%
WHERE: [HedFG] and [HedBG] are the foreground and background
colors of the window header label respectively.
[BorFG] and [BorBG] are the foreground and background
colors of the window border.
[WinFG] and [WinBG] are the foreground and background
colors of the window interior.
[Border] is the border type (PAIR, THIN, etc.) to be
used (see DECLARED CONSTANTS).
[Shadow] is a flag indicating whether the window is to
cast a shadow on the text beneath it.
RETURNS: Nothing.
GLOBALS: BorFG, BorBG, WinFG, WinBG, Border and Shadow.
DESCRIPTION:
DEFWIN assigns values to the global variables listed
above. These values will be used on all subsequent
calls to any VUDU procedures which include windows in
their display.
VUDU 3.01 Page 11
_________________________________________________________________
FLUSHKEY Statement
_________________________________________________________________
PURPOSE: To clear the keyboard buffer of any waiting input.
CALLING EXAMPLE:
FLUSHKEY
RETURNS: Nothing
DESCRIPTION:
FLUSHKEY clears any waiting characters out of the
keyboard buffer.
_________________________________________________________________
GETCH Function
_________________________________________________________________
PURPOSE: Get a character from the standard input.
CALLING EXAMPLE:
var$ = GETCH
WHERE: [var] is a string variable.
RETURNS: The character received.
DESCRIPTION:
GETCH reads a character from the standard input without
echoing it to the screen. GETCH will wait indefinitely
for input. GETCH successfully traps two byte extended
characters and stores them as a two byte string in
[var]. For easy reference to two byte (extended)
characters, use the defined constants listed at the end
of this document.
VUDU 3.01 Page 12
_________________________________________________________________
HILITE / HILITV Statements
_________________________________________________________________
PURPOSE: To horizontally or vertically change the attribute(s)
of text on the screen leaving the characters
undisturbed.
CALLING EXAMPLES:
HILITE row%, col%, length%, attribute%
HILITV row%, col%, length%, attribute%
WHERE: [row] and [col] are the row and column of first hilited
character.
[length] (in characters) that the hilite is to extend.
[attribute] is the color to hilite ( fg+(bg*160) ).
DESCRIPTION:
HILITE changes the color attribute of a horizontal
group of characters while HILITV changes a vertical
group.
COMMENTS: The [attribute] may be calculated easily using the VUDU
function 'Attrib'. HILITE/V, like the other assembler
routines knows nothing of screen boundaries. Although
HILITE/V will wrap around at the end of a row, the end
of the screen is just another stretch of memory to
HILITE/V, producing unpredictable results..
VUDU 3.01 Page 13
_________________________________________________________________
INFIELD Function
_________________________________________________________________
PURPOSE: Get user input from a limited field on the screen and
return the key pressed on exit.
CALLING EXAMPLE:
Var$ = INFIELD(Receiving$, FieldLen%)
WHERE: [Var] is a string variable holding the return value.
[Receiving] is the string which the user input will be
returned in.
[Fieldlen] is the length of the field.
RETURNS: The ASCII value of the key pressed on exit.
GLOBALS: Vfgnd and Vbkgnd determine color of field (use VCOLOR
to set them).
DESCRIPTION:
INFIELD creates a field with limited boundaries
starting at the current cursor position (use LOCATE to
position the cursor at the desired starting position).
Normal escape key pressed are the Escape key and the
return key. You may specify that the page control and
the up and down cursor keys will also cause an escape
by turning on the global switch 'ExtInfield'. The
cursor control keys within the field are the left and
right arrow keys, the home key (beginning of field),
the end key (end of field), the tab key (5 characters
forward of the current position) and shift + tab (5
characters back). The cursor is a block in overstrike
mode and an underline in insert mode.
INFIELD does not clear the field before receiving
input. This is to allow the display of a string value
with the option of updating that value. If the first
character typed in a field containing data is not a
cursor control key, a replacement of the data is
assumed and the remaining 'old' data is deleted.
VUDU 3.01 Page 14
_________________________________________________________________
ISMOUSE Function
_________________________________________________________________
PURPOSE: To initialize the mouse driver.
CALLING EXAMPLE:
var% = ISMOUSE
RETURNS: -1 (TRUE) if mouse installed, 0 (FALSE) otherwise
GLOBALS: Vmouse is TRUE if mouse was present during
initialization in VINIT.
DESCRIPTION:
ISMOUSE initializes the mouse driver, if present. Upon
initialization, the cursor is hidden and is placed in
the center of the screen. ISMOUSE is called in VINIT
and, under normal circumstances, need not be called
again.
_________________________________________________________________
MAKEMENU Function
_________________________________________________________________
PURPOSE: To display a menu on the screen and return the users
choice.
CALLING EXAMPLE:
var$ = MAKEMENU (row%, col%, MenuClear%,
MHeader$, Choices$(), ItemSelect%)
WHERE: [var] is an integer variable to hold the ASCII exit
value (ESC or CR)
[row] is the top row of the menu.
[col] is the upper left column of the menu.
[MenuClear] switches whether or not to clear the menu
upon exit.
[MHeader] is a label which will be placed at the top of
the menu.
[Choices] is a string array containing the choices to
be displayed in the menu window.
[ItemSelect] holds the number of the item chosen.
RETURNS: The ASCII character pressed upon exit from MAKEMENU in
[var] and the item chosen in [ItemSelect].
GLOBALS: All window attribute globals, EscEnable.
VUDU 3.01 Page 15
DESCRIPTION:
MAKEMENU builds a menu from the items passed to it.
The size of the menu in rows is determined by the
number of items passed. Null strings passed at the end
of the [Choices] array will not be included in the
menu. The width in columns is determined by the width
of the longest [Choice]. A [Choice] may be highlighted
by moving to it using the cursor control keys or
pressing the first letter of the choice (same letters
being highlighted in sequential order from the current
position). A choice is selected by either pressing the
Escape or Return keys. The ASCII representation of the
character is returned in [var] and the [Choice] number
is returned in [ItemSelect] (even if menu was Escaped
from).
_________________________________________________________________
MESSAGE Function
_________________________________________________________________
PURPOSE: To display a windowed message with the option of user
response or time delay.
CALLING EXAMPLE:
var$ = MESSAGE$ (Row%, Col%, MesHed$,
Msg$(), Choice$, pause%, Msgclear%)
WHERE: [var] is a string variable to hold the character which
was pressed on exit (if an exit condition was set up).
[row] is the top row of the message.
[col] is the upper left column of the message.
[MesHed] is a label which will be placed at the top of
the menu.
[Msg()] is a string array containing the message to be
printed inside the window.
[Choice] is a string array containing the choices which
will allow the user to exit. If the null string is
passed here the message will display for [pause]
seconds.
[pause] contains a value to wait before ending the
display of the message window. If pause is zero and
[Choices] contains a value then the message will
display until the user hits a key contained in
[Choices].
[Msgclear] is a boolian switch (YES/NO or TRUE/FALSE)
to determine whether or not the message should clear
upon exit.
VUDU 3.01 Page 16
RETURNS: The character key (ESC or CR) pressed on exit or NULL
if a [pause] value was specified and ESC was not
pressed. Also returns the row and/or col position of
the upper left coordinate if the respective parameter's
value is zero. (With this command you must pass a
variable if either of these parameters is zero; do not
pass a literal '0').
GLOBALS: All window attribute globals.
DESCRIPTION:
MESSAGE builds a window from the Msg$ passed defined
by the size of elements in the array (rows) and the
width of the largest line (cols). MESSAGE
appropriately pads spaces around the message for
ascetics. See the parameter descriptions above for
details on the pause and user input options.
_________________________________________________________________
MONOVID Function
_________________________________________________________________
PURPOSE: To return true if Monochrome video mode is active.
CALLING EXAMPLE:
var% = MONOVID or IF MONOVID THEN [statement]
RETURNS: TRUE (-1) only if a monochrome video mode is active.
DESCRIPTION:
MONOVID is invaluable when writing display programs
which may be run on either monochrome or color
hardware. See also CM and COLMON.
_________________________________________________________________
MOUSEAREA Statement
_________________________________________________________________
PURPOSE: To set the boundaries in which the mouse cursor is
allowed to move.
CALLING EXAMPLE:
MOUSEAREA row1%, col1%, row2%, col2%
WHERE: [row1 and col1] are the upper left row and column
coordinates and [row2 and col2] are the lower right
coordinates of the defined area.
DESCRIPTION:
The default area for the mouse cursor to move is 1,1 to
25,80. To limit the movement of the mouse cursor to a
specific area on the screen, call MOUSEAREA. If the
VUDU 3.01 Page 17
cursor is outside of the area defined when MOUSEAREA is
called, it will be placed within the new boundaries.
(If the cursor is not visible, call MOUSEON).
_________________________________________________________________
MOUSEOFF Statement
_________________________________________________________________
PURPOSE: To turn off (hide) the mouse cursor.
CALLING EXAMPLE:
MOUSEOFF
DESCRIPTION:
The cursor's default status is hidden upon calling
VINIT or ISMOUSE.
_________________________________________________________________
MOUSEON Statement
_________________________________________________________________
PURPOSE: To turn on (show) the mouse cursor.
CALLING EXAMPLE:
MOUSEON
DESCRIPTION:
Call MOUSEON to show the mouse cursor.
_________________________________________________________________
MOUSEPOLL Function
_________________________________________________________________
PURPOSE: To monitor mousebutton presses.
CALLING EXAMPLE:
var% = MOUSEPOLL
RETURNS: 1 if left button is pressed, 2 if right button is
pressed, 0 otherwise (The global constants LEFT and
RIGHT are NOT compatible with these returned values).
DESCRIPTION:
MOUSEPOLL checks to see if any mouse buttons have been
pressed since the last call to MOUSEPOLL.
VUDU 3.01 Page 18
_________________________________________________________________
MOUSEXY Statement
_________________________________________________________________
PURPOSE: To get the row/column coordinates of the mouse
cursor.
CALLING EXAMPLE:
MouseXY row%, col%
WHERE: [row and col] are the returned row/col coordinates of
the mouse cursor.
RETURNS: Coordinates in [row] and [col]
DESCRIPTION:
MOUSEXY gets the immediate coordinates of the mouse
cursor's row and column.
_________________________________________________________________
OPENWIN Statement
_________________________________________________________________
PURPOSE: To draw a window at the specified coordinates on the
screen.
CALLING EXAMPLE:
OPENWIN LRow%, LCol%, RRow%, RCol%, header$
WHERE: [LRow] and [LCol] are the upper left corner
coordinates.
[RRow] and [RCol] are the lower right corner
coordinates.
[header] is a label to be printed on the top frame.
RETURNS: Nothing
GLOBALS: All window globals, LabelPos.
DESCRIPTION:
OPENWIN draws a window on the screen using the set
global attributes.
VUDU 3.01 Page 19
_________________________________________________________________
PRINTS / PRINTV Statement
_________________________________________________________________
PURPOSE: An alternative to PRINT with option to overlay text
using the existing attributes on the screen. PRINTS
displays in a horizontal position while PRINTV displays
vertically.
CALLING EXAMPLE:
PRINTS StrVar$, row%, col%, attribute%
PRINTV StrVar$, row%, col%, attribute%
WHERE: [StrVar] is the string to be printed.
[row] and [col] are the row and column to begin
printing at.
[attribute] is the color to use when printing. (If
attribute is '0' then the string is displayed
translucently, using the attribute(s) already existing.
DESCRIPTION:
[StrVar] must be a variable length string, a string
literal, a variable length string element of an array,
or a concatenation of any combination of these. The
[attribute] specifies the color at tribute for printing
[StrVar]. ('0' (zero) attribute specifies translucent
string.)
_________________________________________________________________
RESCREEN Statement
_________________________________________________________________
PURPOSE: Restores screen contents of a screen saved with
SAVSCREEN.
CALLING EXAMPLE:
RESCREEN StringVar$
WHERE: [StringVar] is a string variable containing the
contents of a screen saved with SAVSCREEN. StrVar must
be a dynamic string variable.
DESCRIPTION:
RESCREEN will place the contents of [StringVar] on the
active video screen.
VUDU 3.01 Page 20
_________________________________________________________________
RESWIN Statement
_________________________________________________________________
PURPOSE: Restores a portion of screen from a variable length
string which was buffered using SAVWIN.
CALLING EXAMPLE:
RESWIN StringVar$, R1%, C1%)
WHERE: [StrVar] is a variable length string containing the
screen portion to restore.
[R1] is the integer number of upper left row to place.
[C1] is the integer number of upper left column.
DESCRIPTION:
RESWIN restores a portion of a screen which has been
buffered using the SAVEWIN command. The screen portion
may be restored on any portion of the screen which will
allow for its size. The string may also be restored on
an active visual page other than the one it was taken
from.
Caution: If the buffered portion is repositioned to an
area in which it will not fit, portions of memory other
than the visual screen will be overwritten producing
undesirable results.
_________________________________________________________________
SAVSCREEN Statement
_________________________________________________________________
PURPOSE: To save the screen contents to a string variable.
CALLING EXAMPLE:
SAVSCREEN StrVar$
WHERE: [StrVar] is a dynamic string variable in which the
contents of the screen will be stored.
RETURNS: Contents of the screen in [StrVar]. These contents
should only be restored using RESCREEN.
DESCRIPTION:
SAVESCREEN sizes the dynamic string variable passed to
a length of 4000 bytes (2000 chars + 2000 attributes).
The contents are not compatible with RESWIN.
VUDU 3.01 Page 21
_________________________________________________________________
SAVWIN Statement
_________________________________________________________________
PURPOSE: To save a portion of the screen to a string variable.
CALLING EXAMPLE:
SAVWIN StrVar$, LRow%, LCol%, RRow%, RCol%
WHERE: [StrVar] is a dynamic string variable to serve as a
buffer for the screen portion contents.
[LRow] and [LCol] are the upper left corner coordinates
of the portion to save.
[RRow] and [RCol] are the lower right corner
coordinates of the portion to save.
RETURNS: The contents of the specified portion in [StrVar].
DESCRIPTION:
SAVWIN saves a specified portion of the screen to a
string variable. The portion may then be restored
using RESWIN. Strings containing information saved
which was buffered by SAVWIN may not be restored using
RESCREEN.
_________________________________________________________________
SCROLL Statement
_________________________________________________________________
PURPOSE: To scroll a section or all of the screen contents in
any horizontal or vertical direction.
CALLING EXAMPLE:
SCROLL lr%, lc%, rr%, rc%, direction%
WHERE: [lr] and [lc] are the coordinates for the upper left
corner of the region to scroll
[rr] and [rc] are the lower right corner coordinates.
[direction] is the direction (UP, DOWN, LEFT, RIGHT) to
scroll this region.
GLOBALS: ScrollAttrib - color attribute of new line created by
the scroll.
DESCRIPTION:
SCROLL moves the region specified one column (LEFT,
RIGHT) or one row (UP, DOWN) in the desired
[direction], thus leaving a blank line of the color
[ScrollAttrib].
VUDU 3.01 Page 22
_________________________________________________________________
SCROLLMENU Function
_________________________________________________________________
PURPOSE: To display a window of multiple choices in a limited
region of the screen, scrolling up and down as needed.
CALLING EXAMPLE:
var$ = SCROLLMENU (LRow%, LCol%, Brow%, SclSav%,
items$(), header$, Choice%)
WHERE: [var] is a variable to receive the exit ASCII value.
[LRow] and [Lcol] is the upper left row/col coordinate.
[Brow] specifies the bottom of the displayed window.
[SclSav] is a logical flag indicating whether or not
the screen underneath should be restored upon exit.
[Items] is a string array containing the item
descriptions to be displayed in the scrolling window.
[header] is a label to be printed on the top center of
the scrolling window.
[Choice] is the item number chosen.
RETURNS: The value (CR or ESC) of the key pressed on exit.
The item number in [Choice].
DESCRIPTION:
SCROLLMENU sets up a scrolling window of a length
determined by the parameters passed and a width
determined by the width of the longest item(s).
SCROLLMENU allows many items to be displayed in a
limited screen space. All the vertical keys are
supported including PgUp and PgDn. A selection is made
by moving the hilite bar onto the desired item and
pressing Return (pressing Esc will also return the
current item hilited in [Choice])
_________________________________________________________________
SETBAR Statement
_________________________________________________________________
PURPOSE: To display the inactive menu bar that will later be
used in a BARMENU call.
CALLING EXAMPLE:
SETBAR MenuLine$()
WHERE: [MenuLine] is the list of menu headings that
are to be used when calling BARMENU.
VUDU 3.01 Page 23
DESCRIPTION:
SETBAR allows an inactive bar to be displayed when the
barmenu is not in use. When the BARMENU function is
called, BARMENU will activate the bar that SETBAR
displayed. This is only an option, however. You
needn't use SETBAR first since BARMENU will display
it's own bar if SETBAR has not.
_________________________________________________________________
SETMOUSE Statement
_________________________________________________________________
PURPOSE: To set the row/column coordinates of the mouse
cursor.
CALLING EXAMPLE:
SETMOUSE row%, col%
WHERE: [row and col] are the row/col coordinates to place the
mouse cursor at.
DESCRIPTION:
SETMOUSE repositions the mouse cursor to the new
coordinates specified in [row] and [col].
_________________________________________________________________
VCLS Statement
_________________________________________________________________
PURPOSE: To clear a portion of the screen to spaces of a
designated color.
CALLING EXAMPLE:
VCLS row1%, col1%, row2%, col2%, attr%
WHERE: [row1] and [col1] are the upper left coordinates of the
screen portion to clear.
[row2] and [col2] are lower right coordinates of the
portion.
[attr] is the color attribute to clear the portion to.
DESCRIPTION:
VCLS clears the designated portion of the screen to
spaces of the specified color attribute.
VUDU 3.01 Page 24
_________________________________________________________________
VCOLOR Statement
_________________________________________________________________
PURPOSE: To define the colors for field input (INFIELD and
DATIN).
CALLING EXAMPLE:
VCOLOR fgcolor%, bgcolor%
WHERE: [fgcolor] is the integer expression which specifies the
foreground color
[bgcolor] is the integer expression which specifies the
background color
GLOBALS: Vfgnd and Vbkgnd
DESCRIPTION:
VCOLOR sets the global variables Vfgnd and Vbkgnd which
defines the colors of input fields.
_________________________________________________________________
VIDCARD Function
_________________________________________________________________
PURPOSE: To determine the primary video card.
CALLING EXAMPLE:
var% = VIDCARD
RETURNS: A value corresponding to the video card detected.
(These values are declared constants.)
1 = MONO 2 = CGA 3 = EGA 4 = VGA
DESCRIPTION:
The VIDCARD function returns a value which may be
compared using the declared constants listed above.
VUDU 3.01 Page 25
_________________________________________________________________
VINIT Statement
_________________________________________________________________
PURPOSE: To declare global defaults.
CALLING EXAMPLE:
VINIT
RETURNS: Nothing
DESCRIPTION:
VINIT must be called before using any statements or
variables included in the VUDU library. VINIT may be
called subsequently at any time in your program to
reset all VUDU global variables to their default
values.
_________________________________________________________________
VSLEEP Statement
_________________________________________________________________
PURPOSE: To suspend program execution until a specified period
of time has elapsed or a keypress or mouse click are
encountered.
CALLING EXAMPLE:
VSLEEP seconds%
WHERE: [seconds] is the length of time, in seconds, to suspend
program execution.
RETURNS: Nothing
DESCRIPTION:
VSLEEP suspends program execution for the number of
seconds specified unless a key is pressed or a mouse
button is clicked. If the parameter is 0, VSLEEP waits
indefinitely for a keypress or mouse click. The
presence of the mouse need not be checked before
calling VSLEEP.
VUDU 3.01 Page 26
_________________________________________________________________
DECLARED CONSTANTS
_________________________________________________________________
The following are global constants declared in the file
'VUDU.INC'. These named constants may be used interchangeably
with their actual values. The descriptions are formatted:
CONSTNAME = REAL_VALUE - DESCRIPTION
WINDOW BORDER TYPES
(use these when specifying window border attributes):
NONE = 0 - border consists of spaces
THIN = 1 - single line all four sides
PAIR = 2 - double line all four sides
ILINE = 3 - horizontal lines are double, vertical are single
HLINE = 4 - horizontal lines are single, vertical are double
THICK = 5 - all borders are solid graphic character
COLOR ATTRIBUTES
( Example Use: COLOR WHT, BLK; ATTRIB(YEL+BRITE, BLU) )
BLK = 0 - Black
BLU = 1 - Blue
GRN = 2 - Green
CYN = 3 - Cyan
RED = 4 - Red
MAG = 5 - Magenta
YEL = 6 - Brown/Yellow (depending on monitor)
WHT = 7 - White
BRITE = 8 - Add this for bright color (foreground only)
FLASH = 16 - Add this for flashing color (foreground only)
LABEL POSITION VIDEO CARD TYPES
LEFT = 0 MONO = 1
RIGHT = 1 CGA = 2
UP = 2 EGA = 3
DOWN = 3 VGA = 4
CENTER = 4
VUDU 3.01 Page 27
CHARACTER CONSTANTS AND PSEUDO-CONSTANTS
CR = CHR$(13) - Carriage Return / Return Key
ESC = CHR$(27) - Escape Character / Key
NULL = CHR$(0) - Null Character
PgUp = NULL + "I" - Page Up Key
PgDn = NULL + "Q" - Page Down Key
UpKey = NULL + "H" - Cursor Up Key
DnKey = NULL + "P" - Cursor Down Key
LKey = NULL + "K" - Cursor Left Key
RKey = NULL + "M" - Cursor Right Key
Ins = NULL + "R" - Insert Key
Del = NULL + "S" - Delete Key
HomeKey = NULL + "G" - Cursor Home Key
EndKey = NULL + "O" - Cursor End Key
DATIN CONSTANTS
MMDDYY = 0 MMDDYYYY = 1 YYMMDD = 2 DDMMYY = 3
BOOLEAN CONSTANTS
YES = -1 NO = NOT YES TRUE = YES FALSE = NO
_________________________________________________________________
GLOBAL VARIABLES
_________________________________________________________________
All globals are of type INTEGER
([bracketed] expression denotes default value)
INPUT FIELD:
Vfgnd - color of field foreground
Vbkgnd - color of field background
WINDOW CONTROL:
HedFG - color of header's foreground [7]
HedBG - color of header's background [0]
BorFG - color of border's foreground [7]
BorBG - color of border's background [0]
WinFG - color of window interior foreground [7]
WinBG - color of window interior background [0]
Border - denotes border pattern (see WINDOW
BORDER TYPES above) [THIN]
Shadow - logical switch (do/do not draw shadow) [NO]
VUDU 3.01 Page 28
BARMENU CONTROL:
BarFG - foreground color of barmenu labels [7]
BarBG - background color of barmenu labels [0]
BarChar - ASCII number of filler character between
labels on bar [32 (spaces)]
BarClear - logical switch (remove bar when exiting from
BARMENU/do not remove bar)
OTHER:
ExtInfield - logical switch to allow/disallow exit from
INFIELD with an extended scancode keypress (e.i.
UpKey, HomeKey, etc.) [NO (not allowed)]
EscEnabled - logical switch to allow/disallow exit from
from menus with an ESC keypress. [YES (allow)]
UpKey, HomeKey, etc.) [NO (not allowed)]
FirstLet - controls foreground color attribute of menu
item's first letter [7 (White)]
LabelPos - controls label position on top of a window
or menu (see constants above) [CENTER]
ScrollAttrib - controls the color of the blank space left by
a scroll [WHITE on BLACK]
Vmouse - set in VINIT. Is -1 (TRUE) if mouse was present
during VINIT, 0 (FALSE) otherwise.
The following chart is provided for your reference.
- - - - - - - - - AVAILABLE COLORS: MONOCHROME - - - - - - - - -
- Effect Foreground Background -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- Normal (white on black) 7 0 -
- Reverse (black on white) 0 7 -
- Invisible (black on black) 0 0 -
- Underlining 1 0 -
- High Intensity add 8 no change -
- Blinking add 16 no change -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -