Widget linking

The cleaner way to add a new widget to consists to define a special C module for this widget. Defining the widget in a C module allows us to make the new widget dynamically loadable. The code for making the fscale widget dynamically loadable could be:


\begin{Code}
\begin{listing}[200]{2}
/* Contents of the file fscale.c */
...

\begin{Code}
\begin{listing}[200]{2}
...

\begin{Code}
\begin{listing}[200]{2}
PRIMITIVE STk_init_fscale(void)
{
Tcl_Crea...
... Tk_MainWindow(STk_main_interp),
(void (*)()) NULL);
}
\end{listing}\end{Code}