home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ARM Club 3
/
TheARMClub_PDCD3.iso
/
hensa
/
desktop
/
iconthang_2
/
!IconThang
/
UnCrunched
(
.txt
)
< prev
Wrap
RISC OS BBC BASIC V Source
|
1997-09-26
|
24KB
|
1,089 lines
><iconthang$dir>.!RunImage
?MS%=8096 :
This is the amount of menu area, edit at will.
0NA%=256 :
This is the max number of items
?ME%=15 :
This is the number of icon/menus there can be.
vsn$="3.49b":vsn$=vsn$
taskname$="IconThang"
dirname$="<iconthang$dir>"
config$=dirname$+".config"
maintitle$="unset"
error_open% = 0
clear_error_time% = 0
"OS_Byte",129,0,&FF
,osv%:RO35%=osv%>&A4
nagg(
$+" at line "+
taskid% 8:$taskid%="TASK"
"Wimp_Initialise",200,!taskid%,taskname$
version%,taskhand%
block% 1024,menuarea% MS%,menuptr%(ME%-1),mname$(ME%-1),fullname$(NA%),leaf$(NA%),items_base%(ME%-1)
indmenptr%=0:indmenlim%=2048
indmen% indmenlim%
"OS_ReadModeVariable",-1,4
,,xeig%
"OS_ReadModeVariable",-1,5
,,yeig%
4hires%=(xeig%=yeig%)
(xeig%<2):title%=hires%=0
.oldres%=hires%:modechanged%=
:pointerin%=
autoiconsprite%=
openatleft%=
fudge_deskfont%=
.old_desk_font$=
OS_ReadVarVal("Wimp$Font")
"Hourglass_On"
#(sprites22%=
loadsprites("Sprites22")
$(sprites24%=
loadsprites("Sprites24")
templates
initmenus
hires%
mwin%=main%
mwin%=mait%
"Hourglass_Off"
openmain(-1)
+Jpollmask%=1:
error_txt("My
IconThang comes
crashing
through! "+
bfree)
"OS_ReadMonotonicTime"
acurist%
error_open%
acurist%>=clear_error_time%
!block%=error_win%
1#
"Wimp_CloseWindow",,block%
error_open%=
pollmask%
error_open%
max_time%=clear_error_time%-acurist%
max_time%=100
max_time%<0
max_time%=1
max_time%>100
max_time%=100
"Wimp_PollIdle",0,block%,acurist%+max_time%
reason%
"Wimp_Poll",0,block%
reason%
reason%
0 :
pointerin%
checkicn
1 :
redraw_window
2 :
open_window
3 :
"Wimp_CloseWindow",,block%
9 :
menuclick(block%)
6 :
iconclicked(block%!12,block%!16)
4 : pollmask%=1:pointerin%=
5 : pollmask%=0:pointerin%=
17,18:
user_message
19 :
user_message_acknowledge
pointerin%=
tbareek
open_window
O(
!block%=main%
!block%=mait%
P.
openfudge
Q.
R0
"Wimp_OpenWindow",,block%
nagg(nagg$)
X7
"Wimp_ReportError"," "+nagg$,1<<4,taskname$
\,
"Wimp_CloseDown",taskhand%,!taskid%
user_message
block%!16
&400C1:
modechange
user_message_acknowledge
block%!16
j
recieve_dataopen
file(where%)
file$=""
?where%>31
file$+=
(?where%)
where%+=1
=file$
exists(a$)
a$,1)="*"
z!
"XOS_File",17,a$
t%;F%
t%=2
t%=3
t%=0
initmenus
indmenptr%=0
E i%=
initmenu(menuarea%,"IconThang "+vsn$):menuptr%(0)=menuarea%
. i%=
additem(i%,"Auto sprite change",0,7)
RO35%
additem(i%,"Auto font change",0,7)
" i%=
additem(i%,"On LHS",0,7)
dlineprev(i%)
' i%=
additem(i%,"Edit Config",0,7)
) i%=
additem(i%,"Reload Config",0,7)
dlineprev(i%)
H i%=
additem(i%,"Force !Sprites22",0,
exists("Sprites:!Sprites22"))
D i%=
additem(i%,"Force !Sprites",0,
exists("Sprites:!Sprites"))
RO35%
1 i%=
additem(i%,"Force outline font",0,7)
0 i%=
additem(i%,"Force system font",0,7)
dlineprev(i%)
" i%=
additem(i%,"Quit",-1,11)
menuarea%!16=16*18+16
& menunum%=0:appctr%=0:longname%=0
file%=
(config$)
menu$=
getline(file%)
3 autoiconsprite%=
menu$,1)="y"
menu$,1)="Y"
tick(menuarea%,"Auto sprite change",autoiconsprite%)
menu$=
getline(file%)
/ openatleft%=
menu$,1)="L"
menu$,1)="l"
tick(menuarea%,"On LHS",openatleft%)
menu$=
getline(file%)
menu$,9)<>"Fontmung "
fudge_deskfont%=
< fudge_deskfont%=
menu$,10,1)="Y"
menu$,10,1)="y"
F
RO35%
tick(menuarea%,"Auto font change",fudge_deskfont%)
menu$=
getline(file%)
"Hourglass_On"
#file%
menunum%+=1
M
menunum%=ME%
#file%:
nagg("Menu/Icon count overrun! -POP-"):
menuptr%(menunum%)=i%
longname%=
(menu$)
sprite$=
getline(file%)
M
changeval(main%,menunum%+1,"s"+sprite$):
*** 3.43 *** +1 to icn num
M
changeval(mait%,menunum%+1,"s"+sprite$):
*** 3.43 *** +1 to icn num
( mname$(menunum%)=
getline(file%)
i%=
initmenu(i%,menu$)
item$=
getline(file%)
7 items_base%(menunum%) = appctr%:
*** 3.43 ***
gotfitem%=
item$<>"**"
(item$<>"-")
menu_text$=""
item$,1)="\"
$ sslash%=
item$,"\",2)
( sslash% )
0 menu_text$=
item$,2,sslash%-2)
8 item$=
item$,
(item$)-
(menu_text$)-2)
:
"Hourglass_Percentage",(100*
#file%)/
#file%
" leaf$=
leafname(item$)
D
leaf$=item$
item$,1)="*"
leaf$=
item$,
(item$)-1)
J
appctr%>NA%
#file%:
nagg("Item count overrun! Bye!"):
9 leaf$(appctr%)=leaf$:fullname$(appctr%)=item$
* appctr%+=1:col%=
exists(item$)
.
menu_text$=""
menu_text$=leaf$
?
(menu_text$)>longname%
longname%=
(menu_text$)
! item$=
getline(file%)
6 i%=
additem(i%,menu_text$,item$="**",col%)
gotfitem%=
! item$=
getline(file%)
6
item$<>"**"
gotfitem%
dlineprev(i%)
0 !(menuptr%(menunum%)+16)=16*longname%+24
menu$=
getline(file%)
#file%
"Hourglass_Percentage",0
"Hourglass_Off"
getline(f%)
a$=
( a$<>""
a$,1)<>"#" )
a$,1)="#"
a$=""
="***EOF***"
popupmenu(menu%)
"Wimp_GetPointerInfo",,block%
?q=!block%:w=block%!4:w%=block%!12:i%=block%!16:w=menutop%-8
title%
w-=4
(block%!8
menu%<0
menu%=0:w+=96
menu%>=0
menu%<ME%
"Wimp_CreateMenu",,menuptr%(menu%),q-64,w-32
2 lastmenu%=menuptr%(menu%):menx%=q-64:meny%=w
frontback
templates
buffer%=block%
indirect% 800:wl%=indirect%+800
"Wimp_OpenTemplate",,dirname$+".templates"
main window (high res)
"Wimp_LoadTemplate",,buffer%,indirect%,wl%,-1,"main",0
,,indirect%
C buffer%!64=sprites22%:
"Wimp_CreateWindow",,buffer%
main%
B width22%=buffer%!8-buffer%!0:height22%=buffer%!12-buffer%!4
main window (low res)
"Wimp_LoadTemplate",,buffer%,indirect%,wl%,-1,"maint",0
,,indirect%
C buffer%!64=sprites24%:
"Wimp_CreateWindow",,buffer%
mait%
B width24%=buffer%!8-buffer%!0:height24%=buffer%!12-buffer%!4
error report window
"Wimp_LoadTemplate",,buffer%,indirect%,wl%,-1,"error",0
,,indirect%
"Wimp_CreateWindow",,buffer%
error_win%
"Wimp_CloseTemplate"
loadsprites(name$)
file%=
(dirname$+"."+name$)
file%=0
nagg("Can't find spritefile '"+name$+"'"):
5S%=(
#file%)+1024:
for possible future expansion
#file%
sprites% S%
sprites%!0=S%
sprites%!8=16
"OS_SpriteOp",9+256,sprites%
"OS_SpriteOp",10+256,sprites%,dirname$+"."+name$
=sprites%
reloadsprites(sprites%,name$)
"OS_SpriteOp",10+256,sprites%,dirname$+"."+name$
openmain(where%)
"OS_ReadModeVariable",-1,4
,,xeig%
"OS_ReadModeVariable",-1,5
,,yeig%
6 hires%=(xeig%=yeig%)
(xeig%<2):title%=hires%=0
hires%
mwin%=main%
mwin%=mait%
!block%=mwin%
"Wimp_GetWindowState",,block%
/ mhig%=
read_mode(-1,12)<<
read_mode(-1,5)
/ mwid%=
read_mode(-1,11)<<
read_mode(-1,4)
hires%
* width%=width22%:height%=height22%
* width%=width24%:height%=height24%
width%=(block%!52)-(block%!44):REM was (block%!12)-(block%!4)
height%=(block%!56)-(block%!48):REM was (block%!16)-(block%!8)
block%!4=mwid%-width%
openatleft%
block%!4=0 :
**** NEW *****
! block%!12=(block%!4)+width%
block%!8=mhig% - height%
menutop%=mhig% - height%
# block%!16=block%!8+height%
where%
block%!28=where%
"Wimp_OpenWindow",,block%
openfudge
)/ mhig%=
read_mode(-1,12)<<
read_mode(-1,5)
*/ mwid%=
read_mode(-1,11)<<
read_mode(-1,4)
hires%
,* width%=width22%:height%=height22%
.* width%=width24%:height%=height24%
width%=(block%!12)-(block%!4)
height%=(block%!16)-(block%!8)
block%!4=mwid%-width%
openatleft%
block%!4=0 :
**** NEW *****
4! block%!12=(block%!4)+width%
block%!8=mhig% - height%
menutop%=mhig% - height%
7 block%!16=block%!8+height%
posn%=block%!28
"Wimp_OpenWindow",,block%
modechanged%
;0
hires%
!block%=mait%
!block%=main%
<$
"Wimp_CloseWindow",,block%
openmain(posn%)
modechanged%=
changeval(window%,icon%,to$)
nagg(
$+" changing val ("+
window%+"/"+
icon%+") to "+to$):
!block%=window%
block%!4=icon%
"Wimp_GetIconState",,block%
$(block%!32)=to$
block%!8=0
block%!12=0
"Wimp_SetIconState",,block%
menuclick(brtnd%)
menu_item%=!brtnd%
Q( menu_number% =
menunum(lastmenu%)
"Wimp_GetPointerInfo",,brtnd%+32
adjust%=(brtnd%!40)
menu_number% = 0
W9
"Wimp_DecodeMenu",,lastmenu%,block%,block%+32
X item$=
file(block%+32)
item$
"Quit" :
[+
adjust%=0
(-2)=0)
\0
filer_opendir("<ICONTHANG$DIR>")
]G
fod$="Filer_OpenDir "+FNOS_ReadVarVal("ICONTHANG$DIR")
^"
SYS"XOS_CLI",fod$
`$
"Auto sprite change" :
a1 autoiconsprite%=
(autoiconsprite%)
bD
tick(lastmenu%,"Auto sprite change",autoiconsprite%)
"On LHS" :
d) openatleft%=
(openatleft%)
e4
tick(lastmenu%,"On LHS",openatleft%)
openmain(0)
"Edit Config" :
h"
Filer_Run(config$)
"Reload Config" :
"Hourglass_On"
initmenus
l#
updatewindow(main%)
m#
updatewindow(mait%)
n5
reloadsprites(sprites22%,"Sprites22")
o5
reloadsprites(sprites24%,"Sprites24")
pF
error_txt("Configuration Reloaded"+
160+"OK. "+
bfree)
openmain(0)
r
"Hourglass_Off"
s"
"Force !Sprites22" :
t.
doiconsprites("22",sprites22%)
u'
SYS"Wimp_SetMode",MODE
redraw_screen
w
"Force !Sprites" :
x<
force24:
cuz Iconsprites will bugger it up.
y3
error_txt("Iconsprites changed OK")
z'
SYS"Wimp_SetMode",MODE
redraw_screen
|
"Auto font change"
}1 fudge_deskfont%=
(fudge_deskfont%)
~B
tick(lastmenu%,"Auto font change",fudge_deskfont%)
"
"Force outline font"
fudge_font(
!
"Force system font"
fudge_font(
*
action(menu_number%,menu_item%)
adjust%
"Wimp_CreateMenu",,lastmenu%,menx%,meny%
force24
"XOS_SpriteOp",36+256,sprites24%,"is_ptr",%0000001,0,0,0,0
SYS"Hourglass_Off"
"XWimp_SpriteOp",11,,"Sprites:!Sprites"
E%;F%
"XOS_CLI","Pointer"
error_swi(E%)
DEF PROCopenwindowxy(window%,x%,y%)
!block%=window%
SYS"Wimp_GetWindowState",,block%
!block%=window%
SYS"Wimp_GetWindowInfo",,block%
width%=(block%!12)-(block%!4)
hite%=(block%!16)-(block%!8)
block%!4=x%
block%!12=(block%!4)+width%
block%!16=y%
block%!8=(block%!16)-hite%
block%!28=-1
SYS"Wimp_OpenWindow",,block%
ENDPROC
read_mode(mode%,var%)
"OS_ReadModeVariable",mode%,var%
,,value%
=value%
leafname(name$)
leaf$=""
name$<>""
name$,1)<>"."
name$,1)<>":"
leaf$=
name$,1)+leaf$
name$=
name$)
=leaf$
pad(num%)
" "+
(num%),4)
OS_ReadVarVal(A$)
L%,a%
"XOS_ReadVarVal",A$,block%,128,0,3
,,L%;F%
2A$="":a%=0:
a%<L%:A$=A$+
(block%?a%):a%+=1:
iconclicked(window%,icon%)
icon%-=1:
*** 3.43 ***
window%=main%
window%=mait%
popupmenu(icon%)
initmenu(menu%,menuname$)
(menuname$)<13
5 $menu%=menuname$: :
menu title
indirect_title_flag%=
(indmenptr%+
(menuname$)+1) >= indmenlim%
A
nagg("Too many menu items longer than 12 characters!")
# menu%!0 = indmen%+indmenptr%
menu%!4 = 0
menu%!8 =
(menuname$)+1
& $(indmen%+indmenptr%)=menuname$
B indmenptr% = (indmenptr%+
(menuname$)+1) :
+5) AND NOT(3)
indirect_title_flag%=
Emenu%?12=7:menu%?13=2 :
title foreground & background
Emenu%?14=7:menu%?15=0 :
menu foreground & background
menu%!16=6*16
2menu%!20=44 :
width & height of items
@menu%!24=0 :
vertical gap twixt items
=menu%+28
additem(menu%,text$,last%,col%)
(menu%+24)>(menuarea%+MS%)
#file%:
nagg("Menu area overrun! Goodbye, scnhif."):
last%
!menu%=128
!menu%=0
indirect_title_flag%
!menu% = !menu%
(1<<8)
indirect_title_flag%=
menu%!4=-1
5menu%!8=&1000000*col%+&21 :
was menu%!8=&7000021
(text$)<13
$(menu%+12)=text$
(indmenptr%+
(text$)+1) >= indmenlim%
A
nagg("Too many menu items longer than 12 characters!")
$ menu%!12 = indmen%+indmenptr%
menu%!16 = 0
menu%!20 =
(text$)+1
" $(indmen%+indmenptr%)=text$
< indmenptr% = (indmenptr%+
(text$)+1):
+5) AND NOT(3)
# menu%!8 = (menu%!8)
(1<<8)
=menu%+24
action(menu%,item%):
*** 3.43 *** (replacement)
' check% = items_base%(menu%)+item%
thing$=fullname$(check%)
thing$,1)="*"
p$=
path(thing$)
6
"XWimp_StartTask",
(p$)-1)+leaf$(check%)
Filer_Run(thing$)
path(a$)
a$,1)<>"."
a$<>"":a$=
(a$)-1):
title(title$)
maintitle$<>title$
maintitle$=title$
hires%
redraw_height%=32
" redraw_width%=width22%
redraw_window%=main%
redraw_height%=40
" redraw_width%=width24%
redraw_window%=mait%
K
force_redraw(redraw_window%,4,-redraw_height%,redraw_width%-8,-4)
!block%=redraw_window%
.
"Wimp_RedrawWindow",,block%
more%
more%
draw_window
*****************************************************
IF maintitle$=title$ THEN ENDPROC
IF title% THEN
$maint_title_addr% = title$
!block% = mait%
SYS "Wimp_GetWindowState",,block%
winht%=block%!16-block%!8+4
SYS "Wimp_GetWindowOutline",,block%
SYS "Wimp_ForceRedraw",-1,block%!4,block%!8+winht%,block%!12,block%!16
ELSE
PROCoutput("title")
GCOL0,0:RECTANGLE FILL 0,0,658,24
GCOL0,7
xxx%=325-LEN(title$)*8
VDU5:MOVE xxx%,20:PRINT title$
PROCoutput("")
!block% = main%
block%!4 = 16
SYS "Wimp_GetIconState",,block%
winht%=block%!12
SYS "Wimp_GetWindowOutline",,block%
SYS "Wimp_ForceRedraw",-1,block%!4+12,block%!16+winht%,block%!12-12,block%!16
ENDIF
maintitle$=title$
ENDPROC
*****************************************************
checkicn
"Wimp_GetPointerInfo",,block%
+% winh%=block%!12:icnh%=block%!16
icnh%-=1 :
*** 3.43 ***
((winh%<>main%)
(winh%<>mait%))
(icnh%<1)
(icnh%>=ME%)
.4 t$="Iconthang V"+vsn$+"
Musus Umbra '95-7"
0- t$=mname$(icnh%):
$(menuptr%(icnh%))
title(t$)
output(sprite$)
sprite$=""
"OS_SpriteOp",or0%,or1%,or2%,or3%
"OS_SpriteOp",256+61,sprites22%,sprite$,0
or0%,or1%,or2%,or3%
frontback
hires%
!block%=main%
!block%=mait%
"Wimp_GetWindowState",,block%
unc%=(block%!28)=-1
unc%
block%!28=-2
block%!28=-1
"Wimp_OpenWindow",,block%
modechange
"OS_ReadModeVariable",-1,4
,,xeig%
"OS_ReadModeVariable",-1,5
,,yeig%
H6 hires%=(xeig%=yeig%)
(xeig%<2):title%=hires%=0
hires%
mwin%=main%
mwin%=mait%
oldres%=hires%
oldres%=hires%
hires%
suffix$="22"
suffix$="":
but I think 24 is nicer...
hires%
psa%=sprites22%
psa%=sprites24%
autoiconsprite%
doiconsprites(suffix$,psa%)
RO35%
fudge_deskfont%
fudge_font(hires%)
P' modechanged%=
:maintitle$="Eeek!"
doiconsprites(suffix$,psa%)
"OS_SpriteOp",36+256,psa%,"is_ptr",%0000001,0,0,0,0
SYS"Hourglass_On"
"XOS_CLI","Iconsprites sprites:!Sprites"+suffix$
"XOS_CLI","Pointer"
SYS"Hourglass_Off"
error_txt("Iconsprites changed OK")
uptime
"OS_ReadMonotonicTime"
T%=t%/100
3600)+"h"+
qq((T%
60)+"m":
+FNqq(T%MOD60)+"s"
qq(x%)=
x%,2)
tbareek
"Wimp_SlotSize",-1,-1
,next%,free%
next%>free%
next%=free%
f3t$="Next="+
(next%
1024)+"/"+
(free%
1024)+"K "
g/t$+="Time="+
$,17,5):
,8 for seconds too!
t$+=" (Up "+
uptime+")"
title(t$)
tick(menu%,text$,tick%)
menu%+=4
menu%+=24
p# flags%=menu%!8:last%=!menu%
q=
flags%
(1<<8)
mt$=$(menu%!12)
mt$=$(menu%+12)
mt$=text$
last%=128
mt$<>text$
nagg("Error - can't (un)tick '"+text$+"' in menu cuz it doesn't exist!"):
tick%
!menu%=last%
1<<0
!menu%=last%
(1<<0)
updatewindow(window%)
"Wimp_ForceRedraw",window%,0,-1E9,1E9,0
dlineprev(mt%)
fptr%=mt%-24
!fptr% = !fptr%
menunum(v%)
M%<ME%
v%=menuptr%(M%)
M%+=1
"Wimp_ReportError"," Bad menu?",1
Filer_Run(a$)
(-1)
shift_run(a$):
(-3)
alt_run(a$):
filer_run(a$)
filer_run(a$)
Ick!
! !block%=(44+
(a$)+5)
) block%!12 = 0 :
original message
! block%!16 = 5 :
DataOpen
hires%
block%!20=main%
block%!20=mait%
window handle of filer
! block%!28 = 0 :
x offset
! block%!32 = 0 :
y offset
block%!36 = 0
"XOS_File",17,a$
t%,,l%;F%
error_swi(t%):
(t%=1
t%=3)
(-1)
t%=1:l%=&FFFFFF00
/
error_txt("'"+a$+"' not found"):
-
(l%
&FFF00000) = &FFF00000
. block%!40 = ((l%
&FFF00)>>8)
- block%!40 = &3000 :
untyped
2,3 :
*
leafname(a$),1)="!" )
! block%!40 = &2000
! block%!40 = &1000
$(block%+44)=a$+
"Wimp_SendMessage",18,block%,0:
broadcast
recieve_dataopen
( block%!4 ) <> taskhand%
( block%!12 ) <> 0
block%!12 = block%!8
file$=
file(block%+44)
E%=0:F%=0
block%!40
&3000 :
5
"XWimp_StartTask","Run "+file$
E%;F%
&2000 :
5
"XWimp_StartTask","Run "+file$
E%;F%
&1000 :
"
filer_opendir(file$)
;
SYS"XOS_CLI","Filer_OpenDir "+file$ TO E%;F%
O
"XWimp_StartTask","@RunType_"+
hex3(block%!40)+" "+file$
E%;F%
error_swi(E%)
filetype(a$)
"XOS_File",17,a$
t%,,l%
0 : = 0
1 :
(l%
&FFF00000) = &FFF00000
=((l%
&FFF00)>>8)
=&3000 :
untyped
2,3 :
2
leafname(a$),1)="!" )
= &2000
= &1000
= &4000
hex3(v%)=
"000"+
~v%,3)
to be called in response to a poll reason code of RedrawWindow (1)
redraw_window
"Wimp_RedrawWindow",,block%
more%
more%
draw_window((!block%=main%)
(!block%=mait%))
force_redraw(window%,minx%,miny%,maxx%,maxy%)
"Wimp_ForceRedraw",window%,minx%,miny%,maxx%,maxy%
to be called after a Wimp_RedrawWindow or Wimp_UpdateWindow (that has
just returned a non-zero 'more' flag. 'block%' is expected to be the
block used. la-de-dah.
draw_window(title%)
"OS_ReadModeVariable",-1,4
,,xeig%
"OS_ReadModeVariable",-1,5
,,yeig%
osw%=1<<xeig%
osh%=1<<yeig%
min_x% = block%!4
min_y% = block%!8
# max_x% = block%!12-1:
-osw%
# max_y% = block%!16-1:
-osh%
scroll_x% = block%!20
scroll_y% = block%!24
title%
cwidth%=16/osw%
cheight%=16/osh%
5
hires%
23,17,7,%10,cwidth%;cheight%;0,0
more%=
more%
title%
B
and now we can print the title string appropriately
!
"Wimp_SetColour",7
L%=16*
(maintitle$)
4
min_x%+(max_x%-min_x%-L%)
2,max_y%-8
maintitle$
7
the 3D border is identical for both windows
"Wimp_SetColour",4
9
min_x%,min_y%:
max_x%,min_y%:
max_x%,max_y%
1
min_x%+2,min_y%+2:
max_x%-2,min_y%+2
max_x%-2,max_y%-2
"Wimp_SetColour",0
;
min_x%,min_y%:
min_x%,max_y%:
max_x%-2,max_y%
4
min_x%+2,min_y%+osh%:
min_x%+2,max_y%-2
max_x%-4,max_y%-2
/
"Wimp_GetRectangle",,block%
more%
title%
8
hires%
23,17,7,%10,cwidth%;cheight%*2;0,0
error_swi(E%)
error_txt(
file(E%+4))
error_txt(a$)
error_open% =
"OS_ReadMonotonicTime"
now%
! clear_error_time%=now%+250
!block%=error_win%
"Wimp_GetWindowInfo",,block%
$ $(block%!112)=
a$,block%!116)
"OS_ReadModeVariable",-1,4
,,xeig%
"OS_ReadModeVariable",-1,5
,,yeig%
"OS_ReadModeVariable",-1,11
,,xsize%
"OS_ReadModeVariable",-1,12
,,ysize%
xsize%=xsize%<<xeig%
ysize%=(ysize%<<yeig%)
& ewidth% = block%!12 - block%!4
& eheight% = block%!16 - block%!8
!& block%!4 = (xsize%-ewidth%)
"' block%!8 = (ysize%-eheight%)
## block%!12 = block%!4+ewidth%
$$ block%!16 = block%!8+eheight%
block%!28 = -1
&"
"Wimp_OpenWindow",,block%
fudge_font(font%)
font%
,A
old_desk_font$<>""
"Set Wimp$Font "+old_desk_font$
.8 new_old_desk_font$=
OS_ReadVarVal("Wimp$Font")
/F
new_old_desk_font$<>""
old_desk_font$=new_old_desk_font$
0#
"Set Wimp$Font "+
2D !block%=0:block%!12=0:block%!16=&400CF:
font changed message
33
"Wimp_SendMessage",17,block%,0:
broadcast
redraw_screen
8*
"Wimp_ForceRedraw",-1,0,0,1E9,1E9
bfree
=;="("+
)+"/"+
(indmenlim%-indmenptr%)+"
bytes
free)"
shift_run(a$)
A!
"XOS_File",17,a$
t%;F%
B"
error_swi(t%):
D$
2,3 :
filer_opendir(a$)
E
1 :
filer_run(a$)
F2
0 :
error_txt("'"+a$+"' not found")
alt_run(a$)
a$=
path(a$)
shift_run(
(a$)-1))
filer_opendir(a$)
P7
"XOS_GSTrans",a$,block%,1024+(1<<29)
trm%;F%
Q$
error_swi(trm%):
?(trm%-1)=13:a$=$block%
S.
"XOS_CLI","Filer_Opendir "+a$
E%;F%
T
error_swi(E%)