MxExpander

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

Functions

Properties

gboolean expanded Read / Write
gchar * label Read / Write

Signals

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── ClutterActor
            ╰── MxWidget
                ╰── MxBin
                    ╰── MxExpander

Implemented Interfaces

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

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.

MxExpander in its expanded state

Figure 4. MxExpander in its contracted state

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

MxExpander in its contracted state

Functions

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

Parameters

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

Parameters

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.

Parameters

expander

A MxExpander

 

expanded

the state of the expander to set

 

Types and Values

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;

Property Details

The “expanded” property

  “expanded”                 gboolean

Indicates that the expander is open or closed.

Flags: Read / Write

Default value: FALSE


The “label” property

  “label”                    gchar *

Expander title label.

Flags: Read / Write

Default value: NULL

Signal Details

The “expand-complete” signal

void
user_function (MxExpander *expander,
               gpointer    user_data)

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

Parameters

expander

the object that received the signal

 

user_data

user data set when the signal handler was connected.

 

Flags: Run Last