Re: Two warnings when creating a TreeStore
- From: Paul Davis <paul linuxaudiosystems com>
- To: José Alburquerque <jaalburquerque cox net>
- Cc: Murray Cumming <murrayc murrayc com>, gtkmm-list gnome org
- Subject: Re: Two warnings when creating a TreeStore
- Date: Thu, 13 Sep 2007 07:01:31 -0400
On Wed, 2007-09-12 at 18:04 -0400, Jos�lburquerque 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�lburquerque 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_;
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]