Forcing GtkScrolledWindow to sroll



I couldn't find this in the archives, but I assume it's a common thing.

How do I force a GtkScrolledWindow to scroll?

Using the C API, I have a drawing area widget that I put into a scrolled
window.  I can scroll the image as expected by dragging the scrollbars.
Now, I want to first, force the viewport to be scrolled to the center of
the image.  The I want to implement a "drag" scrolling.  The user will
click and drag the image to make it scroll.

In the motion_notify_event I get the pointer position and button states,
and a calculate the amount that the user has dragged the image (deltaX
and deltaY).  I assume I can use these two values to tell the scrolled
window to scroll by those amounts, but I can't figure out from the API
how to do this.

I appreciate any help you can give.

Thank You,
Tim





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