[comp.sys.ti.explorer] more microexp-mac connection

mvm@FRLRI61.BITNET (10/18/89)

Hope there is still a KSL to receive this... Catherine tells me there
is no electricity in the Palo Alto vicinity, so maybe no one will ever
see this message. In case someone does, I would be interested in knowing
wethere there is someone who has written a converter to :

- Convert a pure MacIntosh font to an explorer font (ex: chicago-12)
  (i.e. a font that can be used on a real explorer, not on a micro
  explorer of course... Please dont reply that I ought to know about
  variable *mac-font-translation-table* because this isnt what I want.
  I want to be able to save this font into an XLD file that can be
  read on the explorer)

- Convert a MacIntosh bitmap (i.e. MacPaint file) into an explorer
  bitmap (i.e. loadable using w:read-bit-array-file)

- A horizontal scrollbar mixin working on the micro explorer running
  release 5 system software.

- A patch so that vertical scrollbars will stop scrolling once the
  last elements have reached the bottom of a text-scroll-window when
  scrolling up. I have redefined method :scroll-to so as to get the
  proper behavior (it does not put the last element at the top of the
  window when scrolling up) but what I did not manage to achieve is to
  have the little white square with the page number be at the proper
  position within the scroll bar. When the last element is at thee
  bottom of the window the square is not at the bottom of the scroll
  bar which is highly misleading.

- A final question. We do not have release 6 yet, and I wonder how
  different the interface building tools are with respect to release
  5. If we set aside the fact that the low level implementation is
  different (CLX I believe) and that the mid level stuff (CLUE) is
  based on CLOS instead of on FLAVORS, is there still a high level
  layer more or less compatible with previous releases (ex:
  constraint frames, text scroll windows, CVV etc...). Is there a
  real support for multi-windows overlaping each others or are we still
  in the old philosophy of one window at a time?


                                        -- The French connection

jwz@teak.berkeley.edu (Jamie Zawinski) (10/20/89)

> - Convert a pure MacIntosh font to an explorer font (ex: chicago-12)
>   I want to be able to save this font into an XLD file that can be
>   read on the explorer)

Clint mentioned his code which does this; you can get it by anonymous FTP
to spice.cs.cmu.edu (128.2.254.139) in the file 
/usr/jwz/public/mac-font-convert.lisp.  I had some trouble using this code,
so I found an easier way: a whole lot of macintosh fonts are distributed 
with X11r3 in BDF font format; I have code which reads this format in
the above-mentioned directory.  Also, in the fonts/ subdirectory are 
compressed tar files of Explorer XLD versions of over a hundred mac fonts,
and all of the Adobe 75DPI fonts which came with X11r3.

> - Convert a MacIntosh bitmap (i.e. MacPaint file) into an explorer
>   bitmap (i.e. loadable using w:read-bit-array-file)

I have code for reading Amiga IFF files.  DeluxePaint on the Macintosh
produces files in this format; if you have a converter to DPaint's 
format, my code will probably read it.  It will read monochrome or color
images, but can't do dithering (anyone want to implement that?)

> - A final question. We do not have release 6 yet, and I wonder how
>   different the interface building tools are with respect to release
>   5.

TI just sent us release 6 last week (I'd had it for a couple of months 
before that, but I ain't sayin' how :-))  I encountered one problem of the 
type you fear; I have code which defines a new flavor of Lisp listener
in which everything printed with PRIN1 or PRINC is mousable - left returns
the object, right brings up a menu of operations on it.  This worked great
in Rel4, I just specialized the :PRINT method.  But now, all of that streams
stuff has been re-implemented in CLOS, so I had to write some CLOS methods
to get it working again.

This was hard, because the CLOS implementation of PRINT-OBJECT specializes
on the first argument (doing different things for vectors, symbols, etc).
I wanted to specialize on the second argument, the stream.  Ok, no problem
there, right?  Well, yes, there is.  I can't just say

(defmethod ticlos:print-object :around ((object t) (stream my-window))
  ... )

because if something is printed to *STANDARD-OUTPUT* (a common occurrence)
*STANDARD-OUTPUT* will hold a SYNONYM-STREAM instead of a MY-WINDOW.

So then I thought, ok, wrap print-object with some code that will replace
the syn-stream with what it points to, and then reinvoke.  That will let
the method-dispatching on the second argument work.

How do you tell if something is a synonym stream?  The only way I could
decide was (AND (SYMBOLP STREAM) (FBOUNDP STREAM)) which is pretty evil.

> Is there a real support for multi-windows overlaping each others or are 
> we still in the old philosophy of one window at a time?

Get the KSL code from Rice and Acuff.  It's really great stuff.  Right now
I'm typing this in a Zmacs taking up half of the screen, while on the other
half, a desktop is visible, with icons representing other application
windows.

			-- Jamie