On Wed, 2006-02-22 at 15:39 -0500, Huston, Bob wrote:
> I have done this exact thing, I think the tree view will only allow
> a certain number of types to be columns, the way I got around what you
> are
> seeing is add the column as a void *, then type cast a ptr to my class
> to go into the column.
That shouldn't be necessary. Any type that has a copy constructor can be
used. And if it doesn't have a copy constructor, you can use it via its
specific pointer type, or via a smartpointer, such as boost's shared
ptr.
Indeed, that an object have a copy constructor *is* all that is necessary to add(object) to Gtk::TreeModelColumn. But one might encounter unexpected results elsewhere in one's program if one does not *also* provide a well-crafted assignment operator, from which the copy-constructor may itself be easily implemented. (An example will follow.)