RE: Handling multiple selections in a Gtk::TreeView
- From: "Roel Vanhout" <rvanhout riks nl>
- To: "Matthias" <matthias digitalraid com>, <gtkmm-list gnome org>
- Cc:
- Subject: RE: Handling multiple selections in a Gtk::TreeView
- Date: Fri, 26 Nov 2004 10:14:04 +0100
Have you read the Gtk Treeview tutorial? It's written for the C
interface but it clearly explains all the concepts of a treeview. You
can find it on http://scentric.net/tutorial/treeview-tutorial.html.
cheers,
roel
-----Original Message-----
From: Matthias [mailto:matthias digitalraid com]
Sent: Friday, November 26, 2004 00:03
To: gtkmm-list gnome org
Subject: Re: Handling multiple selections in a Gtk::TreeView
On Thursday 25 November 2004 23:13, Murray Cumming wrote:
> This is mentioned in the book, by the way:
> http://www.gtkmm.org/docs/gtkmm-2.4/docs/tutorial/html/ch08s04.html
I have read that of course :) It is lacking important information, e.g.:
1) Is it sufficient to call selected_foreach once to bind the callback
or do I
have to call it whenever I want to work on the selection?
2) When exactly is the callback function called and how I can get the
selected
rows in order to work on them?
For example it doesn't mention Gtk::TreeSelection::get_selected_rows and
ListHandle_Path, and how to use them and when.
> It's called once for each row that is selected. It is synchronous,
> meaning that it only returns when it has finished calling your
> callback.
So I have to call selected_foreach in my on_selection_changed handler?
> This is documented:
>http://www.gtkmm.org/docs/gtkmm-2.4/docs/reference/html/classGtk_1_1Tre
>eSel
>ection.html#a16
Along with your further explanation, I think I've now understood it, but
honestly, from that description alone I didn't understand the concept.
> > 2) What is a ListHandle_Path and how do I use it?
>
> http://www.gtkmm.org/docs/gtkmm-2.4/docs/tutorial/html/ch03s05.html
I was more referring to the "path" part than the "list" part. Maybe I
should
have been more precise on that (see next paragraph).
> > 3) What is a slot, and what is a path?
>
> It is a libsigc++ callback object:
> http://www.gtkmm.org/docs/gtkmm-2.4/docs/tutorial/html/ch03s03.html
Thanks, I didn't notice the appendix.
> "A Gtk::TreeModel::Path is essentially a potential node. It is a
> location on a model that may or may not actually correspond to a node
> on a specific model."
*confused* And what is it used for?
> Hopefully it makes sense now.
I'll give it a try. If I still can't get it to work I guess I have to
bug you
again. :D
Maybe, to give at least -some- constructivce criticism, you should
cross-link
all those links you just posted in the documentation as well. In
general,
whenever a concept is introduced which requires knowledge of further
details
(like using sigc signals), there should be some reference, or else the
reader
might get confused. At least I was.
Best regards,
Matthias
_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org http://mail.gnome.org/mailman/listinfo/gtkmm-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]