Gtk2::F...erWidget(3)
π Gtk2::FileChooserWidget π
okay bestie, so this is the page for Gtk2::FileChooserWidget β it's part of the User Contributed Perl Documentation, and it's literally just the Perl wrapper for the big scary C thing called GtkFileChooserWidget. you're welcome, we're doing this together π«Ά
β¨ NAME β¨
Gtk2::FileChooserWidget β wrapper for GtkFileChooserWidget
that's it. that's the whole vibe. it wraps the thing. iconic behavior honestly π
πΈ HIERARCHY πΈ
the family tree, and yes we're gonna respect it, because inheritance is real and it does matter. look at all these ancestors:
Glib::Object
+----Glib::InitiallyUnowned
+----Gtk2::Object
+----Gtk2::Widget
+----Gtk2::Container
+----Gtk2::Box
+----Gtk2::VBox
+----Gtk2::FileChooserWidget
seven whole generations of ancestor energy and then boom, FileChooserWidget. main character at the bottom of the lineage fr fr π
π¦ INTERFACES π¦
these are the roles it plays, the ~personas~, if you will. it's giving versatile:
Glib::Object::_Unregistered::AtkImplementorIfaceGtk2::BuildableGtk2::OrientableGtk2::FileChooserGlib::Object::_Unregistered::GtkFileChooserEmbed
five interfaces. not one, not two. slay β¨
π METHODS π
okay this is the part you actually came for. there are exactly two constructors here, no more, no less, don't let anyone tell you otherwise.
widget = Gtk2::FileChooserWidget->new ($action)
make a brand new one, bestie. arguments:
$actionβ this one's aGtk2::FileChooserAction. that's the enum that tells it what kind of choosing we're doing (scroll down, I got you π).
widget = Gtk2::FileChooserWidget->new_with_backend ($action, $backend)
same deal but now you're picking the backend too, fancy:
$actionβ aGtk2::FileChooserAction, same as above.$backendβ astring. that's your backend, right there, as a string. ngl that's the whole description.
π ENUMS AND FLAGS π
enum Gtk2::FileChooserAction
four flavors, four moods, pick your fighter:
'open'/GTK_FILE_CHOOSER_ACTION_OPEN'save'/GTK_FILE_CHOOSER_ACTION_SAVE'select-folder'/GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER'create-folder'/GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER
note that each one has the cute Perl string name and the shouty ALL-CAPS constant name. both work. iykyk π
π SEE ALSO π
go read these too, they're the extended universe:
Gtk2Glib::ObjectGlib::InitiallyUnownedGtk2::ObjectGtk2::WidgetGtk2::ContainerGtk2::BoxGtk2::VBox
π COPYRIGHT π
Copyright (C) 2003-2011 by the gtk2-perl team.
This software is licensed under the LGPL. See Gtk2 for a full notice.
okay so legal stuff: LGPL, and if you want the full notice you gotta go look at Gtk2. don't skip that part bestie, they mean it π
and that's the whole page, you ate that π this was perl v5.42.0, dated 2025-07-25, signing off β go build something cute with it, mwah π β¨π¦
π¦ 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