disabled
 ?÷     #  Copyright (c) 1990-1994 The Regents of the University of California.
#  Copyright (c) 1994-1997 Sun Microsystems, Inc.
#  See the file "license.terms" for information on usage and redistribution
#  of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
#

=head1 NAME

Tk::Menu - Create and manipulate Menu widgets

=for category  Tk Widget Classes

=head1 SYNOPSIS

S<    >I<$menu> = I<$parent>-E<gt>B<Menu>(?I<options>?);

=head1 STANDARD OPTIONS

B<-activebackground>	B<-background>	B<-disabledforeground>	B<-relief>
B<-activeborderwidth>	B<-borderwidth>	B<-font>	B<-takefocus>
B<-activeforeground>	B<-cursor>	B<-foreground>

See L<Tk::options> for details of the standard options.

=head1 WIDGET-SPECIFIC OPTIONS

=over 4

=item Name:	B<postCommand>

=item Class:	B<Command>

=item Switch:	B<-postcommand>

If this option is specified then it provides a L<callback|Tk::callbacks> to execute
each time the menu is posted.  The callback is invoked by the B<post>
method before posting the menu. Note that in 8.0 on Macintosh
and Windows, all commands in a menu systems are executed before any
are posted. This is due to the limitations in the individual platforms'
menu managers.

=item Name:	B<selectColor>

=item Class:	B<Background>

=item Switch:	B<-selectcolor>

For menu entries that are check buttons or radio buttons, this option
specifies the color to display in the indicator when the check button
or radio button is selected.

=item Name:	B<tearOff>

=item Class:	B<TearOff>

=item Switch:	B<-tearoff>

This option must have a proper boolean value, which specifies
whether or not the menu should include a tear-off entry at the
top.  If so, it will exist as entry 0 of the menu and the other
entries will number starting at 1.  The default
menu bindings arrange for the menu to be torn off when the tear-off
entry is invoked.

=item Name:	B<tearOffCommand>

=item Class:	B<TearOffCommand>

=item Switch:	B<-tearoffcommand>

If this option has a non-empty value, then it specifies a L<perlE<sol>Tk callback|Tk::callbacks>
to invoke whenever the menu is torn off.  The actual command will
consist of the value of this option, followed by a space, followed
by the name of the menu window, followed by a space, followed by
the name of the name of the torn off menu window.  For example, if
the option's is ``B<a b>'' and menu B<.x.y> is torn off to
create a new menu B<.x.tearoff1>, then the command
``B<a b .x.y .x.tearoff1>'' will be invoked.

=item Name:	B<title>

=item Class:	B<Title>

=item Switch:	B<-title>

The string will be used to title the window created when this menu is
torn off. If the title is NULL, then the window will have the title
of the menubutton or the text of the cascade item from which this menu
was invoked.

=item Name:	B<type>

=item Class:	B<Type>

=item Switch:	B<-type>

This option can be one of B<menubar>, B<tearoff>, or
B<normal>, and is set when the menu is created. While the string
returned by the configuration database will change if this option is
changed, this does not affect the menu widget's behavior. This is used
by the cloning mechanism and is not normally set outside of the Tk
library.

=back

=head1 DESCRIPTION

The B<Menu> method creates a new top-level window (given
by the $widget argument) and makes it into a menu widget.
Additional
options, described above, may be specified on the command line
or in the option database
to configure aspects of the menu such as its colors and font.
The B<menu> command returns its
$widget argument.  At the time this command is invoked,
there must not exist a window named $widget, but
$widget's parent must exist.

A menu is a widget that displays a collection of one-line entries arranged
in one or more columns.  There exist several different types of entries,
each with different properties.  Entries of different types may be
combined in a single menu.  Menu entries are not the same as
entry widgets.  In fact, menu entries are not even distinct widgets;
the entire menu is one widget.

Menu entries are displayed with up to three separate fields.
The main field 