home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ARM Club 3
/
TheARMClub_PDCD3.iso
/
hensa
/
desktop
/
finallook_1
/
!FinalLook
/
!FLConfig
/
!RunImage
(
.txt
)
< prev
next >
Wrap
RISC OS BBC BASIC V Source
|
1995-04-20
|
9KB
|
330 lines
> !RunImage for !FLConfig
By Matthew Godbolt
1995 templates by pixeleyes
See the !Help file for details
0,"Error during !FLConfig startup - "+
$+" at line "+
initialise
error("Internal error: ")
end%
0,"Error during !FLConfig finalisation - "+
$+" at line "+
finalise
initialise
primary_initialise
constants_initialise
files_initialise
wimp_initialise
options_initialise
primary_initialise
wimp_active%=
mouse_trapped%=
DoOnYes$=""
DoOnNo$=""
log%=0
end%=
$& config_fontname$="Trinity.Medium"
config_fontxsize%=190
config_fontysize%=210
config_textureson%=
config_fontson%=
config_directoryopen%=
config_removegreyblobs%=
+> config_texturepath$="<FinalLook$Dir>.WindowDrop.Default."
files_initialise
openfiles%(maxopenfiles%),openfiles$(maxopenfiles%)
filesopen%=0
constants_initialise
MaxInQueue=256
MaxRetr=7
MaxIndir=1.5*1024
8" Version$="0.01 (Development)"
input%=0
output%=1
input_and_output%=2
maxopenfiles%=32
options_initialise
@& NoteDelay = 400 :
4 seconds
wimp_initialise
WimpArea 1024, MesList 32, TemplateArea 1024, FontBlk 256
IndirArea MaxIndir
F@ TempBlk=TemplateArea:
can be used after template handling
G) P%=MesList:[OPT 2:EQUD &502:EQUD 0:]
!FontBlk=0
"Wimp_Initialise",300,&4B534154,"!FLConfig",MesList
,TaskHandle
"EqWimp_Sprites","<FLConfig$Dir>.Sprites"
SpriteArea
"EqWimp_Initialise","Configure,Style,Info,Alert,NoteHeader,Note", TemplateArea, IndirArea, IndirArea+MaxIndir-1, "<FLConfig$Dir>.Templates",SpriteArea,FontBlk
"EqWimp_InstallOnIconbar",eq,"!FLConfig",2,-1
,IconHandle
"EqWimp_LoadMenus",eq,"<FLConfig$Dir>.MenuData"
SYS "EqWimp_LoadHelpFile",eq,"MultiWeb:Messages"
"EqWimp_WriteStringToIcon",eq,"Info","Version",Version$
error%=
NoteOpen=
wimp_active%=
finalise
"EqWimp_Finalise",eq
"Wimp_CloseDown",TaskHandle,&4B534154
wimp_active%=
close_all_files
error(prepend$)
error%=
0,"Fatal error (Recursion in error handler) : "+
$+" at line "+
error%=
"EqWimp_WriteStringToIcon",eq,"Alert","Error",prepend$++
$+" at line "+
"EqWimp_PutAtFrontAndCentre",eq,"Alert"
"EqWimp_RestrictMouse",eq,"Alert"
mouse_trapped%=
error_fatal
"EqWimp_ReleaseMouse",eq
mouse_trapped%=
end%=
error_recover
"EqWimp_ShutWindow",eq,"Alert"
"EqWimp_RestoreCaret",eq
"EqWimp_ReleaseMouse",eq
mouse_trapped%=
error%=
Reason
"Wimp_PollIdle",,WimpArea,100
Reason
Reason
0 :
error%
null_event
1 :
redraw(WimpArea)
2 :
open_window(WimpArea)
3 :
close_window(WimpArea)
6 :
mouse_click(WimpArea)
8 :
keypress(WimpArea)
9 :
menu_select(WimpArea)
17,18,19 :
message(WimpArea)
message(Area)
Area!16
0 : end%=
WHEN &502 : SYS "EqWimp_HelpRequest",eq,Area
mouse_click(Area)
Window$,Icon$,mx%,my%,Button$
"EqWimp_MouseClick",eq,Area
,Window$,Icon$
"EqWimp_MouseInfo",eq
,mx%,my%,Button$
clicked(Window$,Icon$,mx%,my%,Button$)
clicked(Window$,Icon$,mx%,my%,Button$)
Useful%
Window$
"Iconbar" :
Button$
"Select" :
open_main
,
"Menu" :
open_iconbar_menu(mx%)
"
"Adjust" :
open_options
"Alert" :
Button$<>"Menu"
Icon$
&
"Continue" :
error_recover
$
"Quit" :
error_fatal
"Retrieve" :
Button$<>"Menu"
Icon$
'
"OK" :
start_retrieve
#
"Cancel" :
close_main
"Query" :
Button$<>"Menu"
Icon$
"
"Yes" :
query_yes
!
"No" :
query_no
Window$<>"Iconbar"
"EqWimp_UsefulButton",eq,Window$,Icon$
,Useful%
Useful%
"EqWimp_DragWindow",eq,Window$
open_main
file%,line$,com$
close_file(file%):
open_file(file%),"<FinalLook$Dir>.!Choices",input%)
#file%
line$=
readline(file%)
line$,1)<>"#"
# param$=
line$,
line$,":"+1))
line$,
line$,":")-1)
5
"FontName" : config_fontname$=param$
9
"FontXSize" : config_fontxsize%=
(param$)
9
"FontYSize" : config_fontysize%=
(param$)
?
"TexturesOn" : config_textureson%=(param$="Yes")
B
"DirectoryOpen" : config_directoryopen%=(param$="Yes")
D
"RemoveGreyBlobs" : config_removegreyblobs%=(param$="Yes")
8
"TexturePath" : config_texturepath$=param$
close_file(file%)
"EqWimp_PutAtFrontAndCentre",eq,"Configure"
"EqWimp_GrabCaret",eq,"Configure",-1
close_main
"EqWimp_ShutWindow",eq,"Configure"
"EqWimp_RestoreCaret",eq
"Wimp_CreateMenu",-1
icon_length(window$,icon$)
Text$
"EqWimp_ReadIconString",eq,window$,icon$
,Text$
(Text$)
open_iconbar_menu(mx%)
"EqWimp_OpenMenu",eq,"Ibar",mx%-64,-1
open_window(Area)
"EqWimp_OpenWindow",eq,Area
close_window(Area)
"EqWimp_CloseWindow",eq,Area
null_event
NoteOpen
> NoteCloseTime
"EqWimp_ShutWindow",eq,"Note"
NoteOpen=
notify(text$)
"EqWimp_WriteStringToIcon",eq,"Note","Note",text$
"EqWimp_PutAtFrontAndCentre",eq,"Note"
NoteOpen=
NoteCloseTime=
+NoteDelay
menu_select(Area)
menusel$,Button$
"EqWimp_DecodeMenu",eq,Area
,menusel$
("FNmenu_"+menusel$)
"EqWimp_MouseInfo",eq
,,,Button$
Button$="Adjust"
"EqWimp_ReopenMenu"
menu_Quit
end%=
redraw(Area)
Window$,More
"EqWimp_NameFromHandle",eq,!Area
,Window$
"Wimp_RedrawWindow",,Area
More
More :
Window$
+
"Configure" :
RedrawConfig(Area)
"Wimp_GetRectangle",,Area
More
readline(handle%)
string$,data%
data%=
#handle%
data%<>&0a string$+=
data%
data%=&0a
#handle%
=string$
strip(address)
string$
?address>31
string$+=
?address
address+=1
=string$
open_file(
handle%,filename$,type%)
close_file(handle%):
handle%=0
filesopen%=maxopenfiles%
1234,"Too many open files when opening "+filename$
type%
input% : handle%=
(filename$)
output% : handle%=
(filename$)
input_and_output% : handle%=
(filename$)
(% openfiles$(filesopen%)=filename$
)# openfiles%(filesopen%)=handle%
filesopen%+=1
status("Opened file "+filename$)
close_file(
handle%)
find%
handle%<>0
find%<filesopen%
handle%<>openfiles%(find%)
find%+=1
find%=filesopen%
57
1234,"Open file not found during file closing"
#handle%
8B
handle%<>log%
status("Closed file "+openfiles$(find%))
9=
heheheh! Can't write to log if we've just closed it!
filesopen%-=1
handle%=0
filesopen%>0
=0 openfiles%(find%)=openfiles%(filesopen%)
>0 openfiles$(find%)=openfiles$(filesopen%)
close_all_files
filesopen%<>0
N%=0
filesopen%-1
H"
close_file(openfiles%(N%))
keypress(Area)
Click%,Window$,Icon$,Release%
"EqWimp_ProcessKey",eq,Area
Click%,Window$,Icon$
Click%
"EqWimp_ClickOnIcon",eq,Window$,Icon$
Release%
clicked(Window$,Icon$,0,0,"Select")
Release%
"EqWimp_DeselectIcon",eq,Window$,Icon$
mouse_trapped%
"Wimp_ProcessKey",Area!24
RedrawConfig(Area)
"Wimp_SetColour",132