Gtk2::Container(3)
π NAME π
Gtk2::Container β bestie, this is the wrapper for GtkContainer, and it's literally the vibe behind every widget that holds other widgets. β¨
π¦ HIERARCHY π¦
Okay so the family tree, and yes she comes from a long line of iconic ancestors:
Glib::Object
+----Glib::InitiallyUnowned
+----Gtk2::Object
+----Gtk2::Widget
+----Gtk2::Container
πΈ INTERFACES πΈ
She also serves looks from:
Glib::Object::_Unregistered::AtkImplementorIfaceGtk2::Buildable
β¨ METHODS β¨
$container->add ($widget)
$widget(Gtk2::Widget)
$container->add_with_properties ($widget, ...)
$widget(Gtk2::Widget)...(list) β list of property name/value pairs
integer = $container->get_border_width
$container->set_border_width ($border_width)
$border_width(integer)
$container->check_resize
list = $container->child_get ($child, ...)
$child(Gtk2::Widget)...(list) β list of property names
Returns a list of properties of the child. π«Ά
list = $container->child_get_property ($child, ...)
$child(Gtk2::Widget)...(list)
Alias for child_get. Same energy, different name. π
$container->child_set ($child, ...)
$child(Gtk2::Widget)...(list) β list of property name/value pairs
Sets a list of properties on the child.
$container->child_set_property ($child, ...)
$child(Gtk2::Widget)...(list)
Alias for child_set.
string = $container->child_type
list = $container->get_children
Returns a list of Gtk2::Widget's, the children of the container. Look at all her little babies π₯Ή
pspec or undef = $object_or_class_name->find_child_property ($name)
$name(string)
Return a Glib::ParamSpec for child property $name on container $object_or_class_name. If there's no property $name then return undef. See Glib::Object list_properties for the fields in a ParamSpec.
list = $container->get_focus_chain
Returns a list of Gtk2::Widgets, the focus chain. β
$container->set_focus_chain (...)
...(list) ofGtk2::Widget's, the focus chain
Sets a focus chain, overriding the one computed automatically by GTK+.
In principle each widget in the chain should be a descendant of the container, but this is not enforced by this method, since it's allowed to set the focus chain before you pack the widgets, or have a widget in the chain that isn't always packed. The necessary checks are done when the focus chain is actually traversed. So like, no one's stopping you, but the vibes get checked later. π
widget or undef = $container->get_focus_child
Since: gtk+ 2.14
$container->set_focus_child ($child)
$child(Gtk2::Widgetorundef)
adjustment or undef = $container->get_focus_hadjustment
$container->set_focus_hadjustment ($adjustment)
$adjustment(Gtk2::Adjustmentorundef)
adjustment or undef = $container->get_focus_vadjustment
$container->set_focus_vadjustment ($adjustment)
$adjustment(Gtk2::Adjustmentorundef)
$container->forall ($callback, $callback_data=undef)
$callback(subroutine) β Code to invoke on each child widget$callback_data(scalar)
Invoke $callback on each child of $container, including "internal" children. Most applications should not use this function. Compare with Gtk2::Container::foreach.
$container->foreach ($callback, $callback_data=undef)
$callback(subroutine) β Code to invoke on each child widget$callback_data(scalar)
Invoke $callback on each child of $container, ignoring "internal" children. She's polite about it and skips the internals. π
list = $object_or_class_name->list_child_properties
Return a list of Glib::ParamSpec objects which are the child properties available for children of a container $object_or_class_name. See Glib::Object list_properties for the fields in a ParamSpec.
$container->propagate_expose ($child, $event)
$child(Gtk2::Widget)$event(Gtk2::Gdk::Event)
$container->set_reallocate_redraws ($needs_redraws)
$needs_redraws(boolean)
$container->remove ($widget)
$widget(Gtk2::Widget)
$container->resize_children
resizemode = $container->get_resize_mode
$container->set_resize_mode ($resize_mode)
$resize_mode(Gtk2::ResizeMode)
$container->unset_focus_chain
π PROPERTIES π
'border-width'(Glib::UInt: default0: readable / writable / private / static-nick / static-blurb) The width of the empty border outside the containers children'child'(Gtk2::Widget: defaultundef: writable / private / static-nick / static-blurb) Can be used to add a new child to the container'resize-mode'(Gtk2::ResizeMode: default"parent": readable / writable / private / static-nick / static-blurb) Specify how resize events are handled
π SIGNALS π
add(Gtk2::Container,Gtk2::Widget)check-resize(Gtk2::Container)remove(Gtk2::Container,Gtk2::Widget)set-focus-child(Gtk2::Container,Gtk2::Widget)
π ENUMS AND FLAGS π
enum Gtk2::ResizeMode
'parent'/GTK_RESIZE_PARENT'queue'/GTK_RESIZE_QUEUE'immediate'/GTK_RESIZE_IMMEDIATE
π§ SEE ALSO π§
Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget
π COPYRIGHT π
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, no cap π«Ά this was rendered by perl v5.42.0 on 2025-07-25 for Gtk2::Container(3) β go forth and container-ize, you ate π
β¨
π¦ where this page comes from
- fedora 43: perl-Gtk2 1.24993-23.fc43 Β· LicenseRef-Callaway-LGPLv2+
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms