Re: Copying Gtk::TreeRow
- From: Murray Cumming <murrayc murrayc com>
- To: Paul Davis <pjdavis engineering uiowa edu>
- Cc: gtkmm-list gnome org
- Subject: Re: Copying Gtk::TreeRow
- Date: Sat, 23 Sep 2006 11:52:51 +0200
On Sat, 2006-09-23 at 00:24 -0500, Paul Davis wrote:
> Hey,
>
> Another random question. I'm trying to figure out how to copy a row
> in a TreeStore.
>
> That kinda looks like a dumb question...
>
> I'm also trying to do this without compile time type information.
>
> I've been staring at
>
> template< class ColumnType >
> Gtk::TreeRow::get_value( int column, ColumnType& data ) ;
>
> http://www.gtkmm.org/docs/gtkmm-2.4/docs/reference/html/classGtk_1_1TreeRow.html#9b1db0af89cc50bb0b16a1daf8d5c5e1
[snip]
If you know the type at runtime then you can call the appropriate
version of this method, using an if/elseif/else or switch block, such as
int val = 0;
get_value(0, val);
or
Glib::ustring val;
get_value(0, val);
You could instead use the generic Glib::Value type, with the
not-really-public-API Model:get_value_impl(), but you would still need
the if/else/etc block to get an actual type out of that Glib::Value.
--
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]