MenuButton.setCreatePopupFunc

Sets @func to be called when a popup is about to be shown.

@func should use one of

- [method@Gtk.MenuButton.set_popover] - [method@Gtk.MenuButton.set_menu_model]

to set a popup for @menu_button. If @func is non-%NULL, @menu_button will always be sensitive.

Using this function will not reset the menu widget attached to @menu_button. Instead, this can be done manually in @func.

class MenuButton
void
setCreatePopupFunc

Parameters

func GtkMenuButtonCreatePopupFunc

function to call when a popup is about to be shown, but none has been provided via other means, or %NULL to reset to default behavior.

userData void*

user data to pass to @func.

destroyNotify GDestroyNotify

destroy notify for @user_data

Meta