Hi, all.

First of all, thank you for a good library.
So far I think LTK is the best CL library for TK.
That is a good reason to make it even better !

I think why does not LTK have support for units of length for canvas
items? At least, I have not found any neither from reading the docs no
from reading the sources (which are compacts, indeed).

That is why I tried my own hack for this. The idea is very
simple: we declare a dynamic variable to hold name of units
of measure, with reasonable value of "", which should not
have any effect on the existing applications, and attach it to
each length or size with is forwarded to WISH. Like this:

(defparameter *canvas-units* "")

(defun format-number (stream number)
š(when (and (atom number) (not (vectorp number)))
šš (format *debug-io* "~%format-number: ~A ~A ~A" number (type-of number) *canvas-units*))
š(cond
š ((complexp number)
šš (format-number stream (realpart number))
šš (format-number stream (imagpart number)))
š ((integerp number)
šš (format stream " ~d~a" number *canvas-units*))šššššš š ((typep number 'single-float)
šš (format stream " ~a~a" number *canvas-units*))
š ((numberp number)
šš (format-number stream (coerce number 'single-float)))
š ((stringp number)
šš (format stream " ~a" number))
š ((null number)
šš )
š ((listp number)
šš (format-number stream (car number))
šš (format-number stream (cdr number)))
š ((arrayp number)
šš (dotimes (i (length number))
šššš (format-number stream (aref number i))))
š ))ššššš
And I also added a branch for STRING parameters.
The reason is I spent significant number of time
trying to figure out why my code using STRING
parameters to length options. LTK in this case silently
ignores these parameters so I think either output branch
or error condition should be added here.

To support the tradition, a WITH-like macro also can be added.
Like :

(WITH-CANVAS-UNITS (m)
š...)

I can provide the code in any form, if it is interesting.

--š
----------------------
Ilya Zvyagin, OOO Rolis.

e-mail: masterziv AT gmail DOT com
ICQ# 29427861
Skype: masterziv1024