.\" Automatically generated by Pod::Man 4.10 (Pod::Simple 3.35) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Gtk2::MenuItem 3pm" .TH Gtk2::MenuItem 3pm "2019-09-16" "perl v5.28.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Gtk2::MenuItem \- wrapper for GtkMenuItem .SH "DESCRIPTION" .IX Header "DESCRIPTION" If a MenuItem is created with a \f(CW$label\fR string, or if the \f(CW\*(C`label\*(C'\fR property is set later, then it should be destroyed with \&\f(CW\*(C`$item\->destroy\*(C'\fR. 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 \f(CW\*(C`Gtk2::AccelLabel\*(C'\fR back up to the item (the \f(CW\*(C`accel\-widget\*(C'\fR property). .PP When a MenuItem is in a \f(CW\*(C`Gtk2::Menu\*(C'\fR a \f(CW\*(C`destroy\*(C'\fR happens automatically. Dropping the last ref to a Menu calls \f(CW\*(C`destroy\*(C'\fR 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 \&\f(CW\*(C`$item\->destroy\*(C'\fR explicitly. .SH "HIERARCHY" .IX Header "HIERARCHY" .Vb 8 \& Glib::Object \& +\-\-\-\-Glib::InitiallyUnowned \& +\-\-\-\-Gtk2::Object \& +\-\-\-\-Gtk2::Widget \& +\-\-\-\-Gtk2::Container \& +\-\-\-\-Gtk2::Bin \& +\-\-\-\-Gtk2::Item \& +\-\-\-\-Gtk2::MenuItem .Ve .SH "INTERFACES" .IX Header "INTERFACES" .Vb 3 \& Glib::Object::_Unregistered::AtkImplementorIface \& Gtk2::Buildable \& Gtk2::Activatable .Ve .SH "METHODS" .IX Header "METHODS" .SS "widget = Gtk2::MenuItem\->\fBnew\fP ($label=undef)" .IX Subsection "widget = Gtk2::MenuItem->new ($label=undef)" .IP "\(bu" 4 \&\f(CW$label\fR (string) .PP If a \f(CW$label\fR argument is given then this is \f(CW\*(C`new_with_mnemonic\*(C'\fR. .SS "widget = Gtk2::MenuItem\->\fBnew_with_label\fP ($label=undef)" .IX Subsection "widget = Gtk2::MenuItem->new_with_label ($label=undef)" .IP "\(bu" 4 \&\f(CW$label\fR (string) .SS "widget = Gtk2::MenuItem\->\fBnew_with_mnemonic\fP ($label=undef)" .IX Subsection "widget = Gtk2::MenuItem->new_with_mnemonic ($label=undef)" .IP "\(bu" 4 \&\f(CW$label\fR (string) .ie n .SS "string = $menu_item\->\fBget_accel_path\fP" .el .SS "string = \f(CW$menu_item\fP\->\fBget_accel_path\fP" .IX Subsection "string = $menu_item->get_accel_path" Since: gtk+ 2.14 .ie n .SS "$menu_item\->\fBset_accel_path\fP ($accel_path)" .el .SS "\f(CW$menu_item\fP\->\fBset_accel_path\fP ($accel_path)" .IX Subsection "$menu_item->set_accel_path ($accel_path)" .IP "\(bu" 4 \&\f(CW$accel_path\fR (string) .ie n .SS "$menu_item\->\fBactivate\fP" .el .SS "\f(CW$menu_item\fP\->\fBactivate\fP" .IX Subsection "$menu_item->activate" .ie n .SS "$menu_item\->\fBdeselect\fP" .el .SS "\f(CW$menu_item\fP\->\fBdeselect\fP" .IX Subsection "$menu_item->deselect" .ie n .SS "string = $menu_item\->\fBget_label\fP" .el .SS "string = \f(CW$menu_item\fP\->\fBget_label\fP" .IX Subsection "string = $menu_item->get_label" Since: gtk+ 2.16 .ie n .SS "$menu_item\->\fBset_label\fP ($label)" .el .SS "\f(CW$menu_item\fP\->\fBset_label\fP ($label)" .IX Subsection "$menu_item->set_label ($label)" .IP "\(bu" 4 \&\f(CW$label\fR (string) .PP Since: gtk+ 2.16 .ie n .SS "$menu_item\->\fBremove_submenu\fP" .el .SS "\f(CW$menu_item\fP\->\fBremove_submenu\fP" .IX Subsection "$menu_item->remove_submenu" .ie n .SS "boolean = $menu_item\->\fBget_right_justified\fP" .el .SS "boolean = \f(CW$menu_item\fP\->\fBget_right_justified\fP" .IX Subsection "boolean = $menu_item->get_right_justified" .ie n .SS "$menu_item\->\fBset_right_justified\fP ($right_justified)" .el .SS "\f(CW$menu_item\fP\->\fBset_right_justified\fP ($right_justified)" .IX Subsection "$menu_item->set_right_justified ($right_justified)" .IP "\(bu" 4 \&\f(CW$right_justified\fR (boolean) .ie n .SS "$menu_item\->\fBselect\fP" .el .SS "\f(CW$menu_item\fP\->\fBselect\fP" .IX Subsection "$menu_item->select" .ie n .SS "widget or undef = $menu_item\->\fBget_submenu\fP" .el .SS "widget or undef = \f(CW$menu_item\fP\->\fBget_submenu\fP" .IX Subsection "widget or undef = $menu_item->get_submenu" .ie n .SS "$menu_item\->\fBset_submenu\fP ($submenu)" .el .SS "\f(CW$menu_item\fP\->\fBset_submenu\fP ($submenu)" .IX Subsection "$menu_item->set_submenu ($submenu)" .IP "\(bu" 4 \&\f(CW$submenu\fR (Gtk2::Widget or undef) .ie n .SS "$menu_item\->\fBtoggle_size_allocate\fP ($allocation)" .el .SS "\f(CW$menu_item\fP\->\fBtoggle_size_allocate\fP ($allocation)" .IX Subsection "$menu_item->toggle_size_allocate ($allocation)" .IP "\(bu" 4 \&\f(CW$allocation\fR (integer) .ie n .SS "requisition = $menu_item\->\fBtoggle_size_request\fP" .el .SS "requisition = \f(CW$menu_item\fP\->\fBtoggle_size_request\fP" .IX Subsection "requisition = $menu_item->toggle_size_request" .ie n .SS "boolean = $menu_item\->\fBget_use_underline\fP" .el .SS "boolean = \f(CW$menu_item\fP\->\fBget_use_underline\fP" .IX Subsection "boolean = $menu_item->get_use_underline" Since: gtk+ 2.16 .ie n .SS "$menu_item\->\fBset_use_underline\fP ($use_underline)" .el .SS "\f(CW$menu_item\fP\->\fBset_use_underline\fP ($use_underline)" .IX Subsection "$menu_item->set_use_underline ($use_underline)" .IP "\(bu" 4 \&\f(CW$use_underline\fR (boolean) .PP Since: gtk+ 2.16 .SH "PROPERTIES" .IX Header "PROPERTIES" .IP "'accel\-path' (string : default undef : readable / writable / private)" 4 .IX Item "'accel-path' (string : default undef : readable / writable / private)" Sets the accelerator path of the menu item .ie n .IP "'label' (string : default """" : readable / writable / private)" 4 .el .IP "'label' (string : default ``'' : readable / writable / private)" 4 .IX Item "'label' (string : default """" : readable / writable / private)" The text for the child label .IP "'right\-justified' (boolean : default false : readable / writable / private)" 4 .IX Item "'right-justified' (boolean : default false : readable / writable / private)" Sets whether the menu item appears justified at the right side of a menu bar .IP "'submenu' (Gtk2::Menu : default undef : readable / writable / private)" 4 .IX Item "'submenu' (Gtk2::Menu : default undef : readable / writable / private)" The submenu attached to the menu item, or \s-1NULL\s0 if it has none .IP "'use\-underline' (boolean : default false : readable / writable / private)" 4 .IX Item "'use-underline' (boolean : default false : readable / writable / private)" If set, an underline in the text indicates the next character should be used for the mnemonic accelerator key .SH "STYLE PROPERTIES" .IX Header "STYLE PROPERTIES" .IP "'arrow\-scaling' (float : default 0.8 : readable / private)" 4 .IX Item "'arrow-scaling' (float : default 0.8 : readable / private)" Amount of space used up by arrow, relative to the menu item's font size .IP "'arrow\-spacing' (integer : default 10 : readable / private)" 4 .IX Item "'arrow-spacing' (integer : default 10 : readable / private)" Space between label and arrow .IP "'horizontal\-padding' (integer : default 3 : readable / private)" 4 .IX Item "'horizontal-padding' (integer : default 3 : readable / private)" Padding to left and right of the menu item .ie n .IP "'selected\-shadow\-type' (Gtk2::ShadowType : default ""none"" : readable / private)" 4 .el .IP "'selected\-shadow\-type' (Gtk2::ShadowType : default ``none'' : readable / private)" 4 .IX Item "'selected-shadow-type' (Gtk2::ShadowType : default none : readable / private)" Shadow type when item is selected .IP "'toggle\-spacing' (integer : default 5 : readable / private)" 4 .IX Item "'toggle-spacing' (integer : default 5 : readable / private)" Space between icon and label .IP "'width\-chars' (integer : default 12 : readable / private)" 4 .IX Item "'width-chars' (integer : default 12 : readable / private)" The minimum desired width of the menu item in characters .SH "SIGNALS" .IX Header "SIGNALS" .IP "\fBactivate\fR (Gtk2::MenuItem)" 4 .IX Item "activate (Gtk2::MenuItem)" .PD 0 .IP "\fBactivate-item\fR (Gtk2::MenuItem)" 4 .IX Item "activate-item (Gtk2::MenuItem)" .IP "\fBtoggle-size-allocate\fR (Gtk2::MenuItem, integer)" 4 .IX Item "toggle-size-allocate (Gtk2::MenuItem, integer)" .IP "\fBtoggle-size-request\fR (Gtk2::MenuItem, gpointer)" 4 .IX Item "toggle-size-request (Gtk2::MenuItem, gpointer)" .PD .SH "SEE ALSO" .IX Header "SEE ALSO" Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget, Gtk2::Container, Gtk2::Bin, Gtk2::Item .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright (C) 2003\-2011 by the gtk2\-perl team. .PP This software is licensed under the \s-1LGPL.\s0 See Gtk2 for a full notice.