Introduction
Tcl/Tk comes with an interesting but limited set of built-in widgets.
Many people have written extensions that offer sets of additional widgets
not found in the Tk distribution. Some of these extensions (such as BLT)
are written in C or C++ and require recompilation of the Tk core.
Others are written in pure Tcl (Scwoop, to name one popular set) so they
can be used without recompiling anything. BWidgets is probably the most
popular pure Tcl widget set for Tk.
When I downloaded BWidgets and started playing with them, I started
wondering about their implementation. In particular, I wanted to find out
how to write my own BWidget, for example a BWidget canvas with composite
items, drag and drop, and canvas scaling. So I set out to look for
documentation on BWidgets, and found hardly any. There is a good paper
by Jos De Coster, which scratches the surface, but I wanted to delve
deeper into the guts of the BWidgets. After looking around with no
result, I decided to use the BWidgets code itself to find answers to
my questions (hey, this is open source after all, right?).
In the paper below, you can find out what I discovered. It's not much,
and I still have a lot of questions about some of the details, but
it's a starting point.
|