Re: RFC: scrolling



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.


regards,

-kris.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]