home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Media Share 9
/
MEDIASHARE_09.ISO
/
progmisc
/
pbc22b.zip
/
PBC$BAS.ZIP
/
DWINMAN4.BAS
< prev
next >
Wrap
BASIC Source File
|
1993-01-01
|
2KB
|
61 lines
' +----------------------------------------------------------------------+
' | |
' | PBClone Copyright (c) 1990-1993 Thomas G. Hanlin III |
' | |
' +----------------------------------------------------------------------+
DECLARE SUB DXQPrint (BYVAL DSeg%, BYVAL DOfs%, St$, BYVAL Row%, BYVAL Column%, BYVAL VAttr%)
SUB DWindowMan4 (DSeg%, DOfs%, TopRow%, LeftCol%, BottomRow%, RightCol%, Frame%, VAttr%)
Y1% = TopRow%
X1% = LeftCol%
Y2% = BottomRow%
X2% = RightCol%
tmp% = X2% - X1% + 1
IF Frame% AND 1 THEN
TopSt$ = STRING$(tmp%, "─")
ELSE
TopSt$ = STRING$(tmp%, "═")
END IF
MidSt$ = SPACE$(tmp%)
BotSt$ = TopSt$
SELECT CASE Frame%
CASE 1
TopSt$ = "┌" + TopSt$ + "┐"
MidSt$ = "│" + MidSt$ + "│"
BotSt$ = "└" + BotSt$ + "┘"
CASE 2
TopSt$ = "╔" + TopSt$ + "╗"
MidSt$ = "║" + MidSt$ + "║"
BotSt$ = "╚" + BotSt$ + "╝"
CASE 3
TopSt$ = "╓" + TopSt$ + "╖"
MidSt$ = "║" + MidSt$ + "║"
BotSt$ = "╙" + BotSt$ + "╜"
CASE 4
TopSt$ = "╒" + TopSt$ + "╕"
MidSt$ = "│" + MidSt$ + "│"
BotSt$ = "╘" + BotSt$ + "╛"
CASE 5
TopSt$ = STRING$(tmp% + 2, "▄")
MidSt$ = "▌" + MidSt$ + "▐"
BotSt$ = STRING$(tmp% + 2, "▀")
CASE ELSE
TopSt$ = SPACE$(tmp% + 2)
MidSt$ = TopSt$
BotSt$ = TopSt$
END SELECT
Col% = X1% - 1
DXQPrint DSeg%, DOfs%, TopSt$, Y1%, Col%, VAttr%
FOR Row% = Y1% TO Y2%
DXQPrint DSeg%, DOfs%, MidSt$, Row%, Col%, VAttr%
NEXT
DXQPrint DSeg%, DOfs%, BotSt$, Y2% + 1, Col%, VAttr%
END SUB