Re: RFC: scrolling
- From: Kristian Rietveld <kris loopnest org>
- To: Benjamin Otte <otte gnome org>
- Cc: gtk-devel-list <gtk-devel-list gnome org>
- Subject: Re: RFC: scrolling
- Date: Tue, 6 Dec 2011 10:01:00 +0100
On Dec 6, 2011, at 6:26 AM, Benjamin Otte wrote:
> A) Don't implement it
> B) Let the scrollable do the scrolling
> C) Let the viewport do the scrolling
> In this approach, one treats the scrollable as just a large canvas and
> the viewport provides a view onto an area of the scrollable. Scrolling
> is managed completely by the viewport.
> D) Implement scrolling automatically
> Whenever a widget needs more space than is available, just
> automatically add scrollbars. This is what the overflow property of
> HTML does.
Quick comment: one thing that GtkTreeView relies on is to be able to make a specified item visible. This means that GtkTreeView gives a command to scroll to a specified position. From a quick glance, this would be hard to implement with C and D.
We support such scrolling as an API to outside users, but it is also used when implementing keyboard navigation. If you press "up", the view has to scroll up as well if necessary. So other widgets rely on this as well.
] [Thread Prev