MBAR: Megabar Widget Container

This widget is essentially a frame that can contain any other widget, but it
is intended for use in making menu bars (if fact that's what mbar originally
meant).

The idea with a menu bar is that you make an area across the top of the
application with a bunch of menus in it.  Often the Help menu is located
on the right and the File and Edit menus are on the left.  Other helpful
menus follow Edit from left to right.

Many applications also have shortcut buttons near or in the menu bar.  These
are the same as accessing the menu functions but are a little faster.  And
there is not always a shortcut button for every menu item.

Most menus can be activated by an Alt- key of some kind.  Once open, the user
can arrow down through the menu, or may be able to activate certain menu
lines by hitting a key indicated in the menu item by an underlined character.

Mbar allows you to build a menu bar like with this basic functionality.  It
has an advantage over discrete coding in that if you want to change the way
your menu bars work, you can make the changes in one place and the changes
will propogate to all your applications.

External Procedures:
------------------------------------------
mbar::mbar {w args}		Creates a new mbar widget
    All arguments not among those enumerated below are passed along to the
    underlying frame widget.

Arguments:
    w:	The name of the new widget to create
    
Shortcuts:	(none)

Switches:
    -gmc	This specifies a geometry manager command (pack, grid, place)
	to use to place the components with the widget.  The default is:

		pack %w -padx 0 -pady 0 -side left

	The %w symbol will be replaced by the name of the component.
	
    -gmc.b	This is just like -gmc but is specific to buttons only
	within the mbar.  Its default is whatever you specify for -gmc
	plus:  "-fill x -expand yes"
		
    -gmc.mb	This is just like -gmc but is specific to menubuttons only
	within the mbar.  Its default is whatever you specify for -gmc.
		
    -gmc.s	This is just like -gmc but is specific to "other subwidgets"
	within the mbar.  Its default is whatever you specify for -gmc.

    -b		This specifies a button to add to the mbar.  The button
	will be built according to the data structure which you specify as
	the switch value.  That data structure will be interpreted by the
	"b" widget command described below.

    -mb		This specifies a menubutton to add to the mbar.  The 
	menubutton will be built according to the data structure which you
	specify as the switch value.  That data structure will be interpreted
	by the "mb" widget command described below.

    -s		This specifies a button to add to the mbar.  The widget
	will be built according to the data structure which you specify as
	the switch value.  That data structure will be interpreted by the
	"s" widget command described below.

Widget Command {widget_name command args}:
------------------------------------------
If the command argument is other than what is enumerated below, the command
is passed down to the underlying frame widget.

Command:
    w		Return the name of the widget.
    
    b		Build a button in the mbar.  This has arguments as follows:
    
	Arguments:
	tag	This is a short name that will be used to identify the
		button within the mbar.  It must be unique among all other
		components with the same mbar.
	
	Shortcuts:	text command help
	
	Switches:
	-gmc	Specifies a geometry manager command and defaults to the
		-gmc switch supplied for the parent mbar.  If this switch
		contains a %w it will replace the default gmc command. 
		Otherwise, it will be appended to the end of it.
	
		Except for processing shortcuts, all other arguments are
		simply passed along to the button widget.
		
    mb		Build a menubutton in the mbar.  An associated menu is
		also created (by adding a .m to the name of the menu item).
		This menu is populated by items according to the -mb and
		-mi switches explained below.  This comman has arguments
		as follows:
    
	Arguments:	tag (unique identifier just as for b command)
	Shortcuts:	title help
	Switches:	
	
	-gmc		Geometry manager command for this widget.  Same 
		handling as for the "b" widget command.
	
	-mb		Creates a (menubutton) submenu recursively using
		all the commands and options for the "mb" widget command
		now being described.  In other words, the value you provide
		is parsed recursively by this same widget command to create
		a submenu.
		
	-mi		Creates an entry in the associated menu to which
		you can bind a command.  You provide a list of arguments
		telling how to build the menu item which consists of the
		following:
		
		Arguments:
		    type	This may have the value "radiobutton,"
		    	"checkbutton" or "command" as described in the TK
		    	"menu add" widget command.  You may also omit this
		    	argument and the type "command" will be assumed.
			
		    tag 	Unique identifier within the menu.  If the 
		    	tag value is the string "sep" a separator will be 
		    	added to the menu after the last added item.
				
		Shortcuts:	title, command, help
		Switches:	(There is no -gmc argument for menu items)
	
	All other switches (besides -gmc, -mb, -mi) are passed to the
	menubutton widget.
		
    s		Build an arbitrary subwidget in the mbar.  This has 
		arguments as follows:
    
	Arguments:
		type		label, canvas, entry, checkbox, etc.
		tag		A unique identifier just as for b command.
	Shortcuts:	(none)
	Switches:	Same as for "b" command.  Other than -gmc switch,
		all other switches are passed to the widget invoked by
		the "type" argument.
    
    <subwidget_tag>	If the command is the name of a subwidget tag that
    	exists inside the mbar, the rest of the command will be passed to
    	that subwidget.  For example,
    	
		.mbar1 file mi {Save File}
	
	might be used to add a "Save File" option to an existing File menu.

		.mbar1 file cget
	
	Could be used to get the configuration of the menubutton associated
	with the file menu.

    cget, configure	These are just like standard TK behavior.  Any
	queries not relevant at the dew level are passed down to the
	underlying entry widget.
