Object Hierarchy:

Object hierarchy for Box


[ CCode ( type_id = "clutter_box_get_type ()" ) ]
[ Version ( since = "1.2" ) ]
public class Box : Actor, Implementor, Animatable, Container, Scriptable

Box is a Actor sub-class implementing the Container interface.

A Box delegates the whole size requisition and size allocation to a LayoutManager instance.

Box is available since Clutter 1.2

Box is deprecated since Clutter 1.10; all its relevant API is provided by Actor, via the layout_manager property.

typeof (unichar2) typeof (unichar2) Using ClutterBox

The following code shows how to create a Box with a LayoutManager sub-class, and how to add children to it via pack.

 ClutterActor *box;
ClutterLayoutManager *layout;

// Create the layout manager first
layout = clutter_box_layout_new ();
clutter_box_layout_set_homogeneous (CLUTTER_BOX_LAYOUT (layout), TRUE);
clutter_box_layout_set_spacing (CLUTTER_BOX_LAYOUT (layout), 12);

// Then create the ClutterBox actor. The Box will take
// ownership of the ClutterLayoutManager instance by sinking
// its floating reference
box = clutter_box_new (layout);

// Now add children to the Box using the variadic arguments
// function clutter_box_pack() to set layout properties
clutter_box_pack (CLUTTER_BOX (box), actor,
"expand", TRUE,

Box's pack wraps the generic add_actor function, but it also allows setting layout properties while adding the new child to the box.

Namespace: Clutter
Package: clutter-1.0



Creation methods:


Inherited Members:

All known members inherited from class Clutter.Actor
All known members inherited from interface Atk.Implementor
All known members inherited from interface Clutter.Animatable
All known members inherited from interface Clutter.Scriptable