From 6b1a9fd52bb3bcdf7786dc14675fe3619af536c8 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Wed, 11 Jun 2008 17:33:30 +0000 Subject: [PATCH] 2008-06-11 Emmanuele Bassi * clutter/subclassing-ClutterActor.sgml: Add more notes and remind to relayout when adding children to an actor. --- doc/reference/ChangeLog | 5 +++++ doc/reference/clutter/subclassing-ClutterActor.sgml | 10 ++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/doc/reference/ChangeLog b/doc/reference/ChangeLog index ad9c4f983..d14d0e679 100644 --- a/doc/reference/ChangeLog +++ b/doc/reference/ChangeLog @@ -1,3 +1,8 @@ +2008-06-11 Emmanuele Bassi + + * clutter/subclassing-ClutterActor.sgml: Add more notes and + remind to relayout when adding children to an actor. + 2008-06-10 Emmanuele Bassi * clutter/clutter-sections.txt: Update with the new API. diff --git a/doc/reference/clutter/subclassing-ClutterActor.sgml b/doc/reference/clutter/subclassing-ClutterActor.sgml index 81ba171c0..1ce27b9f5 100644 --- a/doc/reference/clutter/subclassing-ClutterActor.sgml +++ b/doc/reference/clutter/subclassing-ClutterActor.sgml @@ -93,6 +93,9 @@ foo_actor_init (FooActor *actor) using the clutter_actor_set_width() and clutter_actor_set_height() functions and their wrappers. + For instance, an actor that depends on the explicit + sizing is the #ClutterRectangle actor. + The size requisition is split into two different phases: width requisition and height requisition. @@ -127,8 +130,8 @@ foo_actor_init (FooActor *actor) The clutter_actor_get_preferred_size() function will automatically check the geometry management preferred by the actor - and return its preferred size depending on it and on the natural - size. + and return its preferred size depending on the value of the request-mode + property and on the natural size of the actor. The size requisition starts from the #ClutterStage and it is performed on every child of the stage following down the hierarchy @@ -639,6 +642,9 @@ foo_actor_add_baz (FooActor *foo_actor, clutter_actor_set_parent (CLUTTER_ACTOR (baz_actor), CLUTTER_ACTOR (foo_actor)); + /* a container should queue a change in the layout */ + clutter_actor_queue_relayout (CLUTTER_ACTOR (foo_actor)); + /* emit a signal and notification */ g_signal_emit (foo_actor, foo_actor_signals[BAZ_CHANGED], 0, baz_actor); g_object_notify (G_OBJECT (foo_actor), "baz");