Window Drawing (3/4)

 BBS: Inland Empire Archive
Date: 10-16-93 (12:58)             Number: 5
From: EDWARD SCHLUNDER             Refer#: NONE
  To: ALL                           Recvd: NO  
Subj: Window Drawing (3/4)           Conf: (2) Quik_Bas
'>>> Page 3 of WINDOW.BAS begins here.
WindowCol1(WindowNum) = Col1
WindowRow2(WindowNum) = Row2
WindowCol2(WindowNum) = Col2 + 5
WindowFore(WindowNum) = Fore
WindowBack(WindowNum) = Back
SELECT CASE ATTR AND 192

CASE 0      'Single Line Border
COLR$ = CHR$((Fore * 8 AND 128) + (Back * 16) + (Fore AND 15))
BORDER$ = "" + COLR$ + "" + COLR$ + "" + COLR$ + "" + COLR$ + " " +_
 COLR$
BORDER$ = BORDER$ + "" + COLR$ + "" + COLR$ + "" + COLR$ + "" + COLR$

CASE 64
COLR$ = CHR$((Fore * 8 AND 128) + (Back * 16) + (Fore AND 15))
BORDER$ = "" + COLR$ + "" + COLR$ + "" + COLR$ + "" + COLR$ + " " +_
 COLR$
BORDER$ = BORDER$ + "" + COLR$ + "" + COLR$ + "" + COLR$ + "" + COLR$

CASE 128     '3-D Window!
BWHITE$ = CHR$(15 + Back * 16): BWG$ = CHR$(8 + Back * 16)
BORDER$ = "" + BWHITE$ + "" + BWHITE$ + "x" + "" + BWHITE$ + " " +_
 CHR$(Back * 16)
BORDER$ = BORDER$ + "" + BWG$ + "" + CHR$(127) + "" + BWG$ + "" + BWG$

CASE 192    'Double line boder
COLR$ = CHR$((Fore * 8 AND 128) + (Back * 16) + (Fore AND 15))
BORDER$ = "" + COLR$ + "" + COLR$ + "" + COLR$ + "" + COLR$ + " " +_
 COLR$
BORDER$ = BORDER$ + "" + COLR$ + "" + COLR$ + "" + COLR$ + "" + COLR$
END SELECT

DrawBox Row1, Col1, Row2, Col2, BORDER$, ATTR
END SUB

SUB PrintWindowTitle (Title$, Fore, Back, ATTR)

LENTH = WindowCol2(WindowNum) - WindowCol1(WindowNum)
WindowTitle$(WindowNum) = Title$
TLEN = LEN(Title$)
IF ATTR AND 16 THEN
IF ATTR AND 64 THEN
IF WindowAttr(WindowNum) AND 64 THEN LTB$ = "" ELSE LTB$ = ""
ELSE
RTB$ = "]"
END IF
END IF
IF ATTR AND 32 THEN
IF ATTR AND 128 THEN
IF WindowAttr(WindowNum) AND 64 THEN RTB$ = "" ELSE RTB$ = ""
ELSE
LTB$ = "["
END IF
END IF

IF ATTR AND 64 THEN
IF ATTR AND 16 THEN
IF WindowAttr(WindowNum) AND 64 THEN RTB$ = "" ELSE RTB$ = ""
ELSE
IF WindowAttr(WindowNum) AND 64 THEN RTB$ = "" ELSE RTB$ = ""
END IF
END IF

IF ATTR AND 128 THEN
IF ATTR AND 32 THEN
IF WindowAttr(WindowNum) AND 64 THEN LTB$ = "" ELSE LTB$ = ""
ELSE

IF WindowAttr(WindowNum) AND 64 THEN LTB$ = "" ELSE LTB$ = ""
END IF
END IF

FOR J = 4 TO 7
IF ATTR AND 2 ^ J THEN NO = -1
NEXT
IF NO <> -1 THEN LTB$ = " ": RTB$ = " "

ROW = WindowRow1(WindowNum)
IF ATTR AND 4 THEN COL = WindowCol1(WindowNum) + (LENTH \ 2 - LEN(Title$)_
 \ 2)
IF ATTR AND 2 THEN COL = WindowCol1(WindowNum) + 2
IF ATTR AND 8 THEN COL = WindowCol2(WindowNum) - LEN(Title$) - 2

IF TLEN > LENTH THEN EXIT SUB
'>>> Page 3 of WINDOW.BAS ends here. Continued on next page.

... Is this yours?  Your dog left it on my lawn.
___ Blue Wave/QWK v2.12


--- WM v3.01/93-0966
 * Origin: 1:114/289 POWER SURGE - Phoenix, Arizona 602/548-
9020  (1:114/289.0)
Outer Court
Echo Basic Postings

Books at Amazon:

Back to BASIC: The History, Corruption, and Future of the Language

Hackers: Heroes of the Computer Revolution (including Tiny BASIC)

Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution

The Advent of the Algorithm: The Idea that Rules the World

Moths in the Machine: The Power and Perils of Programming

Mastering Visual Basic .NET