GtkMenu::attach_to_widget

GtkMenu::attach_to_widget

attach_to_widget() is mostly used internally to set up the relationship between the 'parent' - usually a GtkMenuItem - and the GtkMenu that is calling the method.

This is not the same thing as setting a submenu for a menu item (use set_submenu() for that), but creates an underlying relationship that subsumes the reference count on the menu to that of the attach_widget. The GtkWidget method set_parent() has very similar functionality, but is not appropriate here because the menu is itself a toplevel widget.

© Copyright 2003-2023 www.php-editors.com. The ultimate PHP Editor and PHP IDE site.