NbtkBin

NbtkBin — a simple container with one actor

Synopsis

                    NbtkBin;
NbtkWidget *        nbtk_bin_new                        (void);
void                nbtk_bin_set_child                  (NbtkBin *bin,
                                                         ClutterActor *child);
ClutterActor *      nbtk_bin_get_child                  (NbtkBin *bin);
void                nbtk_bin_set_alignment              (NbtkBin *bin,
                                                         NbtkAlign x_align,
                                                         NbtkAlign y_align);
void                nbtk_bin_get_alignment              (NbtkBin *bin,
                                                         NbtkAlign *x_align,
                                                         NbtkAlign *y_align);
void                nbtk_bin_set_fill                   (NbtkBin *bin,
                                                         gboolean x_fill,
                                                         gboolean y_fill);
void                nbtk_bin_get_fill                   (NbtkBin *bin,
                                                         gboolean *x_fill,
                                                         gboolean *y_fill);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----ClutterActor
               +----NbtkWidget
                     +----NbtkBin
                           +----NbtkButton
                           +----NbtkExpander
                           +----NbtkScrollBar
                           +----NbtkScrollView
                           +----NbtkViewport

Implemented Interfaces

NbtkBin implements ClutterContainer, ClutterScriptable and NbtkStylable.

Properties

  "child"                    ClutterActor*         : Read / Write
  "x-align"                  NbtkAlign             : Read / Write
  "x-fill"                   gboolean              : Read / Write
  "y-align"                  NbtkAlign             : Read / Write
  "y-fill"                   gboolean              : Read / Write

Description

NbtkBin is a simple container capable of having only one ClutterActor as a child.

NbtkBin inherits from NbtkWidget, so it is fully themable.

Details

NbtkBin

typedef struct _NbtkBin NbtkBin;

The NbtkBin struct contains only private data


nbtk_bin_new ()

NbtkWidget *        nbtk_bin_new                        (void);

Creates a new NbtkBin, a simple container for one child.

Returns :

the newly created NbtkBin actor

nbtk_bin_set_child ()

void                nbtk_bin_set_child                  (NbtkBin *bin,
                                                         ClutterActor *child);

Sets child as the child of bin.

If bin already has a child, the previous child is removed.

bin :

a NbtkBin

child :

a ClutterActor, or NULL

nbtk_bin_get_child ()

ClutterActor *      nbtk_bin_get_child                  (NbtkBin *bin);

Retrieves a pointer to the child of bin.

bin :

a NbtkBin

Returns :

a ClutterActor, or NULL

nbtk_bin_set_alignment ()

void                nbtk_bin_set_alignment              (NbtkBin *bin,
                                                         NbtkAlign x_align,
                                                         NbtkAlign y_align);

Sets the horizontal and vertical alignment of the child inside a NbtkBin.

bin :

a NbtkBin

x_align :

horizontal alignment

y_align :

vertical alignment

nbtk_bin_get_alignment ()

void                nbtk_bin_get_alignment              (NbtkBin *bin,
                                                         NbtkAlign *x_align,
                                                         NbtkAlign *y_align);

Retrieves the horizontal and vertical alignment of the child inside a NbtkBin, as set by nbtk_bin_set_alignment().

bin :

a NbtkBin

x_align :

return location for the horizontal alignment, or NULL

y_align :

return location for the vertical alignment, or NULL

nbtk_bin_set_fill ()

void                nbtk_bin_set_fill                   (NbtkBin *bin,
                                                         gboolean x_fill,
                                                         gboolean y_fill);

Sets whether the child of bin should fill out the horizontal and/or vertical allocation of the parent

bin :

a NbtkBin

x_fill :

TRUE if the child should fill horizontally the bin

y_fill :

TRUE if the child should fill vertically the bin

nbtk_bin_get_fill ()

void                nbtk_bin_get_fill                   (NbtkBin *bin,
                                                         gboolean *x_fill,
                                                         gboolean *y_fill);

Retrieves the horizontal and vertical fill settings

bin :

a NbtkBin

x_fill :

return location for the horizontal fill, or NULL. out.

y_fill :

return location for the vertical fill, or NULL. out.

Property Details

The "child" property

  "child"                    ClutterActor*         : Read / Write

The child ClutterActor of the NbtkBin container.


The "x-align" property

  "x-align"                  NbtkAlign             : Read / Write

The horizontal alignment of the NbtkBin child.

Default value: NBTK_ALIGN_MIDDLE


The "x-fill" property

  "x-fill"                   gboolean              : Read / Write

Whether the child should fill the horizontal allocation

Default value: FALSE


The "y-align" property

  "y-align"                  NbtkAlign             : Read / Write

The vertical alignment of the NbtkBin child.

Default value: NBTK_ALIGN_MIDDLE


The "y-fill" property

  "y-fill"                   gboolean              : Read / Write

Whether the child should fill the vertical allocation

Default value: FALSE