.\" 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::Menu 3pm" .TH Gtk2::Menu 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::Menu \- wrapper for GtkMenu .SH "HIERARCHY" .IX Header "HIERARCHY" .Vb 7 \& Glib::Object \& +\-\-\-\-Glib::InitiallyUnowned \& +\-\-\-\-Gtk2::Object \& +\-\-\-\-Gtk2::Widget \& +\-\-\-\-Gtk2::Container \& +\-\-\-\-Gtk2::MenuShell \& +\-\-\-\-Gtk2::Menu .Ve .SH "INTERFACES" .IX Header "INTERFACES" .Vb 2 \& Glib::Object::_Unregistered::AtkImplementorIface \& Gtk2::Buildable .Ve .SH "METHODS" .IX Header "METHODS" .SS "widget = Gtk2::Menu\->\fBnew\fP" .IX Subsection "widget = Gtk2::Menu->new" .ie n .SS "accelgroup = $menu\->\fBget_accel_group\fP" .el .SS "accelgroup = \f(CW$menu\fP\->\fBget_accel_group\fP" .IX Subsection "accelgroup = $menu->get_accel_group" .ie n .SS "$menu\->\fBset_accel_group\fP ($accel_group)" .el .SS "\f(CW$menu\fP\->\fBset_accel_group\fP ($accel_group)" .IX Subsection "$menu->set_accel_group ($accel_group)" .IP "\(bu" 4 \&\f(CW$accel_group\fR (Gtk2::AccelGroup) .ie n .SS "string = $menu\->\fBget_accel_path\fP" .el .SS "string = \f(CW$menu\fP\->\fBget_accel_path\fP" .IX Subsection "string = $menu->get_accel_path" Since: gtk+ 2.14 .ie n .SS "$menu\->\fBset_accel_path\fP ($accel_path)" .el .SS "\f(CW$menu\fP\->\fBset_accel_path\fP ($accel_path)" .IX Subsection "$menu->set_accel_path ($accel_path)" .IP "\(bu" 4 \&\f(CW$accel_path\fR (string) .ie n .SS "widget = $menu\->\fBget_active\fP" .el .SS "widget = \f(CW$menu\fP\->\fBget_active\fP" .IX Subsection "widget = $menu->get_active" .ie n .SS "$menu\->\fBset_active\fP ($index)" .el .SS "\f(CW$menu\fP\->\fBset_active\fP ($index)" .IX Subsection "$menu->set_active ($index)" .IP "\(bu" 4 \&\f(CW$index\fR (integer) .ie n .SS "$menu\->\fBattach\fP ($child, $left_attach, $right_attach, $top_attach, $bottom_attach)" .el .SS "\f(CW$menu\fP\->\fBattach\fP ($child, \f(CW$left_attach\fP, \f(CW$right_attach\fP, \f(CW$top_attach\fP, \f(CW$bottom_attach\fP)" .IX Subsection "$menu->attach ($child, $left_attach, $right_attach, $top_attach, $bottom_attach)" .IP "\(bu" 4 \&\f(CW$child\fR (Gtk2::Widget) .IP "\(bu" 4 \&\f(CW$left_attach\fR (integer) .IP "\(bu" 4 \&\f(CW$right_attach\fR (integer) .IP "\(bu" 4 \&\f(CW$top_attach\fR (integer) .IP "\(bu" 4 \&\f(CW$bottom_attach\fR (integer) .PP Since: gtk+ 2.4 .ie n .SS "$menu\->\fBattach_to_widget\fP ($attach_widget, $detach_func)" .el .SS "\f(CW$menu\fP\->\fBattach_to_widget\fP ($attach_widget, \f(CW$detach_func\fP)" .IX Subsection "$menu->attach_to_widget ($attach_widget, $detach_func)" .IP "\(bu" 4 \&\f(CW$attach_widget\fR (Gtk2::Widget) .IP "\(bu" 4 \&\f(CW$detach_func\fR (scalar) .PP Attach \f(CW$menu\fR to \f(CW$attach_widget\fR. \f(CW$menu\fR must not be currently attached to any other widget, including not a submenu of a \&\f(CW\*(C`Gtk2::MenuItem\*(C'\fR. .PP If \f(CW$menu\fR is later detached from the widget with \&\f(CW\*(C`$menu\->detach\*(C'\fR then the \f(CW$detach_func\fR is called as .PP .Vb 1 \& &$detach_func ($attach_widget, $menu) .Ve .ie n .SS "widget = $menu\->\fBget_attach_widget\fP" .el .SS "widget = \f(CW$menu\fP\->\fBget_attach_widget\fP" .IX Subsection "widget = $menu->get_attach_widget" .ie n .SS "$menu\->\fBdetach\fP" .el .SS "\f(CW$menu\fP\->\fBdetach\fP" .IX Subsection "$menu->detach" .SS "list = Gtk2::Menu\->\fBget_for_attach_widget\fP ($widget)" .IX Subsection "list = Gtk2::Menu->get_for_attach_widget ($widget)" .IP "\(bu" 4 \&\f(CW$widget\fR (Gtk2::Widget) .PP Since: gtk+ 2.6 .ie n .SS "integer = $menu\->\fBget_monitor\fP" .el .SS "integer = \f(CW$menu\fP\->\fBget_monitor\fP" .IX Subsection "integer = $menu->get_monitor" Since: gtk+ 2.14 .ie n .SS "$menu\->\fBset_monitor\fP ($monitor_num)" .el .SS "\f(CW$menu\fP\->\fBset_monitor\fP ($monitor_num)" .IX Subsection "$menu->set_monitor ($monitor_num)" .IP "\(bu" 4 \&\f(CW$monitor_num\fR (integer) .PP Since: gtk+ 2.4 .ie n .SS "$menu\->\fBpopdown\fP" .el .SS "\f(CW$menu\fP\->\fBpopdown\fP" .IX Subsection "$menu->popdown" .ie n .SS "$menu\->\fBpopup\fP ($parent_menu_shell, $parent_menu_item, $menu_pos_func, $data, $button, $activate_time)" .el .SS "\f(CW$menu\fP\->\fBpopup\fP ($parent_menu_shell, \f(CW$parent_menu_item\fP, \f(CW$menu_pos_func\fP, \f(CW$data\fP, \f(CW$button\fP, \f(CW$activate_time\fP)" .IX Subsection "$menu->popup ($parent_menu_shell, $parent_menu_item, $menu_pos_func, $data, $button, $activate_time)" .IP "\(bu" 4 \&\f(CW$parent_menu_shell\fR (Gtk2::Widget or undef) .IP "\(bu" 4 \&\f(CW$parent_menu_item\fR (Gtk2::Widget or undef) .IP "\(bu" 4 \&\f(CW$menu_pos_func\fR (scalar) .IP "\(bu" 4 \&\f(CW$data\fR (scalar) .IP "\(bu" 4 \&\f(CW$button\fR (integer) .IP "\(bu" 4 \&\f(CW$activate_time\fR (integer) .PP If \f(CW$menu_pos_func\fR is not \f(CW\*(C`undef\*(C'\fR it's called as .PP .Vb 1 \& ($x, $y, $push_in) = &$menu_pos_func ($menu, $x, $y, $data) .Ve .PP \&\f(CW$x\fR,\f(CW$y\fR inputs are a proposed position based on the mouse pointer (not actually documented in the Gtk manuals). The return should be a desired \f(CW$x\fR,\f(CW$y\fR, and an optional \f(CW$push_in\fR flag. If \f(CW$push_in\fR is true then Gtk will adjust \f(CW$x\fR,\f(CW$y\fR if necessary so the menu is fully visible in the screen width and height. .PP \&\f(CW$menu_pos_func\fR and \f(CW$data\fR are stored in \f(CW$menu\fR and may be called again later for a \f(CW\*(C`$menu\->reposition\*(C'\fR or some obscure things like a changed \f(CW\*(C`set_screen\*(C'\fR while torn-off. A further \&\f(CW\*(C`$menu\->popup\*(C'\fR call replaces \f(CW$menu_pos_func\fR and \f(CW$data\fR. .ie n .SS "$menu\->\fBreorder_child\fP ($child, $position)" .el .SS "\f(CW$menu\fP\->\fBreorder_child\fP ($child, \f(CW$position\fP)" .IX Subsection "$menu->reorder_child ($child, $position)" .IP "\(bu" 4 \&\f(CW$child\fR (Gtk2::Widget) .IP "\(bu" 4 \&\f(CW$position\fR (integer) .ie n .SS "$menu\->\fBreposition\fP" .el .SS "\f(CW$menu\fP\->\fBreposition\fP" .IX Subsection "$menu->reposition" .ie n .SS "boolean = $menu\->\fBget_reserve_toggle_size\fP" .el .SS "boolean = \f(CW$menu\fP\->\fBget_reserve_toggle_size\fP" .IX Subsection "boolean = $menu->get_reserve_toggle_size" Since: gtk+ 2.18 .ie n .SS "$menu\->\fBset_reserve_toggle_size\fP ($reserve_toggle_size)" .el .SS "\f(CW$menu\fP\->\fBset_reserve_toggle_size\fP ($reserve_toggle_size)" .IX Subsection "$menu->set_reserve_toggle_size ($reserve_toggle_size)" .IP "\(bu" 4 \&\f(CW$reserve_toggle_size\fR (boolean) .PP Since: gtk+ 2.18 .ie n .SS "$menu\->\fBset_screen\fP ($screen)" .el .SS "\f(CW$menu\fP\->\fBset_screen\fP ($screen)" .IX Subsection "$menu->set_screen ($screen)" .IP "\(bu" 4 \&\f(CW$screen\fR (Gtk2::Gdk::Screen or undef) .PP Since: gtk+ 2.2 .ie n .SS "boolean = $menu\->\fBget_tearoff_state\fP" .el .SS "boolean = \f(CW$menu\fP\->\fBget_tearoff_state\fP" .IX Subsection "boolean = $menu->get_tearoff_state" .ie n .SS "$menu\->\fBset_tearoff_state\fP ($torn_off)" .el .SS "\f(CW$menu\fP\->\fBset_tearoff_state\fP ($torn_off)" .IX Subsection "$menu->set_tearoff_state ($torn_off)" .IP "\(bu" 4 \&\f(CW$torn_off\fR (boolean) .ie n .SS "string = $menu\->\fBget_title\fP" .el .SS "string = \f(CW$menu\fP\->\fBget_title\fP" .IX Subsection "string = $menu->get_title" .ie n .SS "$menu\->\fBset_title\fP ($title)" .el .SS "\f(CW$menu\fP\->\fBset_title\fP ($title)" .IX Subsection "$menu->set_title ($title)" .IP "\(bu" 4 \&\f(CW$title\fR (string) .SH "PROPERTIES" .IX Header "PROPERTIES" .IP "'accel\-group' (Gtk2::AccelGroup : default undef : readable / writable / private)" 4 .IX Item "'accel-group' (Gtk2::AccelGroup : default undef : readable / writable / private)" The accel group holding accelerators for the menu .IP "'accel\-path' (string : default undef : readable / writable / private)" 4 .IX Item "'accel-path' (string : default undef : readable / writable / private)" An accel path used to conveniently construct accel paths of child items .IP "'active' (integer : default \-1 : readable / writable / private)" 4 .IX Item "'active' (integer : default -1 : readable / writable / private)" The currently selected menu item .IP "'attach\-widget' (Gtk2::Widget : default undef : readable / writable / private)" 4 .IX Item "'attach-widget' (Gtk2::Widget : default undef : readable / writable / private)" The widget the menu is attached to .IP "'monitor' (integer : default \-1 : readable / writable / private)" 4 .IX Item "'monitor' (integer : default -1 : readable / writable / private)" The monitor the menu will be popped up on .IP "'reserve\-toggle\-size' (boolean : default true : readable / writable / private)" 4 .IX Item "'reserve-toggle-size' (boolean : default true : readable / writable / private)" A boolean that indicates whether the menu reserves space for toggles and icons .IP "'tearoff\-state' (boolean : default false : readable / writable / private)" 4 .IX Item "'tearoff-state' (boolean : default false : readable / writable / private)" A boolean that indicates whether the menu is torn-off .IP "'tearoff\-title' (string : default undef : readable / writable / private)" 4 .IX Item "'tearoff-title' (string : default undef : readable / writable / private)" A title that may be displayed by the window manager when this menu is torn-off .SH "CHILD PROPERTIES" .IX Header "CHILD PROPERTIES" .IP "'bottom\-attach' (integer : default \-1 : readable / writable / private)" 4 .IX Item "'bottom-attach' (integer : default -1 : readable / writable / private)" The row number to attach the bottom of the child to .IP "'left\-attach' (integer : default \-1 : readable / writable / private)" 4 .IX Item "'left-attach' (integer : default -1 : readable / writable / private)" The column number to attach the left side of the child to .IP "'right\-attach' (integer : default \-1 : readable / writable / private)" 4 .IX Item "'right-attach' (integer : default -1 : readable / writable / private)" The column number to attach the right side of the child to .IP "'top\-attach' (integer : default \-1 : readable / writable / private)" 4 .IX Item "'top-attach' (integer : default -1 : readable / writable / private)" The row number to attach the top of the child to .SH "STYLE PROPERTIES" .IX Header "STYLE PROPERTIES" .ie n .IP "'arrow\-placement' (Gtk2::ArrowPlacement : default ""both"" : readable / private)" 4 .el .IP "'arrow\-placement' (Gtk2::ArrowPlacement : default ``both'' : readable / private)" 4 .IX Item "'arrow-placement' (Gtk2::ArrowPlacement : default both : readable / private)" Indicates where scroll arrows should be placed .IP "'arrow\-scaling' (float : default 0.7 : readable / private)" 4 .IX Item "'arrow-scaling' (float : default 0.7 : readable / private)" Arbitrary constant to scale down the size of the scroll arrow .IP "'double\-arrows' (boolean : default true : readable / private)" 4 .IX Item "'double-arrows' (boolean : default true : readable / private)" When scrolling, always show both arrows. .IP "'horizontal\-offset' (integer : default \-2 : readable / private)" 4 .IX Item "'horizontal-offset' (integer : default -2 : readable / private)" When the menu is a submenu, position it this number of pixels offset horizontally .IP "'horizontal\-padding' (integer : default 0 : readable / private)" 4 .IX Item "'horizontal-padding' (integer : default 0 : readable / private)" Extra space at the left and right edges of the menu .IP "'vertical\-offset' (integer : default 0 : readable / private)" 4 .IX Item "'vertical-offset' (integer : default 0 : readable / private)" When the menu is a submenu, position it this number of pixels offset vertically .IP "'vertical\-padding' (integer : default 1 : readable / private)" 4 .IX Item "'vertical-padding' (integer : default 1 : readable / private)" Extra space at the top and bottom of the menu .SH "SIGNALS" .IX Header "SIGNALS" .IP "\fBmove-scroll\fR (Gtk2::Menu, Gtk2::ScrollType)" 4 .IX Item "move-scroll (Gtk2::Menu, Gtk2::ScrollType)" .SH "ENUMS AND FLAGS" .IX Header "ENUMS AND FLAGS" .SS "enum Gtk2::ScrollType" .IX Subsection "enum Gtk2::ScrollType" .PD 0 .IP "\(bu" 4 .PD \&'none' / '\s-1GTK_SCROLL_NONE\s0' .IP "\(bu" 4 \&'jump' / '\s-1GTK_SCROLL_JUMP\s0' .IP "\(bu" 4 \&'step\-backward' / '\s-1GTK_SCROLL_STEP_BACKWARD\s0' .IP "\(bu" 4 \&'step\-forward' / '\s-1GTK_SCROLL_STEP_FORWARD\s0' .IP "\(bu" 4 \&'page\-backward' / '\s-1GTK_SCROLL_PAGE_BACKWARD\s0' .IP "\(bu" 4 \&'page\-forward' / '\s-1GTK_SCROLL_PAGE_FORWARD\s0' .IP "\(bu" 4 \&'step\-up' / '\s-1GTK_SCROLL_STEP_UP\s0' .IP "\(bu" 4 \&'step\-down' / '\s-1GTK_SCROLL_STEP_DOWN\s0' .IP "\(bu" 4 \&'page\-up' / '\s-1GTK_SCROLL_PAGE_UP\s0' .IP "\(bu" 4 \&'page\-down' / '\s-1GTK_SCROLL_PAGE_DOWN\s0' .IP "\(bu" 4 \&'step\-left' / '\s-1GTK_SCROLL_STEP_LEFT\s0' .IP "\(bu" 4 \&'step\-right' / '\s-1GTK_SCROLL_STEP_RIGHT\s0' .IP "\(bu" 4 \&'page\-left' / '\s-1GTK_SCROLL_PAGE_LEFT\s0' .IP "\(bu" 4 \&'page\-right' / '\s-1GTK_SCROLL_PAGE_RIGHT\s0' .IP "\(bu" 4 \&'start' / '\s-1GTK_SCROLL_START\s0' .IP "\(bu" 4 \&'end' / '\s-1GTK_SCROLL_END\s0' .SH "SEE ALSO" .IX Header "SEE ALSO" Gtk2, Glib::Object, Glib::InitiallyUnowned, Gtk2::Object, Gtk2::Widget, Gtk2::Container, Gtk2::MenuShell .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.