 
 
 
This library of EuLisp modules is trying to provide the possibility of  calling Tk functionality 
from youtoo interpreter. We use to refer to this library as youtoo/Tk system.
youtoo? 
youtoo is one possible implementation of the object oriented programming 
language EuLisp. youtoo was built and is still being improved by 
The School of Mathematical Sciences in 
the University of Bath. EuLisp is a dialect of Lisp. 
It is being discussed and created since 1985. 
EuLisp provides new features to the former definitions and implementations of Lisp language. 
The most important ones are:
youtoo provides all these features defined in EuLisp language definition.
 
 
 
This documentation shows some aspects of the produced binding. Some of the commands of Tcl/Tk are not implemented, because youtoo provides the necessary features.
The next description tries to explain what has been done. The EuLisp commands always have the correspondent Tcl/Tk command. The general syntax is the same that the manual pages for Tcl7.5 and tk4.1 use.
The manual pages could be found in the next URL: 
http://www.sco.com/Technology/tcl/Tcl.html
  
 
 
 
This section will explain the necessary steps in order to start producing the interface.
tcl-tk in your import list. That is:
         (defmodule your-module
            (syntax (macros)
             import (level1 tcl-tk))
   (CLIBS . "-Lpath -lX11 
             -Lpath -ltk4.1 
             -Lpath -ltcl7.5 
             -lm")
youtoo your-module -l level1 -l tcl-tk
display variable. So that:
your-module -display your-display
 
 
 
Tk library works over the X System, that implies that almost everything is event-driven. That is, the execution flow is controled by events. The application reacts to determinate events.
youtoo/Tk is not indifferent to that. The applications in youtoo/Tk will be event-driven.
This is possible thanks to a couple of features that youtoo/Tk provides:
Tcl_DoOneEvent. Go to Tk commands section
Tk_MainLoop. Go to Tk commands section
These two functions are enough to produce event-driven applications with youtto/Tk.
Tk_MainLoop loops calling Tcl_DoOneEvent with the blocking option.
The idea is that, if your application is single threaded it is enough using Tcl_MainLoop.
If your application needs to be doing different things apart from being dispatching Tk event, then create a new thread. The next example will show this:
(defun loop-function ()
  (while t
    (Tcl_DoOneEvent 1)
    (thread-reschedule)))
(deflocal loop-thread (make <thread> function: loop-function))
(thread-start loop-thread)