\documentclass[a4paper]{article}
\usepackage{verbatim}

\newcommand{\kit}{\textsc{TkKit}}

\begin{document}

\title{{\kit}\footnote{Pronounce it like `ticket'} --- a GUI class library for the Tk toolkit}
\author{Matthias Ernst\\\texttt{mernst@x4u2.desy.de}}
\maketitle

\begin{abstract}
  The development of a graphical user interface is (how one loves to
  say) tedious and error-prone (except one proudly owns a \textsf{NeXTstep}
  driven machine). The \emph{Tcl/Tk} toolkit by John Ousterhout greatly
  simplifies this work. But, from another point of view, Tcl can't
  satisfy the needs of modern software engineering.
  
  The solution is obvious: provide a set of well designed widget
  classes built upon Tk widgets. {\kit} is an attempt to achieve the
  goal using this great, new object oriented language called \emph{Sather}.

  \textsl{This is the goal, by now we have a Sather-Tcl interface and some of the basic widgets !}
\end{abstract}

\section{The Class Library}

\kit-objects represent graphical, possibly interactive objects which
form the user interface of an application. There are two forms of
\kit-classes:
\begin{itemize}
\item One set of classes establish a one to one mapping to builtin
  Tk-objects. Examples are labels, frames, entries, etc.\,.
\item Other classes represent composed UI-objects, e.g. menubars,
  file-se\-lec\-tors,~\dots\,. It is important to design these classes in
  such a way that a)~one can easily build new composed objects and
  b)~these objects have a programming interface very similar to that of `atomic' wigets.
\end{itemize}

\subsection{The TK\_APP class}
\label{sec:TkApp}

This class represents the GUI part of an application. Due to technical
reasons this is just a wrapper around shareds.
Features:
\begin{itemize}
\item \verb|create(basename, classname, your_tkkit_path: STR): SAME|: This is a {\bf
    fake !} Call this at the beginning of your application
  (i.e. \verb|app ::= #TK_APP("tk_clock", "TkClock", "/home/tisi/sources/sather/TkKit/");|) to initialize
  the shareds. You can safely handle the result like an object.
\item \verb|tcl_tk: TCL_TK|: The interface to the Tcl/Tk lib,
  including the interpreter.
\item \verb|windows: FMAP{STR, $TKWINDOW}|: All windows in this
  application (plus related routines).
\item \verb|callbacks: FMAP{STR, $TKKIT_CB}|: Defined callbacks (plus
  related routines).
\end{itemize}

\subsection{Windows}
\label{sec:windows}

Now we come to the really graphical objects. Here an overview over the existing
window classes:
\begin{verbatim}
$TK_WINDOW
    $TK_TOPLEVEL
        TK_ROOT
        TK_TOPLEVEL
    $TK_WIDGET
        TK_FRAME
        TK_LABEL
        TK_ENTRY
        TK_MESSAGE
\end{verbatim}
\dots really to be continued.

You can bind callbacks to events with 'bind' where the
event specification is a string that Tk understands.

\subsubsection{The \$TK\_WINDOW class}
\label{sec:TkWindow}

Basetype for all windows in Tk, i.e. such with a pathname.
Features:
\begin{itemize}
\item \verb|app: TK_APP|: The application this window belongs to.
\item \verb|typus: STR|: The type of this window, i.e. ``label'',
  ``frame'' or others. This is the command handed to Tk to create a widget.
\item \verb|name: STR|: The `basename' of the window's
\item \verb|pathname: STR|: Tk pathname
\item \verb|show; show_all; hide; hide_all; visible: BOOL|: control
  visibility
\item \verb|configure(STR)|: ``low level'' Tk window configuration
\item \verb|destroy|: Destroy this window
\end{itemize}


\subsubsection{The \$TK\_WIDGET class}
\label{sec:TkWidget}

Objects of this type represent Tk widgets inside of top level
windows. TK\_WIDGETs add facilities of placement and geometry
management using Tk's packer. By now you can assign to \verb|widget.pack_info: STR| 
which is handed verbatim as options to TK's 'pack'.

\section{An example}
\label{sec:example}

The benefits of {\kit} can best be seen in an example:
\verbatiminput{example.sa}

\end{document}




