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

Re: "Virtual" Scrolling?



If you want to see a working example try

http://www.eudoxos.net/gtk/

you will find the program gfit there, which uses a widget I call GtkDatabox
which does exactly what you want. You can zoom in and out, scoll in both
directions and have a backing pixmap that is just as large as the drawing
area widget. (Possibly the only thing to do is to rewrite the drawing
function itself). If you try it, please tell me how it worked :->

Greetings,
Roland Bock

> 
> Is there an example somewhere I can look at of "virtual" scrolling? By that I
> mean, instead of just putting a bigger widget in a smaller scrolling container,
> actually drawing a scrolling container sized image myself based on the scroll
> position.
> 
> That is, I want to have a pixmap the size of a scrolled window, which is drawn
> to according to the scroll position, then copied into the scrolled window,
> giving the impression of a much larger image.
> 
> I have everything working, except I can't see how to get the scroll position. In
> fact, while I'm at it, I'd like to see how to programmatically set it also.
> 
> From what I can figure out, my drawing area is in a viewport which is in a
> scrolled window. The scrolled window and viewport have adjustments associated
> with them, which do things when changed. I assume the default setup is to scroll
> the drawing area when changed.
> 
> Is that correct? What should I be reading, the viewport's adjustments, or the
> scrolled windows? I changed the adjustments programmatically but that did
> nothing.
> 
> Thanks.
> 
> -- 
> SEGV    http://www.cgocable.net/~mlepage/
> 
> 
> -- 
>          To unsubscribe: mail gtk-app-devel-list-request@redhat.com with 
>                        "unsubscribe" as the Subject.
> 
> 	Mailing list concerns should be mailed to <listmaster@redhat.com>
> 
> 



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