App::Chart::Gtk2::Ex::CellRendererTextBits -- helpers for Gtk2::CellRendererText objects
App::Chart::Gtk2::Ex::CellRendererTextBits::renderer_edited_set_value ($renderer, $view_or_model, $column_num)
$rendererso that when edited the new value is stored to the given view or model
set_value()such as ListStore and TreeStore implement.
The underlying model doesn't have to be a ListStore or TreeStore, anything with a
$view_or_modelcan be any of
A viewer widget with a
modelproperty, such as
Gtk2::CellView. The model it's showing when edited is used.
A viewer object with a
get_tree_viewmethod, such as
Gtk2::TreeViewColumnof Gtk 2.12 and up, returning a
Gtk2::TreeViewor similar which in turn has a
modelproperty. When packing a renderer in a TreeViewColumn just pass that column and the TreeView and model it's showing when edited is used.
set_valuemethod, for direct use. It might sometimes make sense to store into a different model than the one being viewed, but the paths (Gtk2::TreePath coordinates) must be the same.
$column_numto write back is the same column displayed by the renderer, per
add_attribute(). But there's no way to automatically extract that from the renderer/viewer setup (as of Gtk 2.20) so it must be supplied here.
If you're using a single renderer in multiple viewers or columns then this function is no good because it records a single destination viewer/model and column within the renderer.
Copyright 2008, 2009, 2010, 2011, 2013 Kevin Ryde
Chart 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.
Chart 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 Chart; see the file COPYING. Failing that, see http://www.gnu.org/licenses/.