NbtkBoxLayout

NbtkBoxLayout — a layout container arranging children in a single line

Synopsis

                    NbtkBoxLayout;
NbtkWidget *        nbtk_box_layout_new                 (void);
void                nbtk_box_layout_set_vertical        (NbtkBoxLayout *box,
                                                         gboolean vertical);
gboolean            nbtk_box_layout_get_vertical        (NbtkBoxLayout *box);
void                nbtk_box_layout_set_pack_start      (NbtkBoxLayout *box,
                                                         gboolean pack_start);
gboolean            nbtk_box_layout_get_pack_start      (NbtkBoxLayout *box);
void                nbtk_box_layout_set_spacing         (NbtkBoxLayout *box,
                                                         guint spacing);
guint               nbtk_box_layout_get_spacing         (NbtkBoxLayout *box);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----ClutterActor
               +----NbtkWidget
                     +----NbtkBoxLayout
                           +----NbtkListView

Implemented Interfaces

NbtkBoxLayout implements ClutterScriptable, NbtkStylable, ClutterContainer and NbtkScrollable.

Properties

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

Description

The NbtkBoxLayout 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.

Details

NbtkBoxLayout

typedef struct _NbtkBoxLayout NbtkBoxLayout;

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


nbtk_box_layout_new ()

NbtkWidget *        nbtk_box_layout_new                 (void);

Create a new NbtkBoxLayout.

Returns :

a newly allocated NbtkBoxLayout

nbtk_box_layout_set_vertical ()

void                nbtk_box_layout_set_vertical        (NbtkBoxLayout *box,
                                                         gboolean vertical);

Set the value of the "vertical" property

box :

A NbtkBoxLayout

vertical :

TRUE if the layout should be vertical

nbtk_box_layout_get_vertical ()

gboolean            nbtk_box_layout_get_vertical        (NbtkBoxLayout *box);

Get the value of the "vertical" property.

box :

A NbtkBoxLayout

Returns :

TRUE if the layout is vertical

nbtk_box_layout_set_pack_start ()

void                nbtk_box_layout_set_pack_start      (NbtkBoxLayout *box,
                                                         gboolean pack_start);

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

box :

A NbtkBoxLayout

pack_start :

TRUE if the layout should use pack-start

nbtk_box_layout_get_pack_start ()

gboolean            nbtk_box_layout_get_pack_start      (NbtkBoxLayout *box);

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

box :

A NbtkBoxLayout

Returns :

TRUE if pack-start is enabled

nbtk_box_layout_set_spacing ()

void                nbtk_box_layout_set_spacing         (NbtkBoxLayout *box,
                                                         guint spacing);

Set the amount of spacing between children in pixels

box :

A NbtkBoxLayout

spacing :

the spacing value

nbtk_box_layout_get_spacing ()

guint               nbtk_box_layout_get_spacing         (NbtkBoxLayout *box);

Get the spacing between children in pixels

box :

A NbtkBoxLayout

Returns :

the spacing value

Property Details

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, ratherthan horizontal.

Default value: FALSE