It derives from <GtkWidget>.
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.
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.
<AdwSplitButton> can use some of the same
style classes as <GtkButton>:
Other style classes, like .pill, cannot be used.
<AdwSplitButton> uses the
Gtk.AccessibleRole.group role.
Whether the button can be smaller than the natural size of its contents.
If set to TRUE, the label will ellipsize.
See button:can-shrink and
menu-button:can-shrink.
Its value is a boolean.
Set it with (set! (split-button:can-shrink self) value).
The child widget.
Setting the child widget will set SplitButton:label and
SplitButton:icon-name to NULL.
Its value is a <GtkWidget>, or #f.
Set it with (set! (split-button:child self) value).
The direction in which the popup will be popped up.
The dropdown arrow icon will point at the same direction.
If the does not fit in the available space in the given direction, GTK will try its best to keep it inside the screen and fully visible.
Gtk.ArrowType.none behaves same as Gtk.ArrowType.down.
Its value is a <GtkArrowType> (or, to set
it, one of its symbols).
Set it with (set! (split-button:direction self) value).
The tooltip of the dropdown button.
The tooltip can be marked up with the Pango text markup language.
Its value is a string, or #f.
Set it with (set! (split-button:dropdown-tooltip self) value).
The name of the icon used to automatically populate the button.
Setting the icon name will set SplitButton:label and
SplitButton:child to NULL.
Its value is a string, or #f.
Set it with (set! (split-button:icon-name self) value).
The label for the button.
Setting the label will set SplitButton:icon-name and
SplitButton:child to NULL.
Its value is a string, or #f.
Set it with (set! (split-button:label self) value).
The <GMenuModel> from which the popup will
be created.
If the menu model is NULL, the dropdown is disabled.
A <GtkPopover> will be created from the menu
model with popover-menu:new-from-model. Actions will be
connected as documented for this function.
If SplitButton:popover is already set, it will be dissociated
from the button, and the property is set to NULL.
Its value is a <GMenuModel>, or #f.
Set it with (set! (split-button:menu-model self) value).
The <GtkPopover> that will be popped up when
the dropdown is clicked.
If the popover is NULL, the dropdown is disabled.
If SplitButton:menu-model is set, the menu model is dissociated
from the button, and the property is set to NULL.
Its value is a <GtkPopover>, or #f.
Set it with (set! (split-button:popover self) value).
Whether an underline in the text indicates a mnemonic.
See SplitButton:label.
Its value is a boolean.
Set it with (set! (split-button:use-underline self) value).
gets whether the button can be smaller than the natural size of its contents.
Passed: a <AdwSplitButton>.
a split button
Returned: a boolean.
whether the button can shrink
Gets the child widget.
Passed: a <AdwSplitButton>.
a split button
Returned: a <GtkWidget>, or #f.
the child widget
Gets the direction in which the popup will be popped up.
Passed: a <AdwSplitButton>.
a split button
Returned: a <GtkArrowType>.
the direction
Gets the tooltip of the dropdown button of self.
Passed: a <AdwSplitButton>.
a split button
Returned: a string.
the dropdown tooltip of self
Gets the name of the icon used to automatically populate the button.
Passed: a <AdwSplitButton>.
a split button
Returned: a string, or #f.
the icon name
Gets the label for self.
Passed: a <AdwSplitButton>.
a split button
Returned: a string, or #f.
the label for self
Gets the menu model from which the popup will be created.
Passed: a <AdwSplitButton>.
a split button
Returned: a <GMenuModel>, or #f.
the menu model
Gets the popover that will be popped up when the dropdown is clicked.
Passed: a <AdwSplitButton>.
a split button
Returned: a <GtkPopover>, or #f.
the popover
Gets whether an underline in the text indicates a mnemonic.
Passed: a <AdwSplitButton>.
a split button
Returned: a boolean.
whether an underline in the text indicates a mnemonic
Creates a new <AdwSplitButton>.
Returned: a <GtkWidget>.
the newly created <AdwSplitButton>
Dismisses the menu.
Passed: a <AdwSplitButton>.
a split button
Pops up the menu.
Passed: a <AdwSplitButton>.
a split button
Sets whether the button can be smaller than the natural size of its contents.
If set to TRUE, the label will ellipsize.
See button:set-can-shrink and
menu-button:set-can-shrink.
Passed: a <AdwSplitButton>.
a split button
Passed: a boolean.
whether the button can shrink
Sets the child widget.
Setting the child widget will set SplitButton:label and
SplitButton:icon-name to NULL.
Passed: a <AdwSplitButton>.
a split button
Passed, or left out: a <GtkWidget>, or
#f.
the new child widget
Sets the direction in which the popup will be popped up.
The dropdown arrow icon will point at the same direction.
If the does not fit in the available space in the given direction, GTK will try its best to keep it inside the screen and fully visible.
Gtk.ArrowType.none behaves same as Gtk.ArrowType.down.
Passed: a <AdwSplitButton>.
a split button
Passed: a <GtkArrowType>, or one of its
symbols.
the direction
Sets the tooltip of the dropdown button of self.
The tooltip can be marked up with the Pango text markup language.
Passed: a <AdwSplitButton>.
a split button
Passed: a string.
the dropdown tooltip of self
Sets the name of the icon used to automatically populate the button.
Setting the icon name will set SplitButton:label and
SplitButton:child to NULL.
Passed: a <AdwSplitButton>.
a split button
Passed: a string.
the icon name to set
Sets the label for self.
Setting the label will set SplitButton:icon-name and
SplitButton:child to NULL.
Passed: a <AdwSplitButton>.
a split button
Passed: a string.
the label to set
Sets the menu model from which the popup will be created.
If the menu model is NULL, the dropdown is disabled.
A <GtkPopover> will be created from the menu
model with popover-menu:new-from-model. Actions will be
connected as documented for this function.
If SplitButton:popover is already set, it will be dissociated
from the button, and the property is set to NULL.
Passed: a <AdwSplitButton>.
a split button
Passed, or left out: a <GMenuModel>, or
#f.
the menu model
Sets the popover that will be popped up when the dropdown is clicked.
If the popover is NULL, the dropdown is disabled.
If SplitButton:menu-model is set, the menu model is dissociated
from the button, and the property is set to NULL.
Passed: a <AdwSplitButton>.
a split button
Passed, or left out: a <GtkPopover>, or
#f.
the popover
Sets whether an underline in the text indicates a mnemonic.
See SplitButton:label.
Passed: a <AdwSplitButton>.
a split button
Passed: a boolean.
whether an underline in the text indicates a mnemonic
Connect a handler with (connect object split-button:activate
handler). It is called as (handler self).
Emitted to animate press then release.
This is an action signal. Applications should never connect to this
signal, but use the "clicked" signal.
Passed: a <AdwSplitButton>.
Connect a handler with (connect object split-button:clicked
handler). It is called as (handler self).
Emitted when the button has been activated (pressed and released).
Passed: a <AdwSplitButton>.