Class
Adw.SplitButton
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 |
Instance methods
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_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_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_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
Properties
Adw.SplitButton:icon-name
The name of the icon used to automatically populate 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
Signals
Adw.SplitButton::clicked
Emitted when the button has been activated (pressed and released).
Available since: 1.0