summaryrefslogtreecommitdiff
path: root/static/inferno/man2/selectfile.2
diff options
context:
space:
mode:
authorJacob McDonnell <jacob@jacobmcdonnell.com>2026-04-26 16:38:00 -0400
committerJacob McDonnell <jacob@jacobmcdonnell.com>2026-04-26 16:38:00 -0400
commit97d5c458cfa039d857301e1ca7d5af3beb37131d (patch)
treeb460cd850d0537eb71806ba30358840377b27688 /static/inferno/man2/selectfile.2
parentb89dc2331a50c63f8b33272a5c4c61ab98abdaa3 (diff)
build: Better Build System
Diffstat (limited to 'static/inferno/man2/selectfile.2')
-rw-r--r--static/inferno/man2/selectfile.257
1 files changed, 57 insertions, 0 deletions
diff --git a/static/inferno/man2/selectfile.2 b/static/inferno/man2/selectfile.2
new file mode 100644
index 00000000..7b28b236
--- /dev/null
+++ b/static/inferno/man2/selectfile.2
@@ -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)
+