Charles.Forsyth20060303-partialeea662d19 years agoHistory
57 lines · 1.3 KB · Text
RawDownload
.TH SELECTFILE 2.SH NAMEselectfile \-file browser.SH SYNOPSIS.EXinclude "selectfile.m";selectfile := load Selectfile Selectfile->PATH; init:        fn();filename:	fn(ctxt: ref Draw->Context, parent: ref Draw->Image,               title: string,               pat: list of string,               dir: string): string;.EE.SH DESCRIPTION.B Selectfileprovides an interactive file browser for use by a.IR wm (1)application.It allows a user to browse thefile system to select a file of a give type..PP.B Initshould be called once to initialise the module's internal state..PP.B Filenamemakes a dialog panel for selecting a file.It is created in the graphics context.IR ctxt ,near the northeast corner of a given parent window,.IR parent ,represented by that window's Image.(If the parent window is a Tk Toplevel.IR t ,for instance, the appropriate value is.IB t .image \f1.)\fPIf.I parentis nil, the panel is centred on the screen..I Dirgives the directory where the file search should begin.Only files that match.I patare displayed.The returned string is the name of the selected file,or the empty string if no file was selected..SH SOURCE.B /appl/lib/selectfile.b.SH SEE ALSO.IR dialog (2),.IR dividers (2),.IR draw-context (2),.IR tabs (2),.IR tk (2),.IR wmlib (2)