NAME
App::Chart::Gtk2::Ex::CellRendererTextBits -- helpers for Gtk2::CellRendererText objects
SYNOPSIS
use App::Chart::Gtk2::Ex::CellRendererTextBits;
FUNCTIONS
App::Chart::Gtk2::Ex::CellRendererTextBits::renderer_edited_set_value ($renderer, $view_or_model, $column_num)-
Setup
$rendererso that when edited the new value is stored to the given view or model$column_numusing aset_value()such as ListStore and TreeStore implement.The underlying model doesn't have to be a ListStore or TreeStore, anything with a
set_value()is fine.$view_or_modelcan be any ofA viewer widget with a
modelproperty, such asGtk2::CellView. The model it's showing when edited is used.A viewer object with a
get_tree_viewmethod, such asGtk2::TreeViewColumnof Gtk 2.12 and up, returning aGtk2::TreeViewor similar which in turn has amodelproperty. When packing a renderer in a TreeViewColumn just pass that column and the TreeView and model it's showing when edited is used.A
Gtk2::TreeModelwith aset_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.
Usually the
$column_numto write back is the same column displayed by the renderer, peradd_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.