Glib::Ex::ConnectProperties::Element::child -- container child properties
Glib::Ex::ConnectProperties->new([$childwidget, 'child#propname'], [$another, 'something']);
This element class implements ConnectProperties access to the "child properties" provided by Gtk2::Container subclasses on a widget stored in a container.
Gtk2::Container
These properties require Perl-Gtk2 1.240 and up for find_child_property(). The properties are accessed on the child widget, with names as specified by the container.
find_child_property()
child#propname
For example Gtk2::Table has child properties for the child attach positions. These are separate from normal object properties.
Gtk2::Table
Glib::Ex::ConnectProperties->new ([$adj, 'value'], [$childwidget, 'child#bottom-attach']);
$childwidget should be a widget which is in a container with the given child property. If $childwidget is unparented later then nothing is read or written by ConnectProperties. Unparenting happens during destruction and quietly doing nothing is usually best in that case.
$childwidget
It's unspecified yet what happens if $childwidget is reparented. Gtk emits a child-notify for each property so in the current ConnectProperties code the initial value set by the container will propagate out. It might be better to apply the first readable ConnectProperties element onto the child, like at ConnectProperties creation. (But noticing a reparent requires a parent-set or notify::parent signal, so perhaps a watch_reparent option should say when reparent handling might be needed, so as not to listen for something which will never happen.)
child-notify
parent-set
notify::parent
watch_reparent
For reference, Goo::Canvas has a system of child properties too on its canvas items. They could be offered too when its Perl bindings have find_child_property(). But the method names are slightly different so probably a separate goo-child#propname.
goo-child#propname
Glib::Ex::ConnectProperties, Gtk2::Container
http://user42.tuxfamily.org/glib-ex-connectproperties/index.html
Copyright 2010, 2011, 2012 Kevin Ryde
Glib-Ex-ConnectProperties is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.
Glib-Ex-ConnectProperties is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with Glib-Ex-ConnectProperties. If not, see http://www.gnu.org/licenses/.
To install Glib::Ex::ConnectProperties, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Glib::Ex::ConnectProperties
CPAN shell
perl -MCPAN -e shell install Glib::Ex::ConnectProperties
For more information on module installation, please visit the detailed CPAN module installation guide.