![]() |
![]() |
![]() |
Moblin UI Toolkit Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces | Properties |
MxBoxLayout; ClutterActor * mx_box_layout_new (void); void mx_box_layout_set_vertical (MxBoxLayout *box, gboolean vertical); gboolean mx_box_layout_get_vertical (MxBoxLayout *box); void mx_box_layout_set_pack_start (MxBoxLayout *box, gboolean pack_start); gboolean mx_box_layout_get_pack_start (MxBoxLayout *box); void mx_box_layout_set_spacing (MxBoxLayout *box, guint spacing); guint mx_box_layout_get_spacing (MxBoxLayout *box);
GObject +----GInitiallyUnowned +----ClutterActor +----MxWidget +----MxBoxLayout +----MxListView
MxBoxLayout implements ClutterContainer, MxFocusable, MxScrollable, ClutterScriptable and MxStylable.
"enable-animations" gboolean : Read / Write "pack-start" gboolean : Read / Write "spacing" guint : Read / Write "vertical" gboolean : 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 "vertical" property set to FALSE.
Figure 2. Box layout with vertical flow
The image shows an MxBoxLayout with the "vertical" property set to TRUE.
typedef struct _MxBoxLayout 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_vertical (MxBoxLayout *box, gboolean vertical);
Set the value of the "vertical" property
|
A MxBoxLayout |
|
TRUE if the layout should be vertical |
gboolean mx_box_layout_get_vertical (MxBoxLayout *box);
Get the value of the "vertical" property.
|
A MxBoxLayout |
Returns : |
TRUE if the layout is vertical |
void mx_box_layout_set_pack_start (MxBoxLayout *box, gboolean pack_start);
Set the value of the "pack-start" property.
|
A MxBoxLayout |
|
TRUE if the layout should use pack-start |
gboolean mx_box_layout_get_pack_start (MxBoxLayout *box);
Get the value of the "pack-start" property.
|
A MxBoxLayout |
Returns : |
TRUE if pack-start is enabled |
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 |
"enable-animations"
property"enable-animations" gboolean : Read / Write
Enable animations between certain property and child property changes.
Default value: FALSE
"pack-start"
property"pack-start" gboolean : Read / Write
Whether to pack items at the start of the box.
Default value: FALSE
"vertical"
property"vertical" gboolean : Read / Write
Whether the layout should be vertical, rather than horizontal.
Default value: FALSE