=head1 NAME

Gtk2::Menu - wrapper for GtkMenu

=cut

=head1 HIERARCHY

  Glib::Object
  +----Glib::InitiallyUnowned
       +----Gtk2::Object
            +----Gtk2::Widget
                 +----Gtk2::Container
                      +----Gtk2::MenuShell
                           +----Gtk2::Menu



=cut

=head1 INTERFACES

  Glib::Object::_Unregistered::AtkImplementorIface
  Gtk2::Buildable



=cut


=head1 METHODS

=head2 widget = Gtk2::Menu-E<gt>B<new> 

=head2 accelgroup = $menu-E<gt>B<get_accel_group> 

=head2 $menu-E<gt>B<set_accel_group> ($accel_group)

=over

=item * $accel_group (Gtk2::AccelGroup) 

=back

=head2 string = $menu-E<gt>B<get_accel_path> 

Since: gtk+ 2.14

=head2 $menu-E<gt>B<set_accel_path> ($accel_path)

=over

=item * $accel_path (string) 

=back

=head2 widget = $menu-E<gt>B<get_active> 

=head2 $menu-E<gt>B<set_active> ($index)

=over

=item * $index (integer) 

=back

=head2 $menu-E<gt>B<attach> ($child, $left_attach, $right_attach, $top_attach, $bottom_attach)

=over

=item * $child (Gtk2::Widget) 

=item * $left_attach (integer) 

=item * $right_attach (integer) 

=item * $top_attach (integer) 

=item * $bottom_attach (integer) 

=back

Since: gtk+ 2.4

=head2 $menu-E<gt>B<attach_to_widget> ($attach_widget, $detach_func)

=over

=item * $attach_widget (Gtk2::Widget) 

=item * $detach_func (scalar) 

=back

Attach C<$menu> to C<$attach_widget>.  C<$menu> must not be currently
attached to any other widget, including not a submenu of a
C<Gtk2::MenuItem>.

If C<$menu> is later detached from the widget with
C<< $menu->detach >> then the C<$detach_func> is called as

    &$detach_func ($attach_widget, $menu)

=head2 widget = $menu-E<gt>B<get_attach_widget> 

=head2 $menu-E<gt>B<detach> 

=head2 list = Gtk2::Menu-E<gt>B<get_for_attach_widget> ($widget)

=over

=item * $widget (Gtk2::Widget) 

=back

Since: gtk+ 2.6

=head2 integer = $menu-E<gt>B<get_monitor> 

Since: gtk+ 2.14

=head2 $menu-E<gt>B<set_monitor> ($monitor_num)

=over

=item * $monitor_num (integer) 

=back

Since: gtk+ 2.4

=head2 $menu-E<gt>B<popdown> 

=head2 $menu-E<gt>B<popup> ($parent_menu_shell, $parent_menu_item, $menu_pos_func, $data, $button, $activate_time)

=over

=item * $parent_menu_shell (Gtk2::Widget or undef) 

=item * $parent_menu_item (Gtk2::Widget or undef) 

=item * $menu_pos_func (scalar) 

=item * $data (scalar) 

=item * $button (integer) 

=item * $activate_time (integer) 

=back

If C<$menu_pos_func> is not C<undef> it's called as

    ($x, $y, $push_in) = &$menu_pos_func ($menu, $x, $y, $data)

C<$x>,C<$y> inputs are a proposed position based on the mouse pointer
(not actually documented in the Gtk manuals).  The return should be a
desired C<$x>,C<$y>, and an optional C<$push_in> flag.  If C<$push_in>
is true then Gtk will adjust C<$x>,C<$y> if necessary so the menu is
fully visible in the screen width and height.

C<$menu_pos_func> and C<$data> are stored in C<$menu> and may be
called again later for a C<< $menu->reposition >> or some obscure
things like a changed C<set_screen> while torn-off.  A further
C<< $menu->popup >> call replaces C<$menu_pos_func> and C<$data>.

=head2 $menu-E<gt>B<reorder_child> ($child, $position)

=over

=item * $child (Gtk2::Widget) 

=item * $position (integer) 

=back

=head2 $menu-E<gt>B<reposition> 

=head2 boolean = $menu-E<gt>B<get_reserve_toggle_size> 

Since: gtk+ 2.18

=head2 $menu-E<gt>B<set_reserve_toggle_size> ($reserve_toggle_size)

=over

=item * $reserve_toggle_size (boolean) 

=back

Since: gtk+ 2.18

=head2 $menu-E<gt>B<set_screen> ($screen)

=over

=item * $screen (Gtk2::Gdk::Screen or undef) 

=back

Since: gtk+ 2.2

=head2 boolean = $menu-E<gt>B<get_tearoff_state> 

=head2 $menu-E<gt>B<set_tearoff_state> ($torn_off)

=over

=item * $torn_off (boolean) 

=back

=head2 string = $menu-E<gt>B<get_title> 

=head2 $menu-E<gt>B<set_title> ($title)

=over

=item * $title (string) 

=back



=cut


=head1 PROPERTIES

=over

=item 'accel-group' (Gtk2::AccelGroup : default undef : readable / writable / private / static-nick / static-blurb)

The accel group holding accelerators for the menu

=item 'accel-path' (string : default undef : readable / writable / private / static-nick / static-blurb)

An accel path used to conveniently construct accel paths of child items

=item 'active' (integer : default -1 : readable / writable / private / static-nick / static-blurb)

The currently selected menu item

=item 'attach-widget' (Gtk2::Widget : default undef : readable / writable / private / static-nick / static-blurb)

The widget the menu is attached to

=item 'monitor' (integer : default -1 : readable / writable / private / static-nick / static-blurb)

The monitor the menu will be popped up on

=item 'reserve-toggle-size' (boolean : default true : readable / writable / private / static-nick / static-blurb)

A boolean that indicates whether the menu reserves space for toggles and icons

=item 'tearoff-state' (boolean : default false : readable / writable / private / static-nick / static-blurb)

A boolean that indicates whether the menu is torn-off

=item 'tearoff-title' (string : default undef : readable / writable / private / static-nick / static-blurb)

A title that may be displayed by the window manager when this menu is torn-off

=back



=cut


=head1 CHILD PROPERTIES

=over

=item 'bottom-attach' (integer : default -1 : readable / writable / private / static-nick / static-blurb)

The row number to attach the bottom of the child to

=item 'left-attach' (integer : default -1 : readable / writable / private / static-nick / static-blurb)

The column number to attach the left side of the child to

=item 'right-attach' (integer : default -1 : readable / writable / private / static-nick / static-blurb)

The column number to attach the right side of the child to

=item 'top-attach' (integer : default -1 : readable / writable / private / static-nick / static-blurb)

The row number to attach the top of the child to

=back



=cut


=head1 STYLE PROPERTIES

=over

=item 'arrow-placement' (Gtk2::ArrowPlacement : default "both" : readable / private / static-nick / static-blurb)

Indicates where scroll arrows should be placed

=item 'arrow-scaling' (float : default 0.7 : readable / private / static-nick / static-blurb)

Arbitrary constant to scale down the size of the scroll arrow

=item 'double-arrows' (boolean : default true : readable / private / static-nick / static-blurb)

When scrolling, always show both arrows.

=item 'horizontal-offset' (integer : default -2 : readable / private / static-nick / static-blurb)

When the menu is a submenu, position it this number of pixels offset horizontally

=item 'horizontal-padding' (integer : default 0 : readable / private / static-nick / static-blurb)

Extra space at the left and right edges of the menu

=item 'vertical-offset' (integer : default 0 : readable / private / static-nick / static-blurb)

When the menu is a submenu, position it this number of pixels offset vertically

=item 'vertical-padding' (integer : default 1 : readable / private / static-nick / static-blurb)

Extra space at the top and bottom of the menu

=back



=cut


=head1 SIGNALS

=over

=item B<move-scroll> (Gtk2::Menu, Gtk2::ScrollType)

=back



=cut


=head1 ENUMS AND FLAGS

=head2 enum Gtk2::ScrollType

=over

=item * 'none' / 'GTK_SCROLL_NONE'

=item * 'jump' / 'GTK_SCROLL_JUMP'

=item * 'step-backward' / 'GTK_SCROLL_STEP_BACKWARD'

=item * 'step-forward' / 'GTK_SCROLL_STEP_FORWARD'

=item * 'page-backward' / 'GTK_SCROLL_PAGE_BACKWARD'

=item * 'page-forward' / 'GTK_SCROLL_PAGE_FORWARD'

=item * 'step-up' / 'GTK_SCROLL_STEP_UP'

=item * 'step-down' / 'GTK_SCROLL_STEP_DOWN'

=item * 'page-up' / 'GTK_SCROLL_PAGE_UP'

=item * 'page-down' / 'GTK_SCROLL_PAGE_DOWN'

=item * 'step-left' / 'GTK_SCROLL_STEP_LEFT'

=item * 'step-right' / 'GTK_SCROLL_STEP_RIGHT'

=item * 'page-left' / 'GTK_SCROLL_PAGE_LEFT'

=item * 'page-right' / 'GTK_SCROLL_PAGE_RIGHT'

=item * 'start' / 'GTK_SCROLL_START'

=item * 'end' / 'GTK_SCROLL_END'

=back




=cut


=head1 SEE ALSO

L<Gtk2>, L<Glib::Object>, L<Glib::InitiallyUnowned>, L<Gtk2::Object>, L<Gtk2::Widget>, L<Gtk2::Container>, L<Gtk2::MenuShell>


=cut


=head1 COPYRIGHT

Copyright (C) 2003-2011 by the gtk2-perl team.

This software is licensed under the LGPL.  See L<Gtk2> for a full notice.



=cut

