HdyExpanderRow: Handy Reference Manual

## HdyExpanderRow HdyExpanderRow — A GtkListBox row used to reveal widgets. |

## Functions

GtkWidget * | hdy_expander_row_new ()
const gchar * | hdy_expander_row_get_subtitle ()
void | hdy_expander_row_set_subtitle ()
gboolean | hdy_expander_row_get_use_underline ()
void | hdy_expander_row_set_use_underline ()
const gchar * | hdy_expander_row_get_icon_name ()
void | hdy_expander_row_set_icon_name ()
gboolean | hdy_expander_row_get_expanded ()
void | hdy_expander_row_set_expanded ()
gboolean | hdy_expander_row_get_enable_expansion ()
void | hdy_expander_row_set_enable_expansion ()
gboolean | hdy_expander_row_get_show_enable_switch ()
void | hdy_expander_row_set_show_enable_switch ()
void | hdy_expander_row_add_action ()
void | hdy_expander_row_add_prefix ()

## Properties

gboolean | enable-expansion | Read / Write
gboolean | expanded | Read / Write
char * | icon-name | Read / Write
gboolean | show-enable-switch | Read / Write
char * | subtitle | Read / Write
gboolean | use-underline | Read / Write

## Types and Values

#define | HDY_TYPE_EXPANDER_ROW
struct | HdyExpanderRowClass
| HdyExpanderRow

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GtkWidget
                ╰── GtkContainer
                    ╰── GtkBin
                        ╰── GtkListBoxRow
                            ╰── HdyPreferencesRow
                                ╰── HdyExpanderRow

## Implemented Interfaces

HdyExpanderRow implements AtkImplementorIface, GtkBuildable and GtkActionable.

## Description

The HdyExpanderRow allows the user to reveal or hide widgets below it. It also allows the user to enable the expansion of the row, allowing to disable all that the row contains.

It also supports adding a child as an action widget by specifying “action” as the “type” attribute of a <child> element. It also supports setting a child as a prefix widget by specifying “prefix” as the “type” attribute of a <child> element.

### CSS nodes

HdyExpanderRow has a main CSS node with name row, and the .expander style class. It has the .empty style class when it contains no children.

It contains the subnodes row.header for its main embedded row, list.nested for the list it can expand, and image.expander-row-arrow for its arrow.

When expanded, HdyExpanderRow will add the .checked-expander-row-previous-sibling style class to its previous sibling, and remove it when retracted.

## Functions

### hdy_expander_row_new ()

    GtkWidget *
    hdy_expander_row_new (void);

Creates a new HdyExpanderRow.

#### Returns

a new HdyExpanderRow

Since: 0.0.6

### hdy_expander_row_get_subtitle ()

    const gchar *
    hdy_expander_row_get_subtitle (HdyExpanderRow *self);

Gets the subtitle for `self` .

#### Parameters

self | a HdyExpanderRow |

#### Returns

the subtitle for `self` , or `NULL`.

[transfer none][nullable]

Since: 1.0

### hdy_expander_row_set_subtitle ()

    void
    hdy_expander_row_set_subtitle (HdyExpanderRow *self,
                                   const gchar *subtitle);

Sets the subtitle for `self` .

#### Parameters

self | a HdyExpanderRow |
subtitle | the subtitle. | [nullable]

Since: 1.0

### hdy_expander_row_get_use_underline ()

    gboolean
    hdy_expander_row_get_use_underline (HdyExpanderRow *self);

Gets whether an embedded underline in the text of the title and subtitle labels indicates a mnemonic. See `hdy_expander_row_set_use_underline()`.

#### Parameters

self | a HdyExpanderRow |

#### Returns

`TRUE` if an embedded underline in the title and subtitle labels indicates the mnemonic accelerator keys.

Since: 1.0

### hdy_expander_row_set_use_underline ()

    void
    hdy_expander_row_set_use_underline (HdyExpanderRow *self,
                                        gboolean use_underline);

If true, an underline in the text of the title and subtitle labels indicates the next character should be used for the mnemonic accelerator key.

#### Parameters

self | a HdyExpanderRow |
use_underline | `TRUE` if underlines in the text indicate mnemonics |

Since: 1.0

### hdy_expander_row_get_icon_name ()

    const gchar *
    hdy_expander_row_get_icon_name (HdyExpanderRow *self);

Gets the icon name for `self` .

#### Parameters

self | a HdyExpanderRow |

#### Returns

the icon name for `self` .

Since: 1.0

### hdy_expander_row_set_icon_name ()

    void
    hdy_expander_row_set_icon_name (HdyExpanderRow *self,
                                    const gchar *icon_name);

Sets the icon name for `self` .

#### Parameters

self | a HdyExpanderRow |
icon_name | the icon name |

Since: 1.0

### hdy_expander_row_get_expanded ()

    gboolean
    hdy_expander_row_get_expanded (HdyExpanderRow *self);

### hdy_expander_row_set_expanded ()

    void
    hdy_expander_row_set_expanded (HdyExpanderRow *self,
                                   gboolean expanded);

### hdy_expander_row_get_enable_expansion ()

    gboolean
    hdy_expander_row_get_enable_expansion (HdyExpanderRow *self);

Gets whether the expansion of `self` is enabled.

#### Parameters

self | a HdyExpanderRow |

#### Returns

whether the expansion of `self` is enabled.

Since: 0.0.6

### hdy_expander_row_set_enable_expansion ()

    void
    hdy_expander_row_set_enable_expansion (HdyExpanderRow *self,
                                           gboolean enable_expansion);

Sets whether the expansion of `self` is enabled.

#### Parameters

self | a HdyExpanderRow |
enable_expansion | `TRUE` to enable the expansion |

Since: 0.0.6

### hdy_expander_row_get_show_enable_switch ()

    gboolean
    hdy_expander_row_get_show_enable_switch
                                   (HdyExpanderRow *self);

Gets whether the switch enabling the expansion of `self` is visible.

#### Parameters

self | a HdyExpanderRow |

#### Returns

whether the switch enabling the expansion of `self` is visible.

Since: 0.0.6

### hdy_expander_row_set_show_enable_switch ()

    void
    hdy_expander_row_set_show_enable_switch
                                   (HdyExpanderRow *self,
                                    gboolean show_enable_switch);

Sets whether the switch enabling the expansion of `self` is visible.

#### Parameters

self | a HdyExpanderRow |
show_enable_switch | `TRUE` to show the switch enabling the expansion |

Since: 0.0.6

### hdy_expander_row_add_action ()

    void
    hdy_expander_row_add_action (HdyExpanderRow *self,
                                 GtkWidget *widget);

Adds an action widget to `self` .

#### Parameters

self | a HdyExpanderRow |
widget | the action widget |

Since: 1.0

### hdy_expander_row_add_prefix ()

    void
    hdy_expander_row_add_prefix (HdyExpanderRow *self,
                                 GtkWidget *widget);

Adds a prefix widget to `self` .

#### Parameters

self | a HdyExpanderRow |
widget | the prefix widget |

Since: 1.0

## Types and Values

### HDY_TYPE_EXPANDER_ROW

    #define HDY_TYPE_EXPANDER_ROW (hdy_expander_row_get_type())

### struct HdyExpanderRowClass

    struct HdyExpanderRowClass {
      HdyPreferencesRowClass parent_class;
    };

#### Members

### HdyExpanderRow

    typedef struct _HdyExpanderRow HdyExpanderRow;

## Property Details

### The `“enable-expansion”` property

      “enable-expansion”         gboolean

`TRUE` if the expansion is enabled.

Owner: HdyExpanderRow

Flags: Read / Write

Default value: TRUE

### The `“expanded”` property

      “expanded”                 gboolean

`TRUE` if the row is expanded.

Owner: HdyExpanderRow

Flags: Read / Write

Default value: FALSE

### The `“icon-name”` property

      “icon-name”                char *

The icon name for this row.

Owner: HdyExpanderRow

Flags: Read / Write

Default value: ""

Since: 1.0

### The `“show-enable-switch”` property

      “show-enable-switch”       gboolean

`TRUE` if the switch enabling the expansion is visible.

Owner: HdyExpanderRow

Flags: Read / Write

Default value: FALSE

### The `“subtitle”` property

      “subtitle”                 char *

The subtitle for this row.

Owner: HdyExpanderRow

Flags: Read / Write

Default value: ""

Since: 1.0

### The `“use-underline”` property

      “use-underline”            gboolean

Whether an embedded underline in the text of the title and subtitle labels indicates a mnemonic.

Owner: HdyExpanderRow

Flags: Read / Write

Default value: FALSE

Since: 1.0