adw.split_button
Module for [SplitButton] class
Types 3
A combined button and dropdown widget.
adw.split_button.SplitButton 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 gtk.button.Button and gtk.menu_button.MenuButton, see their documentation for details.
CSS nodes
splitbutton[.image-button][.text-button]
├── button
│ ╰── <content>
├── separator
╰── menubutton
╰── button.toggle
╰── arrowadw.split_button.SplitButton's CSS node is called splitbutton. It contains the css nodes: button, separator, menubutton. See gtk.menu_button.MenuButton 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
adw.split_button.SplitButton uses the gtk.types.AccessibleRole.Group role.
SplitButtonGidBuilder builder() static nothrowGet builder for [adw.split_button.SplitButton] Returns: New builder objectbool canShrink() @property nothrowGet `canShrink` property. Returns: Whether the button can be smaller than the natural size of its contents.void canShrink(bool propval) @property nothrowSet `canShrink` property. Params: propval = Whether the button can be smaller than the natural size of its contents.void child(gtk.widget.Widget propval) @property nothrowSet `child` property. Params: propval = The child widget.gtk.types.ArrowType direction() @property nothrowGet `direction` property. Returns: The direction in which the popup will be popped up.void direction(gtk.types.ArrowType propval) @property nothrowSet `direction` property. Params: propval = The direction in which the popup will be popped up.string dropdownTooltip() @property nothrowGet `dropdownTooltip` property. Returns: The tooltip of the dropdown button.void dropdownTooltip(string propval) @property nothrowSet `dropdownTooltip` property. Params: propval = The tooltip of the dropdown button.string iconName() @property nothrowGet `iconName` property. Returns: The name of the icon used to automatically populate the button.void iconName(string propval) @property nothrowSet `iconName` property. Params: propval = The name of the icon used to automatically populate the button.void label(string propval) @property nothrowSet `label` property. Params: propval = The label for the button.gio.menu_model.MenuModel menuModel() @property nothrowGet `menuModel` property. Returns: The [gio.menu_model.MenuModel] from which the popup will be created.void menuModel(gio.menu_model.MenuModel propval) @property nothrowSet `menuModel` property. Params: propval = The [gio.menu_model.MenuModel] from which the popup will be created.gtk.popover.Popover popover() @property nothrowGet `popover` property. Returns: The [gtk.popover.Popover] that will be popped up when the dropdown is clicked.void popover(gtk.popover.Popover propval) @property nothrowSet `popover` property. Params: propval = The [gtk.popover.Popover] that will be popped up when the dropdown is clicked.bool useUnderline() @property nothrowGet `useUnderline` property. Returns: Whether an underline in the text indicates a mnemonic.void useUnderline(bool propval) @property nothrowSet `useUnderline` property. Params: propval = Whether an underline in the text indicates a mnemonic.bool getCanShrink() nothrowgets whether the button can be smaller than the natural size of its contents. Returns: whether the button can shrinkgtk.types.ArrowType getDirection() nothrowGets the direction in which the popup will be popped up. Returns: the directionstring getDropdownTooltip() nothrowGets the tooltip of the dropdown button of self. Returns: the dropdown tooltip of selfstring getIconName() nothrowGets the name of the icon used to automatically populate the button. Returns: the icon namegio.menu_model.MenuModel getMenuModel() nothrowGets the menu model from which the popup will be created. Returns: the menu modelgtk.popover.Popover getPopover() nothrowGets the popover that will be popped up when the dropdown is clicked. Returns: the popoverbool getUseUnderline() nothrowGets whether an underline in the text indicates a mnemonic. Returns: whether an underline in the text indicates a mnemonicvoid setCanShrink(bool canShrink) nothrowSets whether the button can be smaller than the natural size of its contents.void setDirection(gtk.types.ArrowType direction) nothrowSets the direction in which the popup will be popped up.void setIconName(string iconName) nothrowSets the name of the icon used to automatically populate the button.void setMenuModel(gio.menu_model.MenuModel menuModel = null) nothrowSets the menu model from which the popup will be created.void setPopover(gtk.popover.Popover popover = null) nothrowSets the popover that will be popped up when the dropdown is clicked.void setUseUnderline(bool useUnderline) nothrowSets whether an underline in the text indicates a mnemonic.gulong connectActivate(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : adw.split_button.SplitButton)))
&& Parameters!T.length < 2) nothrowConnect to `Activate` signal.gulong connectClicked(T)(T callback, Flag!"After" after = No.After) if (isCallable!T
&& is(ReturnType!T == void)
&& (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : adw.split_button.SplitButton)))
&& Parameters!T.length < 2) nothrowConnect to `Clicked` signal.Fluent builder implementation template for adw.split_button.SplitButton
T canShrink(bool propval) nothrowSet `canShrink` property. Params: propval = Whether the button can be smaller than the natural size of its contents.T direction(gtk.types.ArrowType propval) nothrowSet `direction` property. Params: propval = The direction in which the popup will be popped up.T dropdownTooltip(string propval) nothrowSet `dropdownTooltip` property. Params: propval = The tooltip of the dropdown button.T iconName(string propval) nothrowSet `iconName` property. Params: propval = The name of the icon used to automatically populate the button.T menuModel(gio.menu_model.MenuModel propval) nothrowSet `menuModel` property. Params: propval = The [gio.menu_model.MenuModel] from which the popup will be created.T popover(gtk.popover.Popover propval) nothrowSet `popover` property. Params: propval = The [gtk.popover.Popover] that will be popped up when the dropdown is clicked.T useUnderline(bool propval) nothrowSet `useUnderline` property. Params: propval = Whether an underline in the text indicates a mnemonic.Fluent builder for adw.split_button.SplitButton