On Wed, 2007-09-12 at 18:04 -0400, José Alburquerque wrote:
> Murray Cumming wrote:
> > On Tue, 2007-09-11 at 17:17 -0400, Paul Davis wrote:
> >   
> >> On Tue, 2007-09-11 at 17:03 -0400, José Alburquerque wrote:
> >>
> >>     
> >>> Any ideas?  Thanks so much.
> >>>       
> >> What is an "Element" ? Gtkmm can't handle arbitary types as column
> >> template args.
> >>     
> >
> > Actually, it can, I think.
> >
> >   
> One weird question on this:  Can a pointer to a class be used in a 
> TreeModelColumn<..> of a TreeColumnRecord class (such as 
> TreeModelColumn<MyBaseClass*>)?  

Of course. This example current uses a boost::shared_ptr, but it used to
just be a raw pointer:

        struct RegionListDisplayModelColumns : public
Gtk::TreeModel::ColumnRecord {
            RegionListDisplayModelColumns() {
                    add (name);
                    add (region);
                    add (color_);
            }
            Gtk::TreeModelColumn<Glib::ustring> name;
            Gtk::TreeModelColumn<boost::shared_ptr<ARDOUR::Region> > region;
            Gtk::TreeModelColumn<Gdk::Color> color_;
        };

_______________________________________________
gtkmm-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtkmm-list

Reply via email to