Treeview will always visit newly added rows, and always visits all rows when
setting the model. There is really no way with TreeView to make this very
fast.
The only option is fixed width-fixed row height mode, in which TreeView will
abstain from visiting all new rows *and* request the renderers to render the
data (more precisely, call the size vfunc; it does this only to have the row
heights available, but unfortunately for most cell renderers, getting their
requested size, similar to a widget, will require them to render the content
internally, e.g. CellRendererText will create a PangoLayout with its text,
etc.).

The only viable solution that *I* recommend (I do this nowadays on a routine
basis because TreeView is just too unflexible) is to write completely own
view and model classes not using TreeView at all.

On Mon, Mar 16, 2009 at 5:37 PM, Murray Cumming <murr...@murrayc.com> wrote:

> On Mon, 2009-03-16 at 17:19 +0100, Dimitri Holz wrote:
> > Murray Cumming schrieb:
> > > On Mon, 2009-03-16 at 15:00 +0100, Dimitri Holz wrote:
> > >
> > >> ____I'm programming C++ and Gtkmm since less than one year and I'm a
> > >> student without programming-experiences. Because of that I don't
> > >> perfectly ____understand what you mean with using of cell_data_func to
> > >> show the visible parts of the row.
> > >>
> > >
> > > Sorry. I meant to post a link. Actually, we don't seem to mention this
> > > in the book. But it is used in an unrelated example. Search for
> > > "ExampleWindow::treeviewcolumn_validated_on_cell_data" here:
> > > http://www.gtkmm.org/docs/gtkmm-2.4/docs/tutorial/html/ch08s08.html
> > >
> > > This is the API reference:
> > >
> http://www.gtkmm.org/docs/gtkmm-2.4/docs/reference/html/classGtk_1_1TreeViewColumn.html#765296845c9e9757ba405becbbc13d96
> > >
> > > Your callback function will set whatever cellrenderer properties (in
> the
> > > view) that you want to set, and will only be called for visible rows.
> > >
> >
> > I really not understand where in your link a solution for "not showing
> > the visible parts of the row" is !?
>
> You _do_ want to show the _visible_ parts. You don't want to waste
> processor time or memory on the non visible parts.
>
> >  Can you describe it, please?
>
> I have tried to explain. I think you should try to use
> set_cell_data_func() in an example and see when it is called.
>
> --
> murr...@murrayc.com
> www.murrayc.com
> www.openismus.com
>
> _______________________________________________
> gtkmm-list mailing list
> gtkmm-list@gnome.org
> http://mail.gnome.org/mailman/listinfo/gtkmm-list
>



-- 
Please note that according to the German law on data retention,
information on every electronic information exchange with me is
retained for a period of six months.
[Bitte beachten Sie, dass dem Gesetz zur Vorratsdatenspeicherung zufolge
jeder elektronische Kontakt mit mir sechs Monate lang gespeichert wird.]
_______________________________________________
gtkmm-list mailing list
gtkmm-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtkmm-list

Reply via email to