Gtk2::Paned(3)
β¨ Gtk2::Paned π
okay bestie, welcome to Gtk2::Paned β a wrapper for GtkPaned, and honestly? it's giving split-screen main character energy. π
πΈ HIERARCHY πΈ
the family tree, no cap:
Glib::Object
+----Glib::InitiallyUnowned
+----Gtk2::Object
+----Gtk2::Widget
+----Gtk2::Container
+----Gtk2::Paned
π¦ INTERFACES π¦
this widget also shows up to these parties:
Glib::Object::_Unregistered::AtkImplementorIface
Gtk2::Buildable
Gtk2::Orientable
Gtk2::Paned is the base class for widgets with two panes, arranged either horizontally (Gtk2::HPaned) or vertically (Gtk2::VPaned). Child widgets get added to the panes with $paned->pack1 and $paned->pack2. π The division between the two children is set by default from the size requests of the children, but the user can adjust it β yes, they get to drag it around, iconic behavior.
A paned widget draws a separator between the two child widgets and a small handle that the user can drag to adjust the division. It does not draw any relief around the children or around the separator. Lowkey, it's often useful to put each child inside a Gtk2::Frame with the shadow type set to 'in' so that the gutter appears as a ridge. β¨
Each child has two options that can be set, resize and shrink. If resize is true, then when the Gtk2::Paned is resized, that child will expand or shrink along with the paned widget. If shrink is true, then that child can be made smaller than its requisition by the user. Setting shrink to FALSE allows the application to set a minimum size. If resize is false for both children, then this is treated as if resize is true for both children. π«Ά
The application can set the position of the slider as if it were set by the user, by calling $paned->set_position. periodt.
π METHODS π
$paned->add1 ($child)
$child(Gtk2::Widget) β the vibes you're adding to pane one π
$paned->add2 ($child)
$child(Gtk2::Widget) β same deal, but pane two π«
widget getters for child one
widget = $paned->child1
widget = $paned->get_child1
child1_resize β get it, set it, love it
boolean = $paned->child1_resize
$paned->child1_resize (newval)
$newval(boolean)
child1_resize determines whether the first child should expand when $paned is resized. π
child1_shrink
boolean = $paned->child1_shrink
$paned->child1_shrink (newval)
$newval(boolean)
child1_shrink determines whether the first child may be made smaller than its requisition. πͺ
widget getters for child two
widget = $paned->child2
widget = $paned->get_child2
child2_resize
boolean = $paned->child2_resize
$paned->child2_resize (newval)
$newval(boolean)
child2_resize determines whether the second child should expand when $paned is resized. π
child2_shrink
boolean = $paned->child2_shrink
$paned->child2_shrink (newval)
$newval(boolean)
child2_shrink determines whether the second child may be made smaller than its requisition. πͺ
$paned->compute_position ($allocation, $child1_req, $child2_req)
$allocation(integer)$child1_req(integer)$child2_req(integer)
window = $paned->get_handle_window
Since: gtk+ 2.20 π
$paned->pack1 ($child, $resize, $shrink)
$child(Gtk2::Widget)$resize(boolean)$shrink(boolean)
$paned->pack2 ($child, $resize, $shrink)
$child(Gtk2::Widget)$resize(boolean)$shrink(boolean)
position β get + set
integer = $paned->get_position
$paned->set_position ($position)
$position(integer) β where the divider lives π
π PROPERTIES π
'max-position'(integer : defaultINT_MAX: readable / private / static-nick / static-blurb) β Largest possible value for the"position"property. it's the ceiling, bestie π'min-position'(integer : default0: readable / private / static-nick / static-blurb) β Smallest possible value for the"position"property. the floor π§'position'(integer : default0: readable / writable / private / static-nick / static-blurb) β Position of paned separator in pixels (0means all the way to the left/top) β¬ οΈβ¬οΈ'position-set'(boolean : defaultfalse: readable / writable / private / static-nick / static-blurb) βTRUEif the Position property should be used β
π CHILD PROPERTIES π
'resize'(boolean : defaulttrue: readable / writable / private / static-nick / static-blurb) β IfTRUE, the child expands and shrinks along with the paned widget π'shrink'(boolean : defaulttrue: readable / writable / private / static-nick / static-blurb) β IfTRUE, the child can be made smaller than its requisition π
π STYLE PROPERTIES π
'handle-size'(integer : default5: readable / private / static-nick / static-blurb) β Width of handle. the little grabby bit β
π₯ SIGNALS π₯
boolean = accept-position (Gtk2::Paned)
boolean = cancel-position (Gtk2::Paned)
boolean = cycle-child-focus (Gtk2::Paned, boolean)
boolean = cycle-handle-focus (Gtk2::Paned, boolean)
boolean = move-handle (Gtk2::Paned, Gtk2::ScrollType)
boolean = toggle-handle-focus (Gtk2::Paned)
β ENUMS AND FLAGS β
enum Gtk2::ScrollType
'none'/GTK_SCROLL_NONE'jump'/GTK_SCROLL_JUMP'step-backward'/GTK_SCROLL_STEP_BACKWARD'step-forward'/GTK_SCROLL_STEP_FORWARD'page-backward'/GTK_SCROLL_PAGE_BACKWARD'page-forward'/GTK_SCROLL_PAGE_FORWARD'step-up'/GTK_SCROLL_STEP_UP'step-down'/GTK_SCROLL_STEP_DOWN'page-up'/GTK_SCROLL_PAGE_UP'page-down'/GTK_SCROLL_PAGE_DOWN'step-left'/GTK_SCROLL_STEP_LEFT'step-right'/GTK_SCROLL_STEP_RIGHT'page-left'/GTK_SCROLL_PAGE_LEFT'page-right'/GTK_SCROLL_PAGE_RIGHT'start'/GTK_SCROLL_START'end'/GTK_SCROLL_END
π«Ά SEE ALSO π«Ά
Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget, Gtk2::Container β go read those next, they're the whole friend group π
π COPYRIGHT π
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 β no notes, we ate. πβ¨ this was perl v5.42.0, dated 2025-07-25, filed under Gtk2::Paned(3). mwah π
π¦ 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