Re: [clutter] scrolling



hi;

On 8 November 2012 16:33, Patrick Shirkey <pshirkey boosthardware com> wrote:

What is the best way to handle a scrollable area with clutter-1.10.8?

I have a widget that is larger than the available real estate and I would
like to be programatically scroll it.

Should I draw the widget once and move it around inside a container hiding
the area that is outside of the container boundaries or should I redraw
the entire widget for every scroll event?

you can do a translation inside apply_transform() in the parent of the
widget, and clip it.

you can have a look at how ClutterScrollActor works in Clutter 1.12;
the actor is pretty much self-contained, so you can even reuse its
code, if the license allows it.

ciao,
 Emmanuele.


--
W: http://www.emmanuelebassi.name
B: http://blogs.gnome.org/ebassi/



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