What is STklos?
---------------

STklos is an extension of Stk which provides a la CLOS objets to STk. 
This implementation is a derivative work of of the Tiny-clos package 
defined by Gregor Kickzales. Current version is derived from version 1.3
of Tiny CLOS (available at arisia.xerox.com:mop/*).

How to load STklos?
-------------------

To load STklos, type

   (load "stklos.stk")

at the STk prompt.

Using STklos with TK
--------------------

A set of classes have been defined to use Tk with object flavor. For now, only
a small part of Tk class have been written using STklos. To load, the classes
defined for now, type

	(load-tk)

in a running stklos. Loading is VERY SLOW. Be patient ...
After a while, you'll see a message indicating that everything is OK.

Following example creates a three buttons panel (button 1 & 2 being on top of
button 3).

   (define f  (make <Frame>))
   (define b1 (make <Button> :text "Button 1" :parent f))
   (define b2 (make <Button> :text "Button 2" :parent f))
   (define b3 (make <Button> :text "Button 3"))
   (packer b1 b2 :side "left")
   (packer f b3 :fill "both" :expand #t)

Note usage of Scheme names in the two preceding pack calls instead of dotted
Tcl/Tk names.

Tk options can be seen as slot in the STklos world. So getting the font of 
button 3 can be done with 

   (font b3)

and changing its value can be done with 

   (set! (font b3) "fixed")

and associating a command to button 1 can be done with the following expression

   (set! (command b1) '(format #t "You have typed on \"Button1\"\n"))

The desribe function permits to see all the slots value of a given object. For
instance, 

   (describe b2)

would give something like:

#<closure 392900> is an instance of class <button>
Slots are: 
     background = "DarkSeaGreen3"
     border-width = 2
     cursor = ""
     relief = "raised"
     id = #<Tk-command .v1.v3>
     parent = #<closure 3cc7a0>
     anchor = "center"
     font = "-Adobe-Helvetica-Bold-R-Normal--*-120-*"
     foreground = "Grey20"
     pad-x = 1
     pad-y = 1
     text = "Button 2"
     text-variable = ""
     width = 0
     height = 0
     bitmap = ""
     active-background = "#999999"
     active-foreground = "Black"
     command = ""
     disabled-foreground = "#b0b0b0"
     state = "normal"

Destruction of a button can be obtained with the destroy-widget generic function
as in

    (destroy-widget b2)


How to make an image of STklos? (on SunOS 4.1.x only)
-------------------------------

STk permits to dump a running image on Sun boxes. To make an image, run the 
stk interpreter with the ``-no-tk'' option. This option permits to avoid
TK windows creations which cannot be saved in a file. Normally, you have a
standard STk interpreter without the little squarred window. Typing 

    make

at shell prompt will build a new executable file called ``stklos'' with the
STklos package and the Tk classes embedded. To make an image which contains 
only the STklos extension (without the Tk classes), you have to type

   make stklos-only


To do
-----

A lot of things. In particular, all the Tk widgets must be "ported" in STklos
(canvas are partially done). And also SPEED UP all this stuff. Things are
realy too slow. Better performances could be obtained if some parts of STklos 
would be ported in C. This will be done in a next release
