Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.
The Slab Library
Slab (Snit Library, Almost BWidget) is a port of most of BWidget to Snit. Unported parts are retained in their BWidget form.
The BWidget code is mature and well written, and has been retained wherever possible, with conversion of obsolete idioms to Tcl 8.5+.
The following widgets, and all their dependencies, have been ported to Snit:
The following BWidget widget has been ported to Snit but (when unthemed) it retains a dependency on BWidget's ComboBox.
- Wizard (undocumented)
All widgets and other parts of Slab are provided as tcl::tm modules. Slab retains BWidget's "lazy loading" of commands, but uses a module-based mechanism rather than BWidget's tclPkgSetup interface to the Tcl autoloader. If required, the library can be confined to the ::Slab namespace and its children.
Internationalization uses locale modules based on msgcat that, like BWidget's option files, are loaded on demand.
Slab was written for use by the Kerlin™ project. It is offered as a stand-alone library under the BWidget license, in the hope that others may find it useful.
It is open to anyone to convert some or all of Slab to TclOO to create an "official" class library for Tk. Megawidgets written in Tcl/Tk perform extremely well, and it is unnecessary for "official" megawidgets to be written in C. A significant advantage of Tcl/Tk megawidgets over those written in C is that a greater proportion of users are capable of contributing to development.
By default, Slab is configured for maximum compatibility with code written for BWidget. See the Slab documentation for more information.
Differences from BWidget
- Whether a BWidget widget is themed or unthemed is determined when it is created. In Snit it is not possible to include or omit options at runtime (except by using another level of delegation), and so "themed" Slab widgets have a number of options that they should not have, which are given the value
==Not-Used-When-Themed==and are immutable.
- Slab tries to use theme colors when it operates in "themed" mode. However, this is imitation rather than true theming: if the user changes the theme, the colors of unthemed widgets do not change.
- BWidget's computation of default values for options has not been ported.
BWidget defines default values for its widget options partly by copying from the values for Tk widgets. Hence modifications to the options database for Tk widgets will also apply to particular options of some BWidget widgets. This feature is benign and mostly useful, but it is not implemented in Slab. To achieve results identical to those of BWidget, it may be necessary to amend the options database for Slab widgets.
There will be little difference between BWidget and Slab, if catch-all options such as
option add *background #d9d9d9are used.