Adw.SplitButton
Description: Reference for Adw.SplitButton

### Class

# AdwSplitButton

#### Description [src]

    final class Adw.SplitButton : Gtk.Widget {
      /* No available fields */
    }

A combined button and dropdown widget.

`AdwSplitButton` is typically used to present a set of actions in a menu, but allow access to one of them with a single click.

The API is very similar to `GtkButton` and `GtkMenuButton`, see their documentation for details.

## CSS nodes

    splitbutton[.image-button][.text-button]
    ├── button
    │   ╰── <content>
    ├── separator
    ╰── menubutton
        ╰── button.toggle
            ╰── arrow

`AdwSplitButton`‘s CSS node is called `splitbutton`. It contains the css nodes: `button`, `separator`, `menubutton`. See `GtkMenuButton` documentation for the `menubutton` contents.

The main CSS node will contain the `.image-button` or `.text-button` style classes matching the button contents. The nested button nodes will never contain them.

## Accessibility

`AdwSplitButton` uses the `GTK_ACCESSIBLE_ROLE_GROUP` role.

Available since: | 1.0

#### Hierarchy

#### Ancestors

- GtkWidget
- GInitiallyUnowned
- GObject

#### Implements

- GtkAccessible
- GtkActionable
- GtkBuildable
- GtkConstraintTarget

#### Constructors

###### adw_split_button_new

Creates a new `AdwSplitButton`.

Available since: 1.0

#### Instance methods

###### adw_split_button_get_child

Gets the child widget.

Available since: 1.0

###### adw_split_button_get_direction

Gets the direction in which the popup will be popped up.

Available since: 1.0

###### adw_split_button_get_icon_name

Gets the name of the icon used to automatically populate the button.

Available since: 1.0

###### adw_split_button_get_label

Gets the label for `self`.

Available since: 1.0

###### adw_split_button_get_menu_model

Gets the menu model from which the popup will be created.

Available since: 1.0

###### adw_split_button_get_popover

Gets the popover that will be popped up when the dropdown is clicked.

Available since: 1.0

###### adw_split_button_get_use_underline

Gets whether an underline in the text indicates a mnemonic.

Available since: 1.0

###### adw_split_button_popdown

Dismisses the menu.

Available since: 1.0

###### adw_split_button_popup

Pops up the menu.

Available since: 1.0

###### adw_split_button_set_child

Sets the child widget.

Available since: 1.0

###### adw_split_button_set_direction

Sets the direction in which the popup will be popped up.

Available since: 1.0

###### adw_split_button_set_icon_name

Sets the name of the icon used to automatically populate the button.

Available since: 1.0

###### adw_split_button_set_label

Sets the label for `self`.

Available since: 1.0

###### adw_split_button_set_menu_model

Sets the menu model from which the popup will be created.

Available since: 1.0

###### adw_split_button_set_popover

Sets the popover that will be popped up when the dropdown is clicked.

Available since: 1.0

###### adw_split_button_set_use_underline

Sets whether an underline in the text indicates a mnemonic.

Available since: 1.0

##### Methods inherited from GtkWidget (159)

##### Methods inherited from GObject (43)

#### Properties

###### Adw.SplitButton:child

The child widget.

Available since: 1.0

###### Adw.SplitButton:direction

The direction in which the popup will be popped up.

Available since: 1.0

###### Adw.SplitButton:icon-name

The name of the icon used to automatically populate the button.

Available since: 1.0

###### Adw.SplitButton:label

The label for the button.

Available since: 1.0

###### Adw.SplitButton:menu-model

The `GMenuModel` from which the popup will be created.

Available since: 1.0

###### Adw.SplitButton:popover

The `GtkPopover` that will be popped up when the dropdown is clicked.

Available since: 1.0

###### Adw.SplitButton:use-underline

Whether an underline in the text indicates a mnemonic.

Available since: 1.0

##### Properties inherited from GtkWidget (34)

#### Signals

###### Adw.SplitButton::activate

Emitted to animate press then release.

Available since: 1.0

###### Adw.SplitButton::clicked

Emitted when the button has been activated (pressed and released).

Available since: 1.0

##### Signals inherited from GtkWidget (13)

##### Signals inherited from GObject (1)

#### Class structure

    struct AdwSplitButtonClass {
      GtkWidgetClass parent_class;

    }

###### Class members

`parent_class` |
    GtkWidgetClass
| No description available.