discuss-gnustep
[Top][All Lists]
Advanced

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

Re: scrollview internals


From: address@hidden
Subject: Re: scrollview internals
Date: Mon, 18 Feb 2008 23:10:09 -0800 (PST)
User-agent: G2/1.0

On 18 Feb., 03:09, "Rogelio M. Serrano Jr." <roge...@smsglobal.net>
wrote:
> How does a scrollview work? Is there a big pixmap somewhere and its just
> blit/clipped to the scrollview viewport?

No. The main work is done in NSClipView which has two modes -
copiesOnScroll YES/NO.

If it is set, the still visible part is panned on screen to a new
location (-scrollRect:By:) and the newly visible parts are redrawn.

If it is not set, the visible part of the -documentView is redrawn.

So, the main trick is to redraw only visible parts even if the
documentView (e.g. a NSTableView) is very large.

It *could* be possible to attach the documentView to invisible
NSWindow and just copy from the invisible window to the visible window
of the NSClipView. So, all updates of the documentView goes to the
invisible "pixmap" while moving the clipView doesn't need any redraw
of the documentView. But this might run the X server into memory
problems. And, it might be very problematic to have different windows
in a single NSView hierarchy.

-- hns


reply via email to

[Prev in Thread] Current Thread [Next in Thread]