MxExpander

## MxExpander MxExpander — a container which the user can show or hide its child |

## Synopsis

                        MxExpander;
                        MxExpanderClass;
    ClutterActor *      mx_expander_new                     (void);
    void                mx_expander_set_label               (MxExpander *expander,
                                                             const gchar *label);
    gboolean            mx_expander_get_expanded            (MxExpander *expander);
    void                mx_expander_set_expanded            (MxExpander *expander,
                                                             gboolean expanded);

## Object Hierarchy

      GObject
       +----GInitiallyUnowned
             +----ClutterActor
                   +----MxWidget
                         +----MxBin
                               +----MxExpander

## Implemented Interfaces

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

## Properties

      "expanded"                 gboolean              : Read / Write
      "label"                    gchar*                : Read / Write

## Signals

      "expand-complete"                                : Run Last

## Description

MxExpander is a single child container that allows the user to show or hide its child. It displays a clickable bar (with a text label), which (by default) when clicked toggles display of the child.

Figure 3. MxExpander in its expanded state

The image shows an MxExpander with the "expanded" property set to TRUE.

Figure 4. MxExpander in its contracted state

The image shows an MxExpander with the "expanded" property set to FALSE.

## Details

### MxExpander

    typedef struct _MxExpander MxExpander;

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

### MxExpanderClass

    typedef struct {
      MxBinClass parent_class;

      /* signals */
      void (* expand_complete)   (MxExpander *expander);

      /* padding for future expansion */
      void (*_padding_0) (void);
      void (*_padding_1) (void);
      void (*_padding_2) (void);
      void (*_padding_3) (void);
      void (*_padding_4) (void);
    } MxExpanderClass;

### mx_expander_new ()

    ClutterActor *      mx_expander_new                     (void);

Creates a new MxExpander

Returns : | the newly allocated MxExpander

### mx_expander_set_label ()

    void                mx_expander_set_label               (MxExpander *expander,
                                                             const gchar *label);

Sets the text displayed as the title of the expander

`expander` : | A MxExpander
`label` : | string to set as the expander label

### mx_expander_get_expanded ()

    gboolean            mx_expander_get_expanded            (MxExpander *expander);

Get the current state of the expander (the value of "expanded")

`expander` : | a MxExpander
Returns : | TRUE if the expander is open, FALSE if it is closed

### mx_expander_set_expanded ()

    void                mx_expander_set_expanded            (MxExpander *expander,
                                                             gboolean expanded);

Set the state (the "expanded" property) of the expander. This will cause the expander to open or close.

`expander` : | A MxExpander
`expanded` : | the state of the expander to set

## Property Details

### The `"expanded"` property

      "expanded"                 gboolean              : Read / Write

Indicates that the expander is open or closed.

Default value: FALSE

### The `"label"` property

      "label"                    gchar*                : Read / Write

Expander title label.

Default value: NULL

## Signal Details

### The `"expand-complete"` signal

    void                user_function                      (MxExpander *expander,
                                                            gpointer    user_data)      : Run Last

Emitted after the expand animation finishes. Check the "expanded" property of the MxExpander to determine if the expander is expanded or not.

`expander` : | the object that received the signal
`user_data` : | user data set when the signal handler was connected.