FLTK::file_chooser - File chooser widget for the Fast Light Tool Kit
dir_chooser
my $directory = FLTK::dir_chooser( $message, $directory, $relative );
Show a file chooser dialog and pick a directory.
Expected parameters include the $message in the titlebar, the initially selected $directory, and a boolean value which decides whether the returned value is relative (true) or absolute (false).
$message
$directory
Import this function with the :dialog or :default tags.
:dialog
:default
file_chooser
my $file = FLTK::file_chooser( $message, $pattern, $filename, $relative );
Pops up the file chooser, waits for the user to pick a file or Cancel, and then returns that filename or undef if Cancel is chosen.
$message is a string used to title the window.
$pattern is used to limit the files listed in a directory to those matching the pattern. This matching is done by filename_match( ). Use undef to show all files.
$pattern
filename_match( )
$filename is a default folder/filename to fill in the chooser with. If this ends with a '/' then this is a default folder and no file is preselected.
$filename
If $filename is undef, then the last filename that was choosen is used, unless the $pattern changes, in which case only the last directory is used. The first time the file chooser is called this defaults to a blank string.
The returned value points at a static buffer that is only good until the next time the file_chooser( ) is called.
file_chooser( )
file_chooser_callback
FLTK::file_chooser_callback( \&coderef );
This function is called every time the user navigates to a new file or directory in the file chooser. It can be used to preview the result in the main window.
Import this function with the :dialog tag.
Sanko Robinson <sanko@cpan.org> - http://sankorobinson.com/
Copyright (C) 2008-2010 by Sanko Robinson <sanko@cpan.org>
This program is free software; you can redistribute it and/or modify it under the terms of The Artistic License 2.0. See the LICENSE file included with this distribution or notes on the Artistic License 2.0 for clarification.
When separated from the distribution, all original POD documentation is covered by the Creative Commons Attribution-Share Alike 3.0 License. See the clarification of the CCA-SA3.0.
To install FLTK, copy and paste the appropriate command in to your terminal.
cpanm
cpanm FLTK
CPAN shell
perl -MCPAN -e shell install FLTK
For more information on module installation, please visit the detailed CPAN module installation guide.