home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power-Programmierung
/
CD1.mdf
/
forth
/
compiler
/
fpc
/
source
/
sedwind.seq
< prev
next >
Wrap
Text File
|
1989-05-24
|
4KB
|
99 lines
\ SEDWIND.SEQ Editor window adjustment words
editor definitions
headerless
0 value zoomed?
: adjust-window ( --- )
begin
savescr
20 6 58 10 box&fill
." Adjust window size.. \r ESC \0 = done"
bcr bcr
." =Smaller window =Bigger window "
cursor-off key dup 27 <>
restscr
while dup 200 = \ UP arrow SMALLER WINDOW
if first.textcol 0=
if 1 =: first.textcol
cols 2- =: last.textcol
else
first.textline 2 <
if incr> first.textline
0 recoverline
incr> screenline
else last.textline 1- first.textline 2+ max
=: last.textline
then
then
then
208 = \ DOWN arrow BIGGER WINDOW
if first.textline 1 =
if 0 =: first.textcol
cols 1- =: last.textcol
else
last.textline rows 2- =
if first.textline 1- 1 max =: first.textline
decr> screenline
else last.textline 1+
rows 2- min =: last.textline
then
then
then scrshow on> ?border showstat
last.textline rows 1- <
if last.textline 2+ recoverline then
repeat drop
off> zoomed? \ next zoom goes to big window
tscrn scrshow \ move cursor to top of screen
on> ?border showstat
cursor-on ?cursor showcur ;
' adjust-window is adjwind
1 value first.textline.saved
24 value last.textline.saved
0 value first.textcol.saved
80 value last.textcol.saved
: zoom-window ( --- ) \ Zoom the window from current size to full size.
zoomed? dup 0= =: zoomed?
if \ IF we are already ZOOMed then zoom to small window
first.textline.saved =: first.textline
last.textline.saved =: last.textline
first.textcol.saved =: first.textcol
last.textcol.saved =: last.textcol
screenline first.textline max
last.textline min =: screenline
0 recoverline
scrshow on> ?border showstat
last.textline rows 2- <
if rows last.textline 2+
?do i recoverline
loop
then
else \ ELSE zoom to big window
first.textline =: first.textline.saved
last.textline =: last.textline.saved
first.textcol =: first.textcol.saved
last.textcol =: last.textcol.saved
1 =: first.textline
rows 1- =: last.textline
0 =: first.textcol
cols 1- =: last.textcol
first.textline.saved screenline =
if first.textline =: screenline
then
on> ?border showstat
scrshow
then ;
' zoom-window is zoomwind
headers
forth definitions