MxBin

MxBin — a simple container with one actor.

Functions

Properties

ClutterActor * child Read / Write
MxAlign x-align Read / Write
gboolean x-fill Read / Write
MxAlign y-align Read / Write
gboolean y-fill Read / Write

Types and Values

struct MxBin
struct MxBinClass

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── ClutterActor
            ╰── MxWidget
                ╰── MxBin
                    ├── MxButton
                    ├── MxDialog
                    ├── MxExpander
                    ├── MxFrame
                    ├── MxKineticScrollView
                    ├── MxScrollBar
                    ├── MxScrollView
                    ├── MxToolbar
                    ╰── MxViewport

Implemented Interfaces

MxBin implements ClutterContainer, ClutterScriptable, ClutterAnimatable, AtkImplementorIface, MxStylable and MxFocusable.

Description

MxBin is a simple abstract container capable of having only one ClutterActor as a child. MxBin does not allocate the child itself, therefore any subclasses are required to implement the ClutterActorClass.allocate function. mx_bin_allocate_child() can be used if no special allocation requirements are needed.

MxFrame is a simple implementation of MxBin that can be used as a single actor container that implements alignment and padding.

Functions

mx_bin_allocate_child ()

void
mx_bin_allocate_child (MxBin *bin,
                       const ClutterActorBox *box,
                       ClutterAllocationFlags flags);

Allocates the child of an MxBin using the width and height from box . This function should usually only be called by subclasses of MxBin.

This function can be used to allocate the child of an MxBin if no special allocation requirements are needed. It is similar to mx_allocate_align_fill, except that it reads the alignment, padding and fill values from the MxBin, and will call clutter_actor_allocate on the child.

Parameters

bin

An MxBin

 

box

The allocation box of the parent actor.

 

flags

ClutterAllocationFlags, usually provided by the. clutter_actor_allocate function.

 

mx_bin_set_child ()

void
mx_bin_set_child (MxBin *bin,
                  ClutterActor *child);

Sets child as the child of bin .

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

Parameters

bin

a MxBin

 

child

a ClutterActor, or NULL

 

mx_bin_get_child ()

ClutterActor *
mx_bin_get_child (MxBin *bin);

Retrieves a pointer to the child of bin .

Parameters

bin

a MxBin

 

Returns

a ClutterActor, or NULL.

[transfer none]


mx_bin_set_alignment ()

void
mx_bin_set_alignment (MxBin *bin,
                      MxAlign x_align,
                      MxAlign y_align);

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

Parameters

bin

a MxBin

 

x_align

horizontal alignment

 

y_align

vertical alignment

 

mx_bin_get_alignment ()

void
mx_bin_get_alignment (MxBin *bin,
                      MxAlign *x_align,
                      MxAlign *y_align);

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

Parameters

bin

a MxBin

 

x_align

return location for the horizontal alignment, or NULL

 

y_align

return location for the vertical alignment, or NULL

 

mx_bin_set_fill ()

void
mx_bin_set_fill (MxBin *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

Parameters

bin

a MxBin

 

x_fill

TRUE if the child should fill horizontally the bin

 

y_fill

TRUE if the child should fill vertically the bin

 

mx_bin_get_fill ()

void
mx_bin_get_fill (MxBin *bin,
                 gboolean *x_fill,
                 gboolean *y_fill);

Retrieves the horizontal and vertical fill settings

Parameters

bin

a MxBin

 

x_fill

return location for the horizontal fill, or NULL.

[out]

y_fill

return location for the vertical fill, or NULL.

[out]

Types and Values

struct MxBin

struct MxBin;

The MxBin struct contains only private data


struct MxBinClass

struct MxBinClass {
};

The MxBinClass struct contains only private data

Property Details

The “child” property

  “child”                    ClutterActor *

The child ClutterActor of the MxBin container.

Flags: Read / Write


The “x-align” property

  “x-align”                  MxAlign

The horizontal alignment of the MxBin child.

Flags: Read / Write

Default value: MX_ALIGN_MIDDLE


The “x-fill” property

  “x-fill”                   gboolean

Whether the child should fill the horizontal allocation

Flags: Read / Write

Default value: FALSE


The “y-align” property

  “y-align”                  MxAlign

The vertical alignment of the MxBin child.

Flags: Read / Write

Default value: MX_ALIGN_MIDDLE


The “y-fill” property

  “y-fill”                   gboolean

Whether the child should fill the vertical allocation

Flags: Read / Write

Default value: FALSE