From 46439007cf417cbd9ac8049bb4122c890097a0fa Mon Sep 17 00:00:00 2001 From: "Charles.Forsyth" Date: Fri, 22 Dec 2006 20:52:35 +0000 Subject: 20060303-partial --- man/2/selectfile | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 man/2/selectfile (limited to 'man/2/selectfile') diff --git a/man/2/selectfile b/man/2/selectfile new file mode 100644 index 00000000..7b28b236 --- /dev/null +++ b/man/2/selectfile @@ -0,0 +1,57 @@ +.TH SELECTFILE 2 +.SH NAME +selectfile \- +file browser +.SH SYNOPSIS +.EX +include "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 Selectfile +provides an interactive file browser for use by a +.IR wm (1) +application. +It allows a user to browse the +file system to select a file of a give type. +.PP +.B Init +should be called once to initialise the module's internal state. +.PP +.B Filename +makes 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.)\fP +If +.I parent +is nil, the panel is centred on the screen. +.I Dir +gives the directory where the file search should begin. +Only files that match +.I pat +are 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) + -- cgit v1.2.3