Reviewing merge request #1398: Support for nesting GtkClutterActor
Right now, the GtkBin associated with a GtkClutterActor can only be the top-level container of a GTK+ widget stack. This is a limitation when animation is needed for a GtkWidget and one of its children at the same time.
With this feature, any widget could be wrapped by a GtkClutterActor, while keeping advantage of the GTK+ laying-out.
The proposed changes aim to provide support for this. Basically it allows the GtkBin of the GtkClutterActor, to be contained inside any GtkContainer, not just GtkClutterEmbed.
When a GtkClutterActor is added to a GtkContainer other than the GtkClutterEmbed, this actor is considered "nested", and will be placed following GTK+ layout rules.
A demo is included (examples/gtk-clutter-actor-nested.c) that shows the feature in action: A GtkVBox wrapped by a GtkClutterActor, and GtkButtons inside. The middle button is wrapped by another GtkClutterActor. Both actors are being rotated simultaneously on opposite directions. The key of the demo is seeing how the GtkClutterActor wrapping the button, is laid-out by GTK+ automatically.
Testing and feedback is very appreciated.
cheers
Commits that would be merged:
- f1b8734
- 917eef6
- 686c0fe
- 1a3a5ba
- 2083208
Adds method to fetch the GtkClutterActor wrapping a given GtkWidget.
Allows nesting GtkClutterActors within a GTK+ widget stack.
Fixes error when allocating size for a non-visible GtkClutterOffscreen.
Adds a simple test for the new GtkClutterActor nesting feature
f1b8734-917eef6

Add a new comment:
Login or create an account to post a comment