]> Pileus Git - ~andy/gtk/commitdiff
update a little
authorJonathan Blandford <jrb@src.gnome.org>
Mon, 4 Feb 2002 19:30:00 +0000 (19:30 +0000)
committerJonathan Blandford <jrb@src.gnome.org>
Mon, 4 Feb 2002 19:30:00 +0000 (19:30 +0000)
docs/tree-column-sizing.txt

index 879b846285ef500c0073df8bfaa96802a4820680..c0c38833d08c3b2f42d0529ba3b688d7e4126f53 100644 (file)
@@ -74,3 +74,30 @@ min_width <= max_width
 
 (column != last visible column) => width == CLAMP (requested_width, min_width, max_width)
 
+
+HOW THE VERTICAL OFFSET IS CALCULATED
+(This has nothing to do with columns)
+=====================================
+
+The current offset of the tree is determined by:
+
+tree_view->priv->dy
+
+All motion/button/expose events take this as the offset when trying to
+draw the tree.  There are also two other related members:
+
+tree_view->priv->top_row
+tree_view->priv->top_row_dy
+
+In general _gtk_rbtree_node_find_offset (tree_view->priv->top_row) +
+tree_view->priv->top_row_dy is the same as tree_view->priv->dy.
+We have the alternate method so we can update dy when the tree changes.
+There are two functions:
+
+gtk_tree_view_dy_to_top_row
+   and
+gtk_tree_view_top_row_to_dy
+
+They are called when the tree's confirmation changes, in order to sync
+the value appropriately.  Note that these two functions sometimes call
+each other to negotiate a correct value if needed.