Gtk2::F...election(3)
π NAME π
Gtk2::FileSelection β it's a lil wrapper for GtkFileSelection, bestie π (and yeah it's from the User Contributed Perl Documentation, we love a community effort β¨)
πΈ HIERARCHY πΈ
okay so this is the family tree and our girl is at the very bottom of it, main character energy fr:
Glib::Object
+----Glib::InitiallyUnowned
+----Gtk2::Object
+----Gtk2::Widget
+----Gtk2::Container
+----Gtk2::Bin
+----Gtk2::Window
+----Gtk2::Dialog
+----Gtk2::FileSelection
π¦ INTERFACES π¦
she also does these, no cap:
Glib::Object::_Unregistered::AtkImplementorIfaceGtk2::Buildable
π DEPRECATION WARNING π
GIRL. STOP. Gtk2::FileSelection has been marked as deprecated, and should not be used in newly written code. It's giving vintage, and not in the cute thrifted way π
If you're writing something new, use Gtk2::FileChooserDialog instead of Gtk2::FileSelection. Periodt. π
β¨ METHODS β¨
π«Ά the constructor
widget = Gtk2::FileSelection->new ($title)β makes you a whole new FileSelection widget π$title(string) β the title, obviously, she needs a name bestie
π the lil widget getters (they just hand you a widget, that's it)
widget = $fs->action_areawidget = $fs->button_areawidget = $fs->cancel_buttonwidget = $fs->dir_listwidget = $fs->file_listwidget = $fs->fileop_c_dirwidget = $fs->fileop_del_filewidget = $fs->fileop_dialogwidget = $fs->fileop_entrywidget = $fs->fileop_ren_filewidget = $fs->help_buttonwidget = $fs->history_menuwidget = $fs->history_pulldownwidget = $fs->main_vboxwidget = $fs->ok_buttonwidget = $fs->selection_entrywidget = $fs->selection_text
π the one getter that isn't a widget
string = $fs->fileop_fileβ returns a string, not a widget, iconic of her honestly
π autocomplete moment
$filesel->complete ($pattern)β completes the filename based on a pattern, so helpful π§$pattern(string)
π filename stuff
localized file name = $filesel->get_filenameβ hands you the filename, localized β¨$filesel->set_filename ($filename)β sets it π$filename(localized file name)
π fileop buttons: show / hide
$filesel->hide_fileop_buttonsβ hides those file-operation buttons π$filesel->show_fileop_buttonsβ brings them back π
π¦ select-multiple stuff
boolean = $filesel->get_select_multipleβ is multi-select on or nah$filesel->set_select_multiple ($select_multiple)β turn it on or off$select_multiple(boolean)
π₯ and finally, the actual selections
list = $filesel->get_selectionsβ Returns the list of file name(s) selected. π«Ά
π PROPERTIES π
'filename'(string : default undef : readable / writable / private / static-nick / static-blurb) β The currently selected filename'select-multiple'(boolean : default false : readable / writable / private / static-nick / static-blurb) β Whether to allow multiple files to be selected'show-fileops'(boolean : default true : readable / writable / private / static-nick / static-blurb) β Whether buttons for creating/manipulating files should be displayed
π SEE ALSO π
go read these too, they're the whole friend group:
Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget, Gtk2::Container, Gtk2::Bin, Gtk2::Window, Gtk2::Dialog
π COPYRIGHT π
Copyright (C) 2003-2011 by the gtk2-perl team.
This software is licensed under the LGPL. See Gtk2 for a full notice.
okay bestie that's the whole page, you ate it up fr fr π β¨ this was documented for perl v5.42.0, dated 2025-07-25 β mwah, go forth and (respectfully) not use the deprecated widget ππ¦π
π¦ where this page comes from
- fedora 43: perl-Gtk2 1.24993-23.fc43 Β· LicenseRef-Callaway-LGPLv2+
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms