The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Glib::Ex::ConnectProperties::Element::model_rows -- emptiness of a TreeModel

SYNOPSIS

 Glib::Ex::ConnectProperties->new([$model,   'model-rows#empty'],
                                  [$another, 'something']);

DESCRIPTION

This element class implements ConnectProperties access to the following attributes of a Gtk2::TreeModel, meaning any Glib::Object which implements the Gtk2::TreeModel interface.

    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.

SEE ALSO

Glib::Ex::ConnectProperties, Glib::Ex::ConnectProperties::Element::tree_selection, Glib::Ex::ConnectProperties::Element::textbuffer, Gtk2::TreeModel

HOME PAGE

http://user42.tuxfamily.org/glib-ex-connectproperties/index.html

LICENSE

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/.