Gtk2::Frame(3)

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

πŸ’– Gtk2::Frame β€” the pretty little box that wraps your stuff πŸ’–

okay bestie, so this is Gtk2::Frame, from the User Contributed Perl Documentation crew, and it's literally just a wrapper for GtkFrame. That's it, that's the gig. It's the frame β€” the decorative border situation you put around other widgets so they look like they belong together. Very "this is my section" energy. πŸŽ€


🌸 HIERARCHY 🌸

the family tree, and yes we're listing every single ancestor, no skipping:

Glib::Object
+----Glib::InitiallyUnowned
     +----Gtk2::Object
          +----Gtk2::Widget
               +----Gtk2::Container
                    +----Gtk2::Bin
                         +----Gtk2::Frame

she comes from a long line of icons, we respect the lineage πŸ‘‘


✨ INTERFACES ✨

the vibes she carries with her:

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

🫢 METHODS 🫢

πŸ¦‹ widget = Gtk2::Frame->new ($label=undef)

make a brand new frame, slay. arguments:

  • $label β€” a string or undef. it's the text that goes on the frame, or you can just pass nothing and live your truth.

πŸ¦‹ (xalign, yalign) = $frame->get_label_align

πŸ¦‹ $frame->set_label_align ($xalign, $yalign)

where the label sits inside the frame. getter hands you back both values, setter takes both:

  • $xalign β€” a double
  • $yalign β€” a double

πŸ¦‹ string = $frame->get_label

πŸ¦‹ $frame->set_label ($label=undef)

grab the label text or set it:

  • $label β€” a string or undef

πŸ¦‹ widget = $frame->get_label_widget

πŸ¦‹ $frame->set_label_widget ($label_widget)

not feeling a plain text label? put a whole widget in there instead, main character move:

  • $label_widget β€” a Gtk2::Widget

πŸ¦‹ shadowtype = $frame->get_shadow_type

πŸ¦‹ $frame->set_shadow_type ($type)

controls how the border is styled:

  • $type β€” a Gtk2::ShadowType

πŸ’… PROPERTIES πŸ’…

  • 'label' (string : default undef : readable / writable / private / static-nick / static-blurb) β€” the text of the frame's label, iconic.
  • 'label-widget' (Gtk2::Widget : default undef : readable / writable / private / static-nick / static-blurb) β€” a widget to display in place of the usual frame label.
  • 'label-xalign' (float : default 0 : readable / writable / private / static-nick / static-blurb) β€” the horizontal alignment of the label.
  • 'label-yalign' (float : default 0.5 : readable / writable / private / static-nick / static-blurb) β€” the vertical alignment of the label.
  • 'shadow' (Gtk2::ShadowType : default "etched-in" : readable / writable / private / static-nick / static-blurb / deprecated) β€” bestie. it's deprecated. use shadow_type instead, okay? no cap. 🚫
  • 'shadow-type' (Gtk2::ShadowType : default "etched-in" : readable / writable / private / static-nick / static-blurb) β€” the appearance of the frame border.

🌈 ENUMS AND FLAGS 🌈

enum Gtk2::ShadowType

all the shadow moods, pick your fighter:

  • 'none' / GTK_SHADOW_NONE
  • 'in' / GTK_SHADOW_IN
  • 'out' / GTK_SHADOW_OUT
  • 'etched-in' / GTK_SHADOW_ETCHED_IN
  • 'etched-out' / GTK_SHADOW_ETCHED_OUT

πŸ‘€ SEE ALSO πŸ‘€

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

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


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, bestie πŸ’– this was Gtk2::Frame(3), part of the User Contributed Perl Documentation, brought to you by perl v5.42.0 and dated 2025-07-25. go frame something pretty. periodt. βœ¨πŸ¦‹πŸŽ€

πŸ“¦ where this page comes from