asllib
These functions open the standard requesters of the system’s
asl.library on the used screen: for a file, a drawer, a font or a
screen mode. They work in Amiga mode only. On a system without
asl.library, freqlib’s FileRequest$ gives a file requester of Blitz’s own.
MaxLen path$=160
MaxLen fname$=64
f$=ASLFileRequest$("Load picture",path$,fname$,"#?.iff")
If f$<>"" Then LoadBitMap 0,f$As with FileRequest$, path$ and fname$ must be string variables
with a MaxLen of at least 160 and 64; they give the drawer and the
name to start with and get the ones chosen.
Without asl.library, the file and drawer requesters return an empty
string, as they do when the user cancels.
Library number 80.
Commands
ASLFileRequest$
Opens the system’s file requester with the title Title$ and returns the full name of the file chosen, or an empty string if the user cancels. Pattern$ shows only the files that match it, such as #?.iff; x,y,w,h give the position and size of the requester, 20,20 and 280 by 160 without them.
Function, result $. Help text: Title$,Pathname$,Filename$ [,Pattern$] [,x,y,w,h]
4 forms:
$, &$, &$$, &$, &$, $$, &$, &$, .l, .l, .l, .l$, &$, &$, $, .l, .l, .l, .l
ASLFontRequest
Opens the system’s font requester and returns the address of a description of the font chosen, or 0 if the user cancels. The flags add the gadgets for 1 the pen, 2 the background pen, 4 the style, 8 the draw mode and 16 a choice of fixed width fonts only.
Function, result .l. Help text: enable flags (1=pen 2=bckgrnd 4=style 8=drawmode 16=fixedsize)
Arguments: .l
The description is a NewType with the fields name$ (a pointer to
the font’s name), ysize.w, style.b, flags.b, pen1.b,
pen2.b and drawmode.b; it stays the same for every call.
ASLPathRequest$
Opens the system’s requester for a drawer, with the title Title$, and returns the drawer chosen, or an empty string if the user cancels; x,y,w,h give its position and size.
Function, result $. Help text: Title$,Pathname$ [,x,y,w,h]
2 forms:
$, &$$, &$, .l, .l, .l, .l
ASLScreenRequest
Opens the system’s screen mode requester; the flags add the gadgets for 1 the width, 2 the height, 4 the depth, 8 the overscan and 16 the autoscroll. It returns 0 if the user cancels.
Function, result .l. Help text: enable flags (1=width 2=height 4=depth 8=overscan 16=scroll)
Arguments: .l
The address returned is that of a copy of the requester’s fields,
made before the requester is freed; it stays valid until the next
ASLScreenRequest.