script: Support layout manager properties

Layout properties work similarly to child properties, with the added
headache that they require the 3-tuple:

  ( layout manager, container, actor )

to be valid in order to be inspected, parsed and applied. This means
using the newly added back-pointer from the container to the layout
manager and then rejigging a bit how the ScriptParser handles the
unresolved properties.

Similarly to the child properties, which use the "child::" prefix, the
layout manager properties use the "layout::" prefix and are defined with
the child of a container holding a layout manager.
This commit is contained in:
Emmanuele Bassi
2010-06-07 22:45:34 +01:00
parent ab76584965
commit 4c22f122e1
7 changed files with 225 additions and 6 deletions

View File

@@ -13,6 +13,7 @@ json_files = \
test-animator-2.json \
test-animator-3.json \
test-state-1.json \
test-script-layout-property.json \
$(NULL)
png_files = \

View File

@@ -0,0 +1,16 @@
[
{ "id" : "manager", "type" : "ClutterBoxLayout" },
{
"id" : "container", "type" : "ClutterBox",
"layout-manager" : "manager",
"children" : [
{
"id" : "actor", "type" : "ClutterRectangle",
"layout::x-fill" : true,
"layout::y-align" : "center",
"layout::expand" : true
}
]
}
]