Re: Custom class for Gtk::ListStore
- From: Murray Cumming <murrayc murrayc com>
- To: Germán Diago <germandiago gmail com>
- Cc: gtkmm-list gnome org
- Subject: Re: Custom class for Gtk::ListStore
- Date: Tue, 25 Nov 2008 18:15:35 +0100
On Mon, 2008-11-24 at 22:12 +0100, Germán Diago wrote:
> Hello. I would like to know if it's possible to do something similar
> to the example in Gtk#
> to add my own ListStore.
>
> In an example from
> http://www.mono-project.com/GtkSharp_TreeView_Tutorial they do
> something like this:
>
> new Gtk.ListStore (typeof (Song));
>
>
> Is it possible to attach a custom c++ class so that it can be used
> like that? Thanks in advance.
Yes, you can put any C++ class in a Gtk::TreeModel column. It just needs
a constructor and operator==, I think. I do this in Glom, though I use
them via a smartpointer, to avoid unnecessary data copying.
--
murrayc murrayc com
www.murrayc.com
www.openismus.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]