MxBoxLayout

MxBoxLayout — a layout container arranging children in a single line

Synopsis

                    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);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----ClutterActor
               +----MxWidget
                     +----MxBoxLayout
                           +----MxListView

Implemented Interfaces

MxBoxLayout implements ClutterScriptable, MxStylable, ClutterContainer and MxScrollable.

Properties

  "enable-animations"        gboolean              : Read / Write
  "pack-start"               gboolean              : Read / Write
  "spacing"                  guint                 : Read / Write
  "vertical"                 gboolean              : Read / Write

Description

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.

Box layout with horizontal flow


Figure 2. Box layout with vertical flow

The image shows an MxBoxLayout with the "vertical" property set to TRUE.

Box layout with vertical flow


Details

MxBoxLayout

typedef struct _MxBoxLayout MxBoxLayout;

The contents of this structure are private and should only be accessed through the public API.


mx_box_layout_new ()

ClutterActor *      mx_box_layout_new                   (void);

Create a new MxBoxLayout.

Returns :

a newly allocated MxBoxLayout

mx_box_layout_set_vertical ()

void                mx_box_layout_set_vertical          (MxBoxLayout *box,
                                                         gboolean vertical);

Set the value of the "vertical" property

box :

A MxBoxLayout

vertical :

TRUE if the layout should be vertical

mx_box_layout_get_vertical ()

gboolean            mx_box_layout_get_vertical          (MxBoxLayout *box);

Get the value of the "vertical" property.

box :

A MxBoxLayout

Returns :

TRUE if the layout is vertical

mx_box_layout_set_pack_start ()

void                mx_box_layout_set_pack_start        (MxBoxLayout *box,
                                                         gboolean pack_start);

Set the value of the "pack-start" property.

box :

A MxBoxLayout

pack_start :

TRUE if the layout should use pack-start

mx_box_layout_get_pack_start ()

gboolean            mx_box_layout_get_pack_start        (MxBoxLayout *box);

Get the value of the "pack-start" property.

box :

A MxBoxLayout

Returns :

TRUE if pack-start is enabled

mx_box_layout_set_spacing ()

void                mx_box_layout_set_spacing           (MxBoxLayout *box,
                                                         guint spacing);

Set the amount of spacing between children in pixels

box :

A MxBoxLayout

spacing :

the spacing value

mx_box_layout_get_spacing ()

guint               mx_box_layout_get_spacing           (MxBoxLayout *box);

Get the spacing between children in pixels

box :

A MxBoxLayout

Returns :

the spacing value

Property Details

The "enable-animations" property

  "enable-animations"        gboolean              : Read / Write

Enable animations between certain property and child property changes.

Default value: FALSE


The "pack-start" property

  "pack-start"               gboolean              : Read / Write

Whether to pack items at the start of the box.

Default value: FALSE


The "spacing" property

  "spacing"                  guint                 : Read / Write

Spacing between children.

Default value: 0


The "vertical" property

  "vertical"                 gboolean              : Read / Write

Whether the layout should be vertical, rather than horizontal.

Default value: FALSE