scrolling in TreeView
- From: Lorenzo Gil Sanchez <lgs sicem biz>
- To: gtk-app-devel-list gnome org
- Cc: jrb gnome org
- Subject: scrolling in TreeView
- Date: Fri, 20 Feb 2004 19:04:05 +0100
Hi,
I'm implementing a Grid widget because I need it and also because I
think there is some interest in this kind of widget (#119085).
The Grid is heavily based on GtkTreeView and it actually uses the
GtkListStore and GtkRenderers (Changing from a Grid to a GtkTreeView
means changing 3 lines of code from the programmer point of view).
Now, I'm implementing scroll and my question is why do GtkTreeView
treats vertical and horizontal scroll in a different way? For vertical
scroll it uses a treeview->priv->dy integer telling where is the top
side of the treeview with respect to the whole tree. When there is a
need to scroll it uses the gdk_window_scroll function. For horizontal
scrolling it just uses gdk_window_move when there is a need to scroll
and uses treeview->priv->hadjustment->value as the equivalent to
treeview->priv->dy in the painting code.
I implemented the horizontal scroll with a dx field and a single call to
gdk_window_scroll and I wonder why the TreeView doesn't do the same as
it is simpler and more easier to understand IMHO. As I'm a newbie I am
probably missing something and that's why I'm asking. Maybe
gdk_window_scroll is much slower than gdk_window_move?
Thanks for your replies
Lorenzo Gil Sanchez
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]