NbtkExpander

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

Synopsis

                    NbtkExpander;
NbtkWidget*         nbtk_expander_new                   (void);
void                nbtk_expander_set_label             (NbtkExpander *expander,
                                                         const gchar *label);
gboolean            nbtk_expander_get_expanded          (NbtkExpander *expander);
void                nbtk_expander_set_expanded          (NbtkExpander *expander,
                                                         gboolean expanded);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----ClutterActor
               +----NbtkWidget
                     +----NbtkBin
                           +----NbtkExpander

Implemented Interfaces

NbtkExpander implements ClutterContainer, ClutterScriptable and NbtkStylable.

Properties

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

Signals

  "expand-complete"                                : Run Last

Description

NbtkExpander is a single child container that allows the user to show or hide its child.

Details

NbtkExpander

typedef struct _NbtkExpander NbtkExpander;

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


nbtk_expander_new ()

NbtkWidget*         nbtk_expander_new                   (void);

Creates a new NbtkExpander

Returns :

the newly allocated NbtkExpander

nbtk_expander_set_label ()

void                nbtk_expander_set_label             (NbtkExpander *expander,
                                                         const gchar *label);

Sets the text displayed as the title of the expander

expander :

A NbtkExpander

label :

string to set as the expander label

nbtk_expander_get_expanded ()

gboolean            nbtk_expander_get_expanded          (NbtkExpander *expander);

Get the current state of the expander

expander :

a NbtkExpander

Returns :

TRUE if the expander is open, FALSE if it is closed

nbtk_expander_set_expanded ()

void                nbtk_expander_set_expanded          (NbtkExpander *expander,
                                                         gboolean expanded);

Set the state of the expander. This will cause the expander to open and close if the state is changed.

expander :

A NbtkExpander

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                      (NbtkExpander *expander,
                                                        gpointer      user_data)      : Run Last

Emitted after the expand animation finishes. Check the "expanded" property of the NbtkExpander 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.