Gtk2::F...erWidget(3)

πŸ“¦
version 1.24993 Β· 2 versions
, in fedora 43

πŸ’– 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::AtkImplementorIface
  • Gtk2::Buildable
  • Gtk2::Orientable
  • Gtk2::FileChooser
  • Glib::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 a Gtk2::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 β€” a Gtk2::FileChooserAction, same as above.
  • $backend β€” a string. 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:

  • Gtk2
  • Glib::Object
  • Glib::InitiallyUnowned
  • Gtk2::Object
  • Gtk2::Widget
  • Gtk2::Container
  • Gtk2::Box
  • Gtk2::VBox

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