Artifact [5109f7bcc7]

Artifact 5109f7bcc77f39ab8233d1c116ecf89d20ad7482eb03be3bfa5408242dd7d06f:

Wiki page [Slab] by kjnash 2018-06-26 17:13:17.
D 2018-06-26T17:13:17.990
L Slab
P 840eaf745f43513825413da295cce9d25f368474d9359270f829eba5770744a1
U kjnash
W 5000
<H2>The Slab Library</H2>
<P>
<B>Slab</B> (<I>Snit Library, Almost BWidget</I>) is a port of most of <B>BWidget</B> to Snit. Unported parts are retained in their <B>BWidget</B> form.<BR>
<BR>
The <B>BWidget</B> code is mature and well written, and has been retained wherever possible, with conversion of obsolete idioms to Tcl 8.5+.<BR>
<BR>
The following widgets, and all their dependencies, have been ported to Snit:
<UL>
<LI><B>ArrowButton</B></LI>
<LI><B>Button</B></LI>
<LI><B>ButtonBox</B></LI>
<LI><B>Dialog</B></LI>
<LI><B>DragSite</B></LI>
<LI><B>DropSite</B></LI>
<LI><B>DynamicHelp</B></LI>
<LI><B>Entry</B></LI>
<LI><B>Label</B></LI>
<LI><B>LabelEntry</B></LI>
<LI><B>LabelFrame</B></LI>
<LI><B>ListBox</B></LI>
<LI><B>MainFrame</B></LI>
<LI><B>MessageDlg</B></LI>
<LI><B>NoteBook</B></LI>
<LI><B>PagesManager</B></LI>
<LI><B>PasswdDlg</B></LI>
<LI><B>ProgressBar</B></LI>
<LI><B>ProgressDlg</B></LI>
<LI><B>ScrollableFrame</B></LI>
<LI><B>ScrolledWindow</B></LI>
<LI><B>SelectColor</B></LI>
<LI><B>Separator</B></LI>
<LI><B>TitleFrame</B></LI>
</UL>
Although alternatives to some of these widgets have been added to Tk and Ttk in recent years, other <B>BWidget</B>/<B>Slab</B> widgets remain indispensable.  The <B>ScrollableFrame</B>, <B>ScrolledWindow</B>, <B>NoteBook</B>, <B>SelectColor</B>, and <B>MainFrame</B> are particularly useful.<BR>
<BR>
The following <B>BWidget</B> widget has been ported to Snit but (when unthemed) it retains a dependency on <B>BWidget</B>'s <B>ComboBox</B>.
<UL>
<LI><B>SelectFont</B></LI>
</UL>
The following <B>BWidget</B> widgets have not (yet) been converted to Snit:
<UL>
<LI><B>ComboBox</B></LI>
<LI><B>PanedWindow</B></LI>
<LI><B>PanelFrame</B></LI>
<LI><B>ScrollView</B></LI>
<LI><B>SpinBox</B></LI>
<LI><B>StatusBar</B></LI>
<LI><B>Tree</B></LI>
<LI><B>Wizard</B> (undocumented)</LI>
</UL>
These <B>BWidget</B> widgets are retained in <B>Slab</B>, and have been made compatible with any dependencies that have been converted to Snit.  <B>BWidget</B>'s <B>Widget</B> "base class" is retained (as module <B>Slab::Widget</B>), and is loaded only if one of these unconverted widgets is loaded.<BR>
<BR>
</P>


<H2>New Features</H2>
<P>All widgets and other parts of <B>Slab</B> are provided as tcl::tm modules.  <B>Slab</B> retains <B>BWidget</B>'s "lazy loading" of commands, but uses a module-based mechanism rather than <B>BWidget</B>'s tclPkgSetup interface to the Tcl autoloader.  If required, the library can be confined to the <B>::Slab</B> namespace and its children.<BR>
<BR>
Internationalization uses locale modules based on msgcat that, like <B>BWidget</B>'s option files, are loaded on demand.<BR>
<BR>
</P>



<H2>Purpose</H2>
<P><B>Slab</B> was written for use by the <I>Kerlin</I>&#8482; project.  It is offered as a stand-alone library under the <B>BWidget</B> license, in the hope that others may find it useful.<BR>
<BR>
It is open to anyone to convert some or all of <B>Slab</B> 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.<BR>
<BR>
</P>


<H2>Configuration</H2>
<P>By default, <B>Slab</B> is configured for maximum compatibility with code written for <B>BWidget</B>.  See the <B>Slab</B> documentation for more information.<BR>
<BR>
</P>


<H2>Differences from BWidget</H2>
<P><OL>
<LI>Whether a <B>BWidget</B> 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" <B>Slab</B> widgets have a number of options that they should not have, which are given the value <NOBR><B>==Not-Used-When-Themed==</B></NOBR> and are immutable.<BR><BR></LI>
<LI><B>Slab</B> 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.<BR>
<BR></LI>
<LI><B>BWidget</B>'s computation of default values for options has not been ported.<BR>
<BR>
<B>BWidget</B> 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 <B>BWidget</B> widgets.  This feature is benign and mostly useful, but it is not implemented in <B>Slab</B>.  To achieve results identical to those of <B>BWidget</B>, it may be necessary to amend the options database for <B>Slab</B> widgets.<BR>
<BR>
There will be little difference between <B>BWidget</B> and <B>Slab</B>, if catch-all options such as<PRE>
        option add *background  #d9d9d9</PRE>
are used.</LI>
</OL><BR>
<BR>
</P>

Z cca58f8013bda80be699825bb9821789