Gtk2::F...election(3)

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

πŸ’– 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::AtkImplementorIface
  • Gtk2::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_area
  • widget = $fs->button_area
  • widget = $fs->cancel_button
  • widget = $fs->dir_list
  • widget = $fs->file_list
  • widget = $fs->fileop_c_dir
  • widget = $fs->fileop_del_file
  • widget = $fs->fileop_dialog
  • widget = $fs->fileop_entry
  • widget = $fs->fileop_ren_file
  • widget = $fs->help_button
  • widget = $fs->history_menu
  • widget = $fs->history_pulldown
  • widget = $fs->main_vbox
  • widget = $fs->ok_button
  • widget = $fs->selection_entry
  • widget = $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 (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