IUP
view release on metacpan or search on metacpan
lib/IUP/FileDlg.pod view on Meta::CPAN
=over
=item B<FILE_CB>
Action generated when a file is selected. Not called when
DIALOGTYPE=DIR. When MULTIPLEFILES=YES it is called only for one file.
Can be used with SHOWPREVIEW=NO also. (Windows only in 2.x)
B<Callback handler prototype:>
sub file_cb_handler {
my ($self, $file_name, $status) = @_;
#...
}
=over
B<$self:> reference to the element (IUP::FileDlg) that activated the event
B<$file_name:> name of the file selected.
B<$status:> describes the action. Can be:
=over
=item * "INIT" - when the dialog has started. $file_name is C<undef>.
=item * "FINISH" - when the dialog is closed. $file_name is C<undef>.
=item * "SELECT" - a file has been selected.
=item * "OTHER" - an invalid file or a directory is selected. $file_name
is the one selected. (Since iup-3.0)
=item * "OK" - the user pressed the OK button. If returns IUP_IGNORE
the action is refused and the dialog is not closed.
=item * "PAINT" - the preview area must be redrawn. Used only when
SHOWPREVIEW=YES. If an invalid file or a directory is selected,
file_name is C<undef>.
=back
=back
=item L<HELP_CB|IUP::Manual::04_Callbacks/HELP_CB>
Action generated when the Help button is pressed.
=back
=head1 NOTES
The L<IUP::FileDlg|IUP::FileDlg> is a native pre-defined dialog that is not altered by
L<SetLanguage|IUP/"SetLanguage()">.
To show the dialog, use function L<Popup|IUP::Manual::02_Elements/"Popup()">.
The dialog is mapped only inside L<Popup|IUP::Manual::02_Elements/"Popup()">, L<Map|IUP::Manual::02_Elements/"Map()"> does nothing.
The L<GetFile|IUP/"GetFile()"> function simply creates and popup a L<IUP::FileDlg>.
In Windows, the FILE and the DIRECTORY attributes also accept strings
containing "/" as path separators, but the VALUE attribute will always
return strings using the "\" character.
In Windows, the dialog will be modal relative only to its parent or to
the active dialog.
=head1 EXAMPLES
The element B<IUP::FileDlg> is used in the following sample scripts:
=over
=item * L<0-basic/filedlg.pl|https://metacpan.org/source/KMX/IUP-0.305/examples/0-basic/filedlg.pl> - IUP::FileDlg example
=item * L<0-basic/pre-dialogs.pl|https://metacpan.org/source/KMX/IUP-0.305/examples/0-basic/pre-dialogs.pl> - IUP::Expander example
=back
=head1 SEE ALSO
L<Message|IUP/"Message()">, L<IUP|/"GetParam()">,
L<ListDialog|IUP/"ListDialog()">, L<Alarm|IUP/"Alarm()">,
L<GetFile|IUP/"GetFile()">, L<Popup|IUP::Manual::02_Elements/"Popup()">
The original doc: L<iupfiledlg.html|http://www.tecgraf.puc-rio.br/iup/en/dlg/iupfiledlg.html>
=cut
( run in 1.093 second using v1.01-cache-2.11-cpan-364913b4093 )