Re: [gtkmm] TreeView



Sebastian Ryszard Kruk said:

>>
>> p_treeview->get_column(0)->add_attribute(p_treeview->get_column_cell_renderer(0),"background_gdk",5);
>>
>
> That was it, thanks - though it needed a liitle bit derefferencing
> *(p_treeview->get_column_cell_renderer(0))
>
> I have noticed that you are doing it a little bit different way - I have
> to read it through once again.

Well, I wasn't trying to achieve exactly the same thing, but there are a
couple of different ways to solve this kind of problem, it seems.

> Well if you say so, I have just read this in API reference:
>
> ]Glib::ListHandle<CellRenderer*>
> ]Gtk::TreeViewColumn::get_cell_renderers()
>
> ]Returns a newly-allocated G::List of all the cell renderers in the
> ]column, in no particular order.
>
> ]The list must be freed with Glib::list_free().
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> ]Returns:
> ]    A list of Gtk::CellRenderers.
>
>
> A was puzzeled becouse no such list_free() method could be found ;-)

There are two possibilities for this: either I'm wrong, or this is a
leftover from the automatic conversion of GTK+ docs. I would suspect the
latter, given what I know of gtkmm's API design, and also because it
mentions G::List - which definitely doesn't exist, and Glib::list_free(),
which not only doesn't exist but is also not a very gtkmm-like construct.
Even if you did have to explicitly delete something (and using manage()
and RefPtr should eliminate virtually all of that), surely you'd do it
with C++'s delete operator.

Murray, any thoughts on this? Docs bug?



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]