.\" Automatically generated by Pod::Man 4.07 (Pod::Simple 3.32) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .if !\nF .nr F 0 .if \nF>0 \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} .\} .\" ======================================================================== .\" .IX Title "FBox 3pm" .TH FBox 3pm "2015-05-03" "perl v5.24.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Tk::FBox \- a file dialog .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 2 \& use Tk::FBox; \& $file = $mw\->FBox(...)\->Show; .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\f(CW\*(C`Tk::FBox\*(C'\fR is the dialog implementation behind the \f(CW\*(C`getOpenFile\*(C'\fR, \&\f(CW\*(C`getSaveFile\*(C'\fR, and \f(CW\*(C`chooseDirectory\*(C'\fR method calls in the Unix/X11 world. As such, it supports all options for these methods and additionally: .ie n .IP "\-sortcmd => sub { $_[0] cmp $_[1] }" 4 .el .IP "\-sortcmd => sub { \f(CW$_\fR[0] cmp \f(CW$_\fR[1] }" 4 .IX Item "-sortcmd => sub { $_[0] cmp $_[1] }" Specified a callback for changing the sorting of the icons in the \&\f(CW\*(C`IconList\*(C'\fR widget. By default, perl's \f(CW\*(C`cmp\*(C'\fR operator will be used. .Sp From the source code: .Sp .Vb 4 \& # Using \-sortcmd is really strange :\-( \& # $top\->getOpenFile(\-sortcmd => sub { package Tk::FBox; uc $b cmp uc $a}); \& # or, un\-perlish, but useable (now activated in code): \& # $top\->getOpenFile(\-sortcmd => sub { uc $_[1] cmp uc $_[0]}); .Ve .Sp This is an experimental option! .ie n .IP "\-type => $type" 4 .el .IP "\-type => \f(CW$type\fR" 4 .IX Item "-type => $type" Type should be \*(L"open\*(R" for choosing existing files to open (default), \&\*(L"save\*(R" for choosing existing or non-existing files to save, or \*(L"dir\*(R" for choosing directories. .ie n .IP "\-filter => $glob" 4 .el .IP "\-filter => \f(CW$glob\fR" 4 .IX Item "-filter => $glob" A file glob to restrict displayed files. This is only active if no \&\fB\-filetypes\fR are defined. .ie n .IP "\-force => $bool" 4 .el .IP "\-force => \f(CW$bool\fR" 4 .IX Item "-force => $bool" If true, then there will be no dialog if a file already exists. .SH "COPYRIGHT" .IX Header "COPYRIGHT" The original tkfbox.tcl from Tcl/Tk is: .PP Copyright (c) 1994\-1996 Sun Microsystems, Inc. .PP See the file \*(L"license.terms\*(R" for information on usage and redistribution of this file, and for a \s-1DISCLAIMER OF ALL WARRANTIES.\s0 .PP Translated to Perl/Tk by Slaven Rezic . .SH "SEE ALSO" .IX Header "SEE ALSO" Tk::getOpenFile, Tk::IconList.