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.
Constructors
adw_split_button_new
Creates a new AdwSplitButton.
Instance methods
adw_split_button_get_child
Gets the child widget.
adw_split_button_get_direction
Gets the direction in which the popup will be popped up.
adw_split_button_get_dropdown_tooltip
Gets the tooltip of the dropdown button of self.
Available since: 1.2
adw_split_button_get_icon_name
Gets the name of the icon used to automatically populate the button.
adw_split_button_get_label
Gets the label for self.
adw_split_button_get_menu_model
Gets the menu model from which the popup will be created.
adw_split_button_get_popover
Gets the popover that will be popped up when the dropdown is clicked.
adw_split_button_get_use_underline
Gets whether an underline in the text indicates a mnemonic.
adw_split_button_popdown
Dismisses the menu.
adw_split_button_popup
Pops up the menu.
adw_split_button_set_child
Sets the child widget.
adw_split_button_set_direction
Sets the direction in which the popup will be popped up.
adw_split_button_set_dropdown_tooltip
Sets the tooltip of the dropdown button of self.
Available since: 1.2
adw_split_button_set_icon_name
Sets the name of the icon used to automatically populate the button.
adw_split_button_set_label
Sets the label for self.
adw_split_button_set_menu_model
Sets the menu model from which the popup will be created.
adw_split_button_set_popover
Sets the popover that will be popped up when the dropdown is clicked.
adw_split_button_set_use_underline
Sets whether an underline in the text indicates a mnemonic.
Properties
Adw.SplitButton:child
The child widget.
Adw.SplitButton:direction
The direction in which the popup will be popped up.
Adw.SplitButton:icon-name
The name of the icon used to automatically populate the button.
Adw.SplitButton:label
The label for the button.
Adw.SplitButton:menu-model
The GMenuModel from which the popup will be created.
Adw.SplitButton:popover
The GtkPopover that will be popped up when the dropdown is clicked.
Adw.SplitButton:use-underline
Whether an underline in the text indicates a mnemonic.
Signals
Adw.SplitButton::activate
Emitted to animate press then release.
Adw.SplitButton::clicked
Emitted when the button has been activated (pressed and released).