|
NAMEGtk2::MenuItem - wrapper for GtkMenuItemDESCRIPTIONIf a MenuItem is created with a $label string, or if the "label" property is set later, then it should be destroyed with "$item->destroy". Just dropping the last Perl ref is not enough because (as of Gtk through to 2.18) there's a circular reference from the child "Gtk2::AccelLabel" back up to the item (the "accel-widget" property).When a MenuItem is in a "Gtk2::Menu" a "destroy" happens automatically. Dropping the last ref to a Menu calls "destroy" on its children, as usual for a container. But if you remove a MenuItem with a label from a menu (or never add it to one) then be sure to "$item->destroy" explicitly. HIERARCHYGlib::Object +----Glib::InitiallyUnowned +----Gtk2::Object +----Gtk2::Widget +----Gtk2::Container +----Gtk2::Bin +----Gtk2::Item +----Gtk2::MenuItem INTERFACESGlib::Object::_Unregistered::AtkImplementorIface Gtk2::Buildable Gtk2::Activatable METHODSwidget = Gtk2::MenuItem->new ($label=undef)
If a $label argument is given then this is "new_with_mnemonic". widget = Gtk2::MenuItem->new_with_label ($label=undef)
widget = Gtk2::MenuItem->new_with_mnemonic ($label=undef)
string = $menu_item->get_accel_pathSince: gtk+ 2.14$menu_item->set_accel_path ($accel_path)
$menu_item->activate$menu_item->deselectstring = $menu_item->get_labelSince: gtk+ 2.16$menu_item->set_label ($label)
Since: gtk+ 2.16 $menu_item->remove_submenuboolean = $menu_item->get_right_justified$menu_item->set_right_justified ($right_justified)
$menu_item->selectwidget or undef = $menu_item->get_submenu$menu_item->set_submenu ($submenu)
$menu_item->toggle_size_allocate ($allocation)
requisition = $menu_item->toggle_size_requestboolean = $menu_item->get_use_underlineSince: gtk+ 2.16$menu_item->set_use_underline ($use_underline)
Since: gtk+ 2.16 PROPERTIES
STYLE PROPERTIES
SIGNALS
SEE ALSOGtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget, Gtk2::Container, Gtk2::Bin, Gtk2::ItemCOPYRIGHTCopyright (C) 2003-2011 by the gtk2-perl team.This software is licensed under the LGPL. See Gtk2 for a full notice.
Visit the GSP FreeBSD Man Page Interface. |