SplitButton
Object Hierarchy:
Description:
public class SplitButton : Box
Content:
Properties:
- public string? icon_name { get; set; }
Icon displayed on the main button
- public Button main_button { get; }
Direct access to the main action button
- public MenuButton menu_button { get; }
Direct access to the dropdown menu button
- public MenuModel? menu_model { get; set; }
The menu model for the dropdown
- public string? menu_tooltip_text { get; set; }
Tooltip text for the menu button
- public bool sensitive { get; set; }
Whether both buttons are sensitive
- public SplitButtonSize size { get; set; }
The size variant of the split button
- public string? tooltip_text { get; set; }
Tooltip text for the main button
Creation methods:
Methods:
- public void add_menu_item (string label, owned SimpleCallback callback, string? icon_name = null)
Add a simple menu item with a callback function
- public void add_menu_item_spec (MenuItemSpec spec)
Add a menu item using MenuItemSpec (for action-based items)
- public void add_menu_separator ()
Add a menu separator
- public void clear_menu ()
Clear all menu items
- public SplitButton configure (string? icon_name = null, string? tooltip_text = null, string? menu_tooltip_text = null, SplitButtonSize? size = null)
Convenience method to configure the split button
- public override void dispose ()
Clean up resources when the widget is destroyed
- public void set_destructive_action (bool destructive = true)
Apply destructive action styling to both buttons
- public void set_menu_from_specs (MenuItemSpec[] specs)
Set menu from an array of specifications
- public void set_simple_menu (string[] labels, string[]? actions = null)
Convenience method to create menu from simple string arrays
- public void set_suggested_action (bool suggested = true)
Apply suggested action styling to both buttons
Signals:
Inherited Members:
All known members inherited from class Gtk.Box
- append
- baseline_child
- baseline_position
- get_baseline_child
- get_baseline_position
- get_homogeneous
- get_spacing
- homogeneous
- insert_child_after
- prepend
- remove
- reorder_child_after
- set_baseline_child
- set_baseline_position
- set_homogeneous
- set_spacing
- spacing
All known members inherited from class Gtk.Widget
All known members inherited from class GLib.Object
- @get
- @new
- @ref
- @set
- add_toggle_ref
- add_weak_pointer
- bind_property
- connect
- constructed
- disconnect
- dispose
- dup_data
- dup_qdata
- force_floating
- freeze_notify
- get_class
- get_data
- get_property
- get_qdata
- get_type
- getv
- interface_find_property
- interface_install_property
- interface_list_properties
- is_floating
- new_valist
- new_with_properties
- newv
- notify
- notify_property
- ref_count
- ref_sink
- remove_toggle_ref
- remove_weak_pointer
- replace_data
- replace_qdata
- set_data
- set_data_full
- set_property
- set_qdata
- set_qdata_full
- set_valist
- setv
- steal_data
- steal_qdata
- thaw_notify
- unref
- watch_closure
- weak_ref
- weak_unref
All known members inherited from interface Gtk.Accessible
- accessible_role
- announce
- get_accessible_parent
- get_accessible_role
- get_at_context
- get_bounds
- get_first_accessible_child
- get_next_accessible_sibling
- get_platform_state
- reset_property
- reset_relation
- reset_state
- set_accessible_parent
- update_next_accessible_sibling
- update_platform_state
- update_property
- update_property_value
- update_relation
- update_relation_value
- update_state
- update_state_value
All known members inherited from interface Gtk.Buildable
- add_child
- custom_finished
- custom_tag_end
- custom_tag_start
- get_buildable_id
- get_id
- get_internal_child
- parser_finished
- set_buildable_property
- set_id
All known members inherited from interface Gtk.Orientable