This site has been retired. For up to date information, see handbook.gnome.org or gitlab.gnome.org.


[Home] [TitleIndex] [WordIndex

1. Apocalypse 2

Back to Clutter/Apocalypses

1.1. Apocalypse

or Layout is not as bad as it sounds.

All actors with a child can either handle the size negotiation for layout invalidation directly or, better, use a Layout Manager delegate.

Layout managers are responsible for requesting the preferred size of the children of an actor, and assigning them the available size.

Animation between states should be possible by interpolating the current allocation and the new allocation, transparently from the layout manager's perspective - i.e. no additional code should be necessary when implementing a ClutterLayoutManager.

1.2. Exegesis

A Layout Manager is a delegate class for implementing layout policies for children of a ClutterActor.

Clutter already has a ClutterLayoutManager class which takes over:

Plus layout properties through the ClutterLayoutMeta class:

There is also an animation API based on the assumption that animations are transition changes driven by a timeline and a progress function, and that the allocate() implementation should just interpolate between the initial and final states.

The animation API is generally enough for a simple easing between states, but it has some warts:

Most of the Layout Manager API can be left as it is, as it provides a proper delegation framework to implement actors with a layout policy by satisfying the principle of least astonishment for application developers and satisfying the API contract in the base ClutterActor class that is going to use the delegate.

The main goals for a revised Layout Manager class are:

1.3. Synopsis

TBD


2024-10-23 10:58