A layout manager arranging children on a single line
The <clutter-box-layout> is a <clutter-layout-manager>
implementing the following layout policy:
all children are arranged on a single line;
the axis used is controlled by the <"vertical"> boolean property;
the order of the packing is determined by the <"pack-start">
boolean property;
each child will be allocated to its natural size or, if set to expand, the available size;
if a child is set to fill on either (or both) axis, its allocation will match all the available size; the fill layout property only makes sense if the expand property is also set;
if a child is set to expand but not to fill then it is possible to control the alignment using the X and Y alignment layout properties.
if the <"homogeneous"> boolean property is set, then all widgets
will get the same size, ignoring expand settings and the preferred sizes
(The missing figure, box-layout
The image shows a <clutter-box-layout> with the
<"vertical"> property set to ‘#f’.
It is possible to control the spacing between children of a
<clutter-box-layout> by using
clutter-box-layout-set-spacing.
In order to set the layout properties when packing an actor inside a
<clutter-box-layout> you should use the
clutter-box-layout-pack function.
<clutter-box-layout> is available since Clutter 1.2
<clutter-layout-manager>)Creates a new
<clutter-box-layout>layout manager
- ret
- the newly created
<clutter-box-layout>Since 1.2
<clutter-box-layout>) (pack_start bool)Sets whether children of layout should be layed out by appending them or by prepending them
- layout
- a
<clutter-box-layout>- pack-start
- ‘
#t’ if the layout should pack children at the beginning of the layoutSince 1.2
<clutter-box-layout>) ⇒ (ret bool)Retrieves the value set using
clutter-box-layout-set-pack-start
- layout
- a
<clutter-box-layout>- ret
- ‘
#t’ if the<clutter-box-layout>should pack children at the beginning of the layout, and ‘#f’ otherwiseSince 1.2
<clutter-box-layout>) (spacing unsigned-int)Sets the spacing between children of layout
- layout
- a
<clutter-box-layout>- spacing
- the spacing between children of the layout, in pixels
Since 1.2
<clutter-box-layout>) ⇒ (ret unsigned-int)Retrieves the spacing set using
clutter-box-layout-set-spacing
- layout
- a
<clutter-box-layout>- ret
- the spacing between children of the
<clutter-box-layout>Since 1.2
<clutter-box-layout>) (vertical bool)Sets whether layout should arrange its children vertically alongside the Y axis, instead of horizontally alongside the X axis
- layout
- a
<clutter-box-layout>- vertical
- ‘
#t’ if the layout should be verticalSince 1.2
<clutter-box-layout>) ⇒ (ret bool)Retrieves the orientation of the layout as set using the
clutter-box-layout-set-verticalfunction
- layout
- a
<clutter-box-layout>- ret
- ‘
#t’ if the<clutter-box-layout>is arranging its children vertically, and ‘#f’ otherwiseSince 1.2
<clutter-box-layout>) (homogeneous bool)Sets whether the size of layout children should be homogeneous
- layout
- a
<clutter-box-layout>- homogeneous
- ‘
#t’ if the layout should be homogeneousSince 1.4
<clutter-box-layout>) ⇒ (ret bool)Retrieves if the children sizes are allocated homogeneously.
- layout
- a
<clutter-box-layout>- ret
- ‘
#t’ if the<clutter-box-layout>is arranging its children homogeneously, and ‘#f’ otherwiseSince 1.4
<clutter-box-layout>) (actor <clutter-actor>) (expand bool) (x_fill bool) (y_fill bool) (x_align <clutter-box-alignment>) (y_align <clutter-box-alignment>)Packs actor inside the
<clutter-container>associated to layout and sets the layout properties
- layout
- a
<clutter-box-layout>- actor
- a
<clutter-actor>- expand
- whether the actor should expand
- x-fill
- whether the actor should fill horizontally
- y-fill
- whether the actor should fill vertically
- x-align
- the horizontal alignment policy for actor
- y-align
- the vertical alignment policy for actor
Since 1.2
<clutter-box-layout>) (actor <clutter-actor>) (x_align <clutter-box-alignment>) (y_align <clutter-box-alignment>)Sets the horizontal and vertical alignment policies for actor inside layout
- layout
- a
<clutter-box-layout>- actor
- a
<clutter-actor>child of layout- x-align
- Horizontal alignment policy for actor
- y-align
- Vertical alignment policy for actor
Since 1.2
<clutter-box-layout>) (actor <clutter-actor>) ⇒ (x_align <clutter-box-alignment>) (y_align <clutter-box-alignment>)Retrieves the horizontal and vertical alignment policies for actor as set using
clutter-box-layout-packorclutter-box-layout-set-alignment
- layout
- a
<clutter-box-layout>- actor
- a
<clutter-actor>child of layout- x-align
- return location for the horizontal alignment policy.
- y-align
- return location for the vertical alignment policy.
Since 1.2
<clutter-box-layout>) (actor <clutter-actor>) (expand bool)Sets whether actor should expand inside layout
- layout
- a
<clutter-box-layout>- actor
- a
<clutter-actor>child of layout- expand
- whether actor should expand
Since 1.2
<clutter-box-layout>) (actor <clutter-actor>) ⇒ (ret bool)Retrieves whether actor should expand inside layout
- layout
- a
<clutter-box-layout>- actor
- a
<clutter-actor>child of layout- ret
- ‘
#t’ if the<clutter-actor>should expand, ‘#f’ otherwiseSince 1.2
<clutter-box-layout>) (actor <clutter-actor>) (x_fill bool) (y_fill bool)Sets the horizontal and vertical fill policies for actor inside layout
- layout
- a
<clutter-box-layout>- actor
- a
<clutter-actor>child of layout- x-fill
- whether actor should fill horizontally the allocated space
- y-fill
- whether actor should fill vertically the allocated space
Since 1.2
<clutter-box-layout>) (actor <clutter-actor>) ⇒ (x_fill bool) (y_fill bool)Retrieves the horizontal and vertical fill policies for actor as set using
clutter-box-layout-packorclutter-box-layout-set-fill
- layout
- a
<clutter-box-layout>- actor
- a
<clutter-actor>child of layout- x-fill
- return location for the horizontal fill policy.
- y-fill
- return location for the vertical fill policy.
Since 1.2
<clutter-box-layout>) (mode unsigned-long)Sets the easing mode to be used by layout when animating changes in layout properties
Use
clutter-box-layout-set-use-animationsto enable and disable the animations
- layout
- a
<clutter-box-layout>- mode
- an easing mode, either from
<clutter-animation-mode>or a logical id fromclutter-alpha-register-funcSince 1.2