The tklib library contains a menubar package that implements a menubar class. This class can be used to create an manage menubars in toplevel windows. The class doesn't depend on a widget framework and therefore can be used with or without a framework (e.g. Bwidget, IWidget, Snit, etc.). Some of the features of this package are:
- A tagging system that simplifies access to menu entries in the menu tree.
- Support for user defined tags that depend on the toplevel window context.
- A simplified and uniform interface for all callback commands.
- Namespace support for all callback commands so callback commands can be easily grouped into namespaces.
- Support for hiding and exposing menus on the menubar.
- A simplified method for creating radiobutton groups.
- Automatic management of state variables for checkbuttons and radiobuttons.
- Scope control for the state variables of checkbuttons and radiobuttons.
- Tearoff menu management that ensures only one tearoff menu is created.
- Support for dynamic menu extension to simplify the creation of recent document menus.
- Support for saving and restoring dynamic menu extensions.
The package is written in pure Tcl/Tk but it uses TclOO so 8.6 or greater is suggested.
tjk