Glib::Ex::ConnectProperties::Element::model_rows -- emptiness of a TreeModel
Glib::Ex::ConnectProperties->new([$model, 'model-rows#empty'], [$another, 'something']);
This element class implements ConnectProperties access to the following attributes of a Gtk2::TreeModel, meaning any Glib::Object which implements the Gtk2::TreeModel interface.
Glib::Object
Gtk2::TreeModel
model-rows#empty boolean, read-only model-rows#not-empty boolean, read-only
These are read-only but can be used for instance to make a control widget sensitive only when a model has some rows for the control to act on.
Glib::Ex::ConnectProperties->new ([$model, 'model-rows#not-empty'], [$button, 'sensitive']);
Emptiness is detected simply by get_iter_first(). The row-deleted and row-inserted signals are used to listen for the model becoming empty or not empty due to inserts or deletes.
get_iter_first()
row-deleted
row-inserted
Glib::Ex::ConnectProperties, Glib::Ex::ConnectProperties::Element::tree_selection, Glib::Ex::ConnectProperties::Element::textbuffer, Gtk2::TreeModel
http://user42.tuxfamily.org/glib-ex-connectproperties/index.html
Copyright 2010, 2011, 2012, 2013, 2014 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.