home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ARM Club 3
/
TheARMClub_PDCD3.iso
/
hensa
/
filemanager
/
director_1
/
!Director
/
Menus
/
System
/
DoClose
(
.txt
)
< prev
next >
Wrap
RISC OS BBC BASIC V Source
|
1995-06-30
|
2KB
|
103 lines
>Director:Menus.DoClose
$+" at "+
"OS_GetEnv"
arg(in$,"-do","")
buffer_size%=1024
buffer% buffer_size%
)window% =
read("Director$Window"))
%icon% =
read("Director$Icon"))
"Wimp_Initialise",200,&4B534154,"Temp"
,handle%
do$
"Pin":
close
"Close":
close
"Iconise":
iconise
)
1,"Unknown operation '"+do$+"'"
"Wimp_CloseDown",handle%,&4B534154
"OS_Mouse"
x%,y%
path$=
read("Path")
%1
path$=""
1,"No path in this window"
x%-=90
x%<0
x%=0
()
"Pin <path> "+
(x%)+" "+
(y%+45)
close
buffer%!0 = window%
"Wimp_SendMessage",3,buffer%,window%,icon%
iconise
buffer%!0 = 20
buffer%!4 = handle%
buffer%!8 = 0
buffer%!12 = 0
buffer%!16 = 0
"Wimp_SendMessage",19,buffer%,window%,icon%
,,task_handle%
buffer%!0 = window%
"Wimp_GetWindowInfo",,buffer%
(buffer%!60)
&100
=K
"Wimp_TransferBlock",task_handle%,buffer%!76,handle%,buffer%,256
title$ =
0(buffer%)
title$ =
0(buffer%+76)
title$,1)=" "
title$=
title$,2)
a%=
title$," ")
title$=
title$,a%-1)
a%=
title$,".")
L#
title$=
title$,a%+1)
a%=0
buffer%!0 = 48
buffer%!4 = handle%
buffer%!8 = 1
buffer%!12 = 0
buffer%!16 = &400CA
buffer%!20 = window%
buffer%!24 = task_handle%
V! $(buffer%+28) =
title$,19)
R1+20 window handle
R1+24 task handle for task which owns the window
R1+28 20 Bytes of title string (last part of first word)
R1+48
"Wimp_SendMessage",17,buffer%,0,0
arg(str$,arg$,def$)
str$,arg$)
i=0
=def$
arg$+1
str$+" <"," ",i)
str$,i,j-i)
read(a$)
?buffer%=13
"XOS_ReadVarVal",a$,buffer%,buffer_size%,0,3
,,read%
buffer%?read%=13
=$buffer%
0(a%)
o s$=""
?a%>=32
s$+=
a%+=1