Re: [clutter] scrolling




On Fri, November 9, 2012 3:41 am, Emmanuele Bassi wrote:
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.


At the moment I am drawing all the actors within a single stage. I'm not
sure how to move the stage around with a transform.

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.


I will try upgrading to exp as it has 1.12.0 available and that is
probably a better use of my time than reinventing the scrollActor. Should
I place the actors inside the scrollActor?

Do you have a python3 example of using the scrollActor as a parent
container with (multiple) child actors inside the container?



--
Patrick Shirkey
Boost Hardware Ltd



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