Gtk2::FontButton(3)

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

πŸ’– Gtk2::FontButton πŸ’–

okay bestie, so this is the page for Gtk2::FontButton (that's the Gtk2::FontButton(3) manual page, if you're the kind of girl who reads headers πŸ“–βœ¨) β€” it's the Perl wrapper for GtkFontButton. It's literally a button. You click it. A font picker shows up. You pick a font. Iconic behaviour, no cap. πŸŽ€


πŸ¦‹ HIERARCHY

the family tree, and yes she comes from a long line of distinguished ancestors:

Glib::Object
+----Glib::InitiallyUnowned
     +----Gtk2::Object
          +----Gtk2::Widget
               +----Gtk2::Container
                    +----Gtk2::Bin
                         +----Gtk2::Button
                              +----Gtk2::FontButton

she's at the bottom of the tree but that just means she's the main character πŸ’…


🌈 INTERFACES

the vibes she implements, fr fr:

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

✨ METHODS ✨

widget = Gtk2::FontButton->new ($fontname=undef)

makes you a brand new font button, bestie 🫢

  • $fontname (string)

widget = Gtk2::FontButton->new_with_font ($fontname=undef)

same energy, but you get to hand her a font right at birth 🍼

  • $fontname (string)

string = $font_button->get_font_name

she tells you which font is currently selected. gossip, but useful πŸ’¬

boolean = $font_button->set_font_name ($fontname)

you tell her which font to be showing instead.

  • $fontname (string)

boolean = $font_button->get_show_size

does she show the size in her label or not, that's the question πŸ‘€

$font_button->set_show_size ($show_size)

set whether the size shows up.

  • $show_size (boolean)

boolean = $font_button->get_show_style

is the style showing in the label rn? asking for me.

$font_button->set_show_style ($show_style)

flip that style-visibility switch.

  • $show_style (boolean)

string = $font_button->get_title

reads back the title of the font selection dialog.

$font_button->set_title ($title)

names the dialog. give her a cute one 🌸

  • $title (string)

boolean = $font_button->get_use_font

does her label render in the actual selected font? lowkey a flex.

$font_button->set_use_font ($use_font)

turn that on or off.

  • $use_font (boolean)

boolean = $font_button->get_use_size

is the label drawn with the selected font size? we're checking.

$font_button->set_use_size ($use_size)

set it, bestie.

  • $use_size (boolean)

πŸŽ€ PROPERTIES πŸŽ€

all of these are readable / writable / private / static-nick / static-blurb, just so you know the whole squad is flexible like that.

  • 'font-name' (string : default "Sans 12") β€” the name of the selected font
  • 'show-size' (boolean : default true) β€” whether the selected font size is shown in the label
  • 'show-style' (boolean : default true) β€” whether the selected font style is shown in the label
  • 'title' (string : default "Pick a Font") β€” the title of the font selection dialog
  • 'use-font' (boolean : default false) β€” whether the label is drawn in the selected font
  • 'use-size' (boolean : default false) β€” whether the label is drawn with the selected font size

πŸ”₯ SIGNALS πŸ”₯

  • font-set (Gtk2::FontButton) β€” she fires this off when a font gets set. girl loves to announce things πŸ’…

πŸ‘‘ SEE ALSO

go read these too, they're all part of the lore:

Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget, Gtk2::Container, Gtk2::Bin, Gtk2::Button


Copyright (C) 2003-2011 by the gtk2-perl team.

This software is licensed under the LGPL. See Gtk2 for a full notice.


and that's the whole page, babe πŸ¦‹βœ¨ this absolute gem of a doc came to you via perl v5.42.0, dated 2025-07-25, filed under Gtk2::FontButton(3). go forth and pick a font, you gorgeous nerd πŸ’–πŸŽ€πŸ’…
πŸ“¦ where this page comes from