Re: Gtk3::TreeSelection and get_selected_rows
- From: Torsten Schoenfeld <kaffeetisch gmx de>
- To: gtk-perl-list gnome org
- Subject: Re: Gtk3::TreeSelection and get_selected_rows
- Date: Tue, 19 Feb 2013 11:31:45 +0100
On 19.02.2013 05:34, Dan Kasak wrote:
More Gtk2 ==> Gtk3 questions ...
When I do $tree_selection->get_selected_rows, I get an array, which
appears to have:
- row[0]: an array of Gtk3::TreePath objects
- row[1]: the model ( in my case, a Gtk3::ListStore )
Is this expected?
Yes. Gtk2 does this differently, but I saw no compelling reason to
uphold this inconsistency with the C API. This particular change is
listed in the pod:
<https://metacpan.org/module/Gtk3#Porting-from-Gtk2-to-Gtk3>.
http://developer.gnome.org/gtk3/3.0/GtkTreeSelection.html#gtk-tree-selection-get-selected-rows
don't say anything about getting the model back.
C functions can only have one return value; to return more than one
value, they must use "out" arguments, i.e. reference arguments that get
set by the function. "GtkTreeModel **model" is such an argument in this
case. These kinds of "out" arguments are mapped to normal return values
by Glib::Object::Introspection (and hence by Gtk3).
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]