Top | ![]() |
![]() |
![]() |
![]() |
gboolean | enable-animations | Read / Write |
MxOrientation | orientation | Read / Write |
gboolean | scroll-to-focused | Read / Write |
guint | spacing | Read / Write |
GObject ╰── GInitiallyUnowned ╰── ClutterActor ╰── MxWidget ╰── MxBoxLayout ╰── MxListView
MxBoxLayout implements ClutterContainer, ClutterScriptable, ClutterAnimatable, AtkImplementorIface, MxStylable, MxScrollable and MxFocusable.
The MxBoxLayout arranges its children along a single line, where each child can be allocated either its preferred size or larger if the expand option is set. If the fill option is set, the actor will be allocated more than its requested size. If the fill option is not set, but the expand option is enabled, then the position of the actor within the available space can be determined by the alignment child property.
Figure 1. Box layout with horizontal flow
The image shows an MxBoxLayout with the “orientation” property set to MX_ORIENTATION_HORIZONTAL.
Figure 2. Box layout with vertical flow
The image shows an MxBoxLayout with the “orientation” property set to MX_ORIENTATION_VERTICAL.
void mx_box_layout_set_orientation (MxBoxLayout *box
,MxOrientation orientation
);
Set the orientation of the box layout.
MxOrientation
mx_box_layout_get_orientation (MxBoxLayout *box
);
Get the value of the “orientation” property.
void mx_box_layout_set_spacing (MxBoxLayout *box
,guint spacing
);
Set the amount of spacing between children in pixels
guint
mx_box_layout_get_spacing (MxBoxLayout *box
);
Get the spacing between children in pixels
gboolean
mx_box_layout_get_enable_animations (MxBoxLayout *box
);
Get the value of the “enable-animations” property.
void mx_box_layout_set_enable_animations (MxBoxLayout *box
,gboolean enable_animations
);
Enable animations when certain properties change.
void mx_box_layout_add_actor (MxBoxLayout *box
,ClutterActor *actor
,gint position
);
Inserts actor
at position
in box
.
box |
||
actor |
the ClutterActor actor to add to the box layout |
|
position |
the position where to insert the actor |
void mx_box_layout_add_actor_with_properties (MxBoxLayout *box
,ClutterActor *actor
,gint position
,const char *first_property
,...
);
Inserts actor
at position
in the layout box
. You can set some layout
properties on the child at the same time.
If position
is negative, or is larger than the number of actors in the
layout, the new actor is added on to the end of the list.
box |
||
actor |
the ClutterActor actor to add to the box layout |
|
position |
the position where to insert the actor |
|
first_property |
name of the first property to set |
|
... |
value for the first property, followed optionally by more name/value pairs terminated with NULL. |
void mx_box_layout_set_scroll_to_focused (MxBoxLayout *box
,gboolean scroll_to_focused
);
Enables or disables automatic scrolling to the focused actor.
Since: 1.2
gboolean
mx_box_layout_get_scroll_to_focused (MxBoxLayout *box
);
Get the value of the “scroll-to-focused” property.
Since: 1.2
struct MxBoxLayout;
The contents of this structure are private and should only be accessed through the public API.
“enable-animations”
property“enable-animations” gboolean
Enable animations between certain property and child property changes.
Flags: Read / Write
Default value: FALSE
“orientation”
property“orientation” MxOrientation
Orientation of the layout.
Flags: Read / Write
Default value: MX_ORIENTATION_HORIZONTAL
“scroll-to-focused”
property“scroll-to-focused” gboolean
Automatically scroll to the focused actor.
Flags: Read / Write
Default value: TRUE
“spacing”
property“spacing” guint
Spacing between children.
Flags: Read / Write
Default value: 0