Re: Fixing the GtkTreeModel::row-deleted inconsistency
- From: Federico Mena Quintero <federico ximian com>
- To: Kristian Rietveld <kris imendio com>
- Cc: gtk-devel-list gnome org
- Subject: Re: Fixing the GtkTreeModel::row-deleted inconsistency
- Date: Thu, 10 May 2007 19:05:05 -0500
On Thu, 2007-05-10 at 17:04 +0200, Kristian Rietveld wrote:
> There are no clear rules for this, actually. Most simple models don't
> have a real use for this. The filter and sort models both use this
> mechanism to keep track of which levels to cache and monitor. Models
> which reference external objects might want to use it. A node is
> referenced when it is visible. In the rule all expanded nodes count as
> visible; all nodes which are in GtkTreeView's internal rbtree are
> referenced.
So in general
- A node is referenced if it is within the scrolled-in area of the view.
- A node is referenced if it is expanded, even if it is not within the
scrolled-in area (i.e. everything which the rbtree mirrors is reffed).
Is that correct?
[Humm, toplevel nodes are always in the rbtree, I think. Does this mean
that all toplevel nodes are always reffed?]
I'd love to watch a little toy model that just keeps an int for each
node, and printf()s the references for each node as they change. Then
you could see if scrolling the view up and down indeed keeps only the
required nodes reffed --- this would be good evidence that you can
indeed implement a model which doesn't have all its data exploded in
memory all the time.
Federico
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]