Gtk2::E...iewFile(3)
β¨ NAME β¨
Gtk2::Ex::Dialogs::ChoosePreviewFile β bestie, it's a whole file selection dialog π (and yeah, the manpage name got chopped to Gtk2::E...iewFile but we know the truth, ok?)
πΈ SYNOPSIS πΈ
use Gtk2::Ex::Dialogs::ChoosePreviewFile ( destroy_with_parent => TRUE,
modal => TRUE );
# do some stuff like creating your app's main $window then,
# to ensure that all messages use the right parent, set it:
$Gtk2::Ex::Dialogs::ChoosePreviewFile::parent_window = $window;
# now popup a new dialog for opening a file
my $file = ask_to_open
Gtk2::Ex::Dialogs::ChoosePreviewFile ( "/path/to/something" );
# ok, now we need to save (as...) a file
my $save = ask_to_save
Gtk2::Ex::Dialogs::ChoosePreviewFile ( "/path/to/something" );
π¦ DESCRIPTION π¦
So basically this module hands you a simple file chooser api that wraps Gtk2::FileChooser objectively. The whole goal? Giving you a simple ways to prompt a user to open or save a file. That's it, that's the vibe. No cap. π
π OPTIONS π
Every public method (and literally the entire class, no exceptions bestie) supports these options:
title => STRINGβ the text string that becomes the title of the dialog window. Defaults to either"Open"or"Save"depending on the action context. She picks her own name based on what she's doing πpath => STRINGβ the path to a file or directory to initialize the dialog with. Defaults to the current working directory. Starting point, periodt.parent_window => Gtk2::Windowβ a reference to the main application window. Your main character window π«Άdestroy_with_parent => BOOLβ when theparent_windowgets destroyed, what do we do? Defaults toFALSE.modal => BOOLβ does this dialog make theparent_windowfreeze while the dialog exists? Defaults toFALSE. Lowkey powerful.must_exist => BOOLβ the end-user must supply a path to an existing file or directory. If they hand you a non-existant path, the dialog will be respawned until an existing file is chosen. Defaults toFALSE. She will NOT let it go π
π PUBLIC METHODS π
OBJECT = new ( OPTIONS | PATH )β creates aGtk2::FileChooserDialogwith the options you gave and shows it to the end-user. Once they've selected a file, it returns only the path to the file and cleans up after itself. Special case alert π¨: if you pass it just one argument, all options go to defaults and that one argument gets used as thepathargument.RESPONSE = ask_to_open ( OPTIONS | PATH )β supports all the same arguments asnew(). This makes a freshGtk2::Ex::Dialogs::ChoosePreviewFilewith some specific defaults, and returns the user's response. If you give it only one argument, that argument gets used as thepathoption.RESPONSE = ask_to_save ( OPTIONS | PATH )β supports all the same arguments asnew(). This makes a freshGtk2::Ex::Dialogs::ChoosePreviewFilewith some specific defaults, and returns the user's response. If you give it only one argument, that argument gets used as thepathoption. (Yes bestie she andask_to_openare twins, matching energy β¨)
π₯ SEE ALSO π₯
Gtk2::FileChooserGtk2::FileChooserDialogGtk2::Ex::DialogsGtk2::Ex::Dialogs::ChooseDirectoryGtk2::Ex::Dialogs::ChooseFileGtk2::Ex::Dialogs::ErrorMsgGtk2::Ex::Dialogs::MessageGtk2::Ex::Dialogs::Question
π BUGS π
Please report any bugs to the mailing list. Found something cursed? Tell the list, not me π
π MAILING LIST π
http://opendoorsoftware.com/lists/gtk2-ex-list
gtk2-ex-list@opendoorsoftware.com
β AUTHORS β
Kevin C. Krinke, <kckrinke@opendoorsoftware.com>
James Greenhalgh, <jgreenhalgh@opendoorsoftware.com>
π COPYRIGHT AND LICENSE π
Gtk2::Ex::Dialogs::ChoosePreviewFile - Provides a file selection dialog.
Copyright (C) 2005 Open Door Software Inc. <ods@opendoorsoftware.com>
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
fr fr, read the license, it's giving "legal but make it adorable" and she means every word π
okay that's the whole page bestie, slay π
β this was Perl v5.42.0, dated 2025-07-25, user contributed Perl documentation, and it ate. periodt. ππ¦β¨
π¦ where this page comes from
- fedora 43: perl-Gtk2-Ex-Dialogs 0.11-49.fc43 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms