![]() |
![]() |
![]() |
Mx Toolkit Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties |
struct MxBoxLayout; ClutterActor * mx_box_layout_new (void
); void mx_box_layout_set_orientation (MxBoxLayout *box
,MxOrientation orientation
); MxOrientation mx_box_layout_get_orientation (MxBoxLayout *box
); void mx_box_layout_set_spacing (MxBoxLayout *box
,guint spacing
); guint mx_box_layout_get_spacing (MxBoxLayout *box
); gboolean mx_box_layout_get_enable_animations (MxBoxLayout *box
); void mx_box_layout_set_enable_animations (MxBoxLayout *box
,gboolean enable_animations
); void mx_box_layout_add_actor (MxBoxLayout *box
,ClutterActor *actor
,gint position
); void mx_box_layout_add_actor_with_properties (MxBoxLayout *box
,ClutterActor *actor
,gint position
,const char *first_property
,...
);
GObject +----GInitiallyUnowned +----ClutterActor +----MxWidget +----MxBoxLayout +----MxListView
MxBoxLayout implements ClutterScriptable, MxStylable, ClutterContainer, MxScrollable and MxFocusable.
"enable-animations" gboolean : Read / Write "orientation" MxOrientation : Read / Write "spacing" guint : Read / Write
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.
struct MxBoxLayout;
The contents of this structure are private and should only be accessed through the public API.
ClutterActor * mx_box_layout_new (void
);
Create a new MxBoxLayout.
Returns : |
a newly allocated MxBoxLayout |
void mx_box_layout_set_orientation (MxBoxLayout *box
,MxOrientation orientation
);
Set the orientation of the box layout.
|
A MxBoxLayout |
|
orientation value for the layout |
MxOrientation mx_box_layout_get_orientation (MxBoxLayout *box
);
Get the value of the "orientation" property.
|
A MxBoxLayout |
Returns : |
the orientation of the layout |
void mx_box_layout_set_spacing (MxBoxLayout *box
,guint spacing
);
Set the amount of spacing between children in pixels
|
A MxBoxLayout |
|
the spacing value |
guint mx_box_layout_get_spacing (MxBoxLayout *box
);
Get the spacing between children in pixels
|
A MxBoxLayout |
Returns : |
the spacing value |
gboolean mx_box_layout_get_enable_animations (MxBoxLayout *box
);
Get the value of the "enable-animations" property.
|
A MxBoxLayout |
Returns : |
TRUE if animations enabled |
void mx_box_layout_set_enable_animations (MxBoxLayout *box
,gboolean enable_animations
);
Enable animations when certain properties change.
|
A MxBoxLayout |
|
TRUE to enable animations |
void mx_box_layout_add_actor (MxBoxLayout *box
,ClutterActor *actor
,gint position
);
Inserts actor
at position
in box
.
|
a MxBoxLayout |
|
the ClutterActor actor to add to the box layout |
|
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.
|
a MxBoxLayout |
|
the ClutterActor actor to add to the box layout |
|
the position where to insert the actor |
|
name of the first property to set |
|
value for the first property, followed optionally by more name/value pairs terminated with NULL. |
"enable-animations"
property"enable-animations" gboolean : Read / Write
Enable animations between certain property and child property changes.
Default value: FALSE
"orientation"
property"orientation" MxOrientation : Read / Write
Orientation of the layout.
Default value: MX_ORIENTATION_HORIZONTAL