Dec 222017
 
Dr windows alternative windowing package for turbo basic.
File DRWIND.ZIP from The Programmer’s Corner in
Category BASIC Language
Dr windows alternative windowing package for turbo basic.
File Name File Size Zip Size Zip Type
DRWBEG.INC 65 65 stored
DRWDEM.BAS 6757 1516 deflated
DRWIND.DOC 18749 5032 deflated
DRWIND.INC 10820 2006 deflated
FORM.TXT 2245 829 deflated
TPCREAD.ME 199 165 deflated

Download File DRWIND.ZIP Here

Contents of the DRWIND.DOC file































DR Windows 1.15
Written By Dan Robins
For Use With Borland's Turbo Basic (tm)
Copyright (C) 1988, Broadcast Software Int'l.
P. O. Box 891
Raleigh, NC 27602
(919)552-0780


































DR Windows Table Of Contents
__________________________________________________________________

SECTION TITLE PAGE NO.
__________________________________________________________________

I. General Overview 2
II. Shareware 2
III. Distribution And Use 2
IV. The Files On The Disk 3
V. The Use Of DRWBEG.INC 3
VI. How The Windowing Routine Works 3
VII. How The Menubar & Popup Menu Window Work 4
VIII. The Calls
DRCreate 5
DRDelete 5
DRPrint 6
DRPrintc 6
DRTitle 6
DRMenu 7
DRBar 8
DRArrows 9
DRGetPixClr 9





































DR Windows Version 1.15 User's Manual Page 1


I. General Overview

In the production of software for the broadcast industry, and in
light of other windowing/menuing programs available, I felt the need
to product my own package (originally for personal use) which kept
code and variable requirements down to a bare minimum. Also, none of
the offerings, commercial or shareware, contained all of the neces
ities that these subroutines do. Thus the birth of DR Windows. Not as
fast as other offerings, I think you'll agree that these are easy to
understand, and will leave more variable/program space available for
YOUR project!


II. Shareware

I'll be honest. I have never offered a program as shareware
before, and the results of this offering will probably help me to
decide whether I do it again. My feeling on this shareware item and
others is- If you test the product and don't use it, no need to make
the shareware contribution. However, if you find yourself using the
program in regularity, in a project for sale, or even a project for
home use, and it saved YOU programming time, then it's time to dawn
out the checkbook.

I'll even go a bit further. I have offered my phone number on
the coverpage of this documentation in case support is necessary,
but will offer it ONLY to registered users. Additionally, to those
who register, I will send to you a professional typeset (Ventura)
printed series of documentation, a disk with the latest version,
AND a new CALL routine which will allow you to send the types of
input (upto 20 different input calls) and the routine will create
the window, prompt name, input area, and return the answers the
user filled in. A pretty neat subroutine, if I say so myself! To
register your use, simply prepare your printer and type FORM at
the DOS prompt.


III. Distribution And Use

DR Windows is NOT a public domain program. It may however be
distributed to national electronic services and local bulletin
boards provided that ALL FILES REMAIN INTACT AND UNCHANGED, and
all Copyright notices remain unchanged. Failure to comply will
result in an immediate request to remove from the service.

DR Windows may be distributed by companies who furnish the
program by disk as long as: 1) A fee of NO MORE THAN $5.00 is
charged for the duplication; 2) The company itself is a register-
ed owner of DR Windows.

DR Windows may NOT be published in any publications without
the written permission of the author.

Anyone who uses DR Windows in a commercially available pro-
duct are required to be registered owners. Failure to do so may
result in legal action.







DR Windows Version 1.15 User's Manual Page 2



IV. The Files On The Disk

DRWIND.INC- This is the main INCLUDE file which contains all
of the subroutines uses with DR Windows.

DRWBEG.INC- An include file which contains the information
necessary for DRWIND.INC.

DRWIND.DOC- This file.

FORM.TXT- This is the registration form. To send it to your
printer either type:
TYPE FORM.TXT > LPT1 [or other printer device]

DRWDEM.BAS- A demo program that shows you how DR Windows
are used.


V. The Use Of DRWBEG.INC

Although the use of this INCLUDE file is not a requirement,
it is included for a specific reason. DR Windows does not use any
SHARE statements. The only variables (string or numeric) which
will affect your program are those in the SUB/CALL command line.
SCRINFO%() is a dimensioned integer array which will contain all
information from the screen 'below' a window, so when the window
is deleted or released that information can be redisplayed.
Another dimensioned array is ITEMS$(), which will be used to pass
menu information to both the popup and menubar subroutines. I do
suggest the use of OPTION BASE 1, however, whichever OPTION BASE
you decide to use, make sure that the variable SCPTR% reflects
the same number.


VI. How The Windowing Routine Works

As you can see, DR Windows is completely written in Turbo
Basic(tm). As mentioned earlier, SCRINFO%() contains the inform-
ation of screen data which lies underneath the window. The
integer variable SCPTR% is the current pointer to the TOP of the
saved screen(s) information. When a window is placed on screen
the following applies:

SCPTR% = The uppermost array of SCRINFO%() used;
SCRINFO%(SCPTR%)= (top left row location * 256) + # of rows;
SCRINFO%(SCPTR%-1)=
(top left column location * 256) + # of columns;

SCRINFO%((# of rows * # of columns)-2) to SCRINFO%(SCPTR%-2)
will contain the screen information.

Each element of the SCRINFO%() screen information array is
store as: (Color Attribute * 256) + Character's ASCII value









DR Windows Version 1.15 User's Manual Page 3



VII. How The Menubar & Popup Menu Window Work

I believe you'll have to agree, one of the nicest things
about DR Windows is that it has BOTH menubar and pop up menu
window capabilities. One of the variables you are expected to
declare is "ITEMS$()", and is a very important variable use by
both of these subroutines. In essence, each menu selection (used
by either subroutine) expects the following:

/1st array element-Text to appear on bar
Item1 2nd array element-Acceptable letter for this selection
\3rd array element-Help message (if any) to appear on line 25
/4th array element-Text to appear on bar
Item2 5nd array element-Acceptable letter for this selection
\6rd array element-Help message (if any) to appear on line 25
...and so on

Additionally, the variable CHOICES% must indicate the number
of choices available for that particular menu. When you return
from the menu, CHOICES% will contain the menu selection number
that was chosen by the user. It should also be pointed out that
DR Windows DOES NOT dissolve the menu (this is done because you
wish to stack another window on top of it for further selection.)

I found the use of DATA statements the best for setting up
menus:

MenuOne:
DATA First selection,F,This is your first selection
DATA Second selection,S,This is your second selection
DATA Third selection,T,This is your third selection
Choices%=3
RESTORE MenuOne
FOR x%=1 TO Choices%*3:READ Items$(X%):NEXT x%
CALL [whichever menu type you want] (...........)

Also, I would make sure to CAPITALIZE the letter that allows
the user to immediately move to that selection. IF THEY DO PRESS
THE LETTER, the menuing routines automatically assumes that this
is the selection they want. However, if they use the arrow keys
the selection is not made until they press .

The menubar subroutines will automatically calculate the
distances necessary to space between each selection. The variable
OFFSET% will dictate how far on each side of the screen to space
the first and last selections from each side of the screen.

Neither menuing routines have error checking involved in
setting up the menus. This was done to help keep the amount of
code space to a minimum, and it was my feeling that the
the programmer will take precaution in setting up the menus.











DR Windows Version 1.15 User's Manual Page 4



VIII. The Calls


-----------------------------------------------------------------
DRCreate - Create The Window

Syntax:

CALL DRCreate(x%,y%,rows%,colums%,fg1%,bg1%,bdr%,scrinfo%(),scptr%)

* Incoming:

x%= The upper left ROW location of the window being created
y%= The upper left COLUMN location of the window being created
rows%= The total number of ROWS for the window
colums%= The total number of COLUMNS for the window
fg1%= The window's FOREGROUND color
bg1%= The window's BACKGROUND color
bdr%= The border type:
0= No border
1= Single line border
2= Double line border
Do not adjust scrinfo%() or scptr%, this is done by the subroutine

* Outgoing:

Scrinfo%() now contains the information which was on the screen
below the window

Scptr% is now updated to reflect the position of the pointer.


-----------------------------------------------------------------
DRDelete- Delete The Latest Window Which Was Produced

Syntax:

CALL DRDelete(scrinfo%(),scptr%)

* Incoming:

NONE
Do not adjust scrinfo%() or scptr%, this is done by the subroutine

* Outgoing:

Scrinfo%() now contains the information which was on the screen
below the window

Scptr% is now updated to reflect the position of the pointer.












DR Windows Version 1.15 User's Manual Page 5




-----------------------------------------------------------------
DRPrint - Print Text On The Window

Syntax:

CALL DRPrint(x%,y%,instring$,scrinfo%(),scptr%)

* Incoming:

x%= The ROW location ON THE WINDOW of the text to be printed
y%= The COLUMN location ON THE WINDOW of the text to be printed
instring$= The text to be printed
Do not adjust scrinfo%() or scptr%, this is done by the subroutine

* Outgoing:

none

-----------------------------------------------------------------
DRPrintc - Print Centered Text On The Window

Syntax:

CALL DRPrintc(x%,instring$,scrinfo%(),scptr%)

* Incoming:

x%= The ROW location ON THE WINDOW of the text to be printed
instring$= The text to be printed
Do not adjust scrinfo%() or scptr%, this is done by the subroutine

* Outgoing:

none


-----------------------------------------------------------------
DRTitle - Place A Title On The Window

Syntax:

CALL DRTitle(x%,instring$,scrinfo%(),scptr%)

* Incoming:

x%= The placement of the title as follows:
1- Left Top Corner
2- Top Center
3- Right Top Corner
4- Left Bottom Corner
5- Bottom Center
6- Right Bottom Corner
instring$= The title you wish printed
Do not adjust scrinfo%() or scptr%, this is done by the subroutine

* Outgoing:

none



DR Windows Version 1.15 User's Manual Page 6



-----------------------------------------------------------------
DRMenu - Place A Pop Up Menu With Selections & Receive Selection

Syntax:

CALL DRMenu(x%,y%,fg1%,bg1%,fg2%,bg2%,choices%,title$,items$(1),_
scrinfo%(),scptr%)

* Incoming:

x%= The upper left ROW location of the menu being created
y%= The upper left COLUMN location of the menu being created
fg1%= The -MENU's- FOREGROUND color
bg1%= The -MENU's- BACKGROUND color
fg2%= The -SELECTION's- FOREGROUND color
bg2%= The -SELECTION's- BACKGROUND color
choices%= The total number of choices available in this menu
title$= The title (if any) of this menu
items$(1 to choices%*3)= Contains array elements of each choice
of the menu.

Array element 1,4,7,10, and so on contain the menu item as it
appears in the the pop up menu window

Array element 2,5,8,11, and so on contain the key which the
user may press to automatically make a menu selection (the
returned key is forced to UPCASE).

Array element 3,6,9,12, and so on contain the help message
which will appear on line 25. If null, no message will
appear.

See Page 4 of documentation for further details.

Do not adjust scrinfo%() or scptr%, this is done by the subroutine

* Outgoing:

Choices% now contains the item number that the user selected.

Scrinfo%() now contains the information which was on the screen
below the window

Scptr% is now updated to reflect the position of the pointer.

REMEMBER: The pop up menu WILL remain until you make 3 (one
for the selection bar window, one for the main pop up menu,
and one for the help line) DRDelete calls. (Make -2- DRDelete
if you did NOT include the help line.)













DR Windows Version 1.15 User's Manual Page 7


-----------------------------------------------------------------
DRBar - Place An Item Bar Menu With Selections & Receive Selection

Syntax:

CALL DRBar(x%,offset%,fg1%,bg1%,fg2%,bg2%,choices%,title$,_
items$(1),scrinfo%(),scptr%)

* Incoming:

x%= The upper left ROW location of the menu being created
y%= The OFFSET from the LEFT and RIGHT hand sides of the screen
you wish the first selection's first letter and the last
selections last letter to appear (the offset from the right
hand side of the screen may be off by 1 column if the total
letters of all choices is an uneven number)
fg1%= The -MENU's- FOREGROUND color
bg1%= The -MENU's- BACKGROUND color
fg2%= The -SELECTION's- FOREGROUND color
bg2%= The -SELECTION's- BACKGROUND color
choices%= The total number of choices available in this menu
items$(1 to choices%*3)= Contains array elements of each choice
of the menu.

Array element 1,4,7,10, and so on contain the menu item as it
appears in the the item bar menu window

Array element 2,5,8,11, and so on contain the key which the
user may press to automatically make a menu selection (the
returned key is forced to UPCASE).

Array element 3,6,9,12, and so on contain the help message
which will appear on line 25. If null, no message will
appear.

See Page 4 of documentation for further details.

Do not adjust scrinfo%() or scptr%, this is done by the subroutine

* Outgoing:

Choices% now contains the item number that the user selected.

Scrinfo%() now contains the information which was on the screen
below the window

Scptr% is now updated to reflect the position of the pointer.

REMEMBER: The item bar menu WILL remain until you make 3 (one
for the selection bar window, one for the main pop up menu, and
one for the help line) DRDelete calls. (Make -2- DRDelete calls
if you did NOT include the help line.)

WARNING: The item bar will look extremely confusing if there are
too many selections. If the following equation is more than 80
it will NOT work:
(offset%*2)
+ (total number of letters in all of the selections)
+ (choices%-1)
+1 (if total number of letters is an odd number)
---------------------------------------------------------
must equal 80 or less

DR Windows Version 1.15 User's Manual Page 8



-----------------------------------------------------------------
DRArrows - If An Arrow Key, Get Horizontal Or Vertical
Displacement

Syntax:

CALL DRArrows(keyin$,horz%,vert%)

* Incoming:

keyin$- This is the equal to the result of an INKEY$ statement
passed to this subroutine to check if an arrow was
pressed.

* Outgoing:

If an arrow was pressed:

horz%= -1 if left arrow was pressed
horz%= +1 if right arrow was pressed
vert%= -1 if up arrow was pressed
vert%= +1 if down arrow was pressed
horz%=0 AND vert%=0 if no arrows were pressed
keyin$= remains unchanged


-----------------------------------------------------------------
DRGetPixClr - Get The Characters Color Attributes At A Location

Should not be used by the programmer. Is called by DRCreate.































DR Windows Version 1.15 User's Manual Page 9


 December 22, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)