On 18 Feb., 03:09, "Rogelio M. Serrano Jr." <[EMAIL PROTECTED]> 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 _______________________________________________ Discuss-gnustep mailing list [email protected] http://lists.gnu.org/mailman/listinfo/discuss-gnustep
