Gtk2::C...nDialog(3)

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

πŸ’… NAME πŸ’…

Gtk2::ColorSelectionDialog β€” bestie, it's literally just a wrapper for GtkColorSelectionDialog, and yes she's serving looks πŸ’–

so like, you know how you want a whole pop-up window that lets a girl pick a color? that's her. that's the whole vibe. she's a Gtk2::Dialog that comes pre-loaded with a color picker inside, plus buttons, plus all the drama. iconic behavior honestly ✨


πŸ¦‹ HIERARCHY πŸ¦‹

the family tree, and yes she's got main character energy at the very bottom 🌸

  Glib::Object
  +----Glib::InitiallyUnowned
       +----Gtk2::Object
            +----Gtk2::Widget
                 +----Gtk2::Container
                      +----Gtk2::Bin
                           +----Gtk2::Window
                                +----Gtk2::Dialog
                                     +----Gtk2::ColorSelectionDialog

ngl that's a long lineage but every single ancestor is doing their part 🫢


🌈 INTERFACES 🌈

she also shows up to these, no cap:

  Glib::Object::_Unregistered::AtkImplementorIface
  Gtk2::Buildable

✨ METHODS ✨

🌟 widget = Gtk2::ColorSelectionDialog->new ($title)

build the whole thing from scratch, bestie. takes:

  • $title (string) β€” the string you want up in the title bar. that's it. that's the whole assignment πŸ’…

πŸŽ€ widget = $dialog->cancel_button

grabs you the cancel button so you can do whatever you wanna do with it.

πŸŽ€ widget = $dialog->get_color_selection

the color selection itself!! this is the one you actually wanted, fr fr. get it, do stuff with it, go off πŸ‘‘

πŸŽ€ widget = $dialog->help_button

the help button. yes she has one. yes it's there.

πŸŽ€ widget = $dialog->ok_button

the OK button. the one that says yes. the yes-girl of buttons πŸ’–


πŸ”₯ PROPERTIES πŸ”₯

every single one of these is Gtk2::Widget, default undef, and readable. read-only besties, no touching 🫢

  • 'cancel-button' (Gtk2::Widget : default undef : readable) β€” the cancel button of the dialog. the "never mind, love u tho" button πŸ’€
  • 'color-selection' (Gtk2::Widget : default undef : readable) β€” the color selection embedded in the dialog. the whole point, lowkey 🎨
  • 'help-button' (Gtk2::Widget : default undef : readable) β€” the help button of the dialog. she's there when you need her πŸ™ˆ
  • 'ok-button' (Gtk2::Widget : default undef : readable) β€” the OK button of the dialog. the commitment button, periodt ✨

πŸ‘‘ SEE ALSO πŸ‘‘

go read these too, they're all part of the 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.


ok that's the whole page bestie, you ate that πŸ’…βœ¨

and a little sign-off for the girlies who read all the way to the bottom: this was rendered from perl v5.42.0, dated 2025-07-25, and honestly? she's still cute. no cap. πŸŽ€πŸ¦‹πŸ’–

πŸ“¦ where this page comes from