home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.tcl
- Path: sparky!uunet!eco.twg.com!twg.com!news
- From: "David Herron" <david@twg.com>
- Subject: Re: Tk and Macintosh?
- Message-ID: <1992Nov19.235354.25088@twg.com>
- Sensitivity: Personal
- Encoding: 52 TEXT , 4 TEXT
- Sender: news@twg.com (USENET News System)
- Conversion: Prohibited
- Organization: The Wollongong Group, Inc., Palo Alto, CA
- Conversion-With-Loss: Prohibited
- Date: Thu, 19 Nov 1992 23:57:22 GMT
- Lines: 57
-
- I spent some time last summer looking at Tk and trying to get a feeling
- for how easily it would port to other windowing systems ...
-
- Tk, as it is currently implemented, uses X calls all through the library.
- There are utility procedures in the library which, for instance, handle
- text drawing and the 3D borders and so on. Then the widgets don't have
- much (or any, in some cases) X specific code to draw text or 3D borders.
- And some of the widgets look to be very portable ... But some are not.
-
- Out at the script level Tk doesn't hardcode X concepts into its concepts.
- Most of the commands are pretty generic but there are a few exceptions.
- For instance, when you specify a font name it is in the X format
- for font names. Then the way one creates a modal dialog is by using
- the `grab' command to make sure only the modal dialog window gets events;
- the `grab' concept is something I've only seen in X. These are the
- two which come immediately to mind ..
-
- There are three ways to proceed:
-
- - Portable graphics and event handling library. You'd knock some of the
- foundations out from under Tk's feet and rewrite things so that it
- used the low level drawing & event handling of the local system. This
- looked like a lot of work on something with which I did not have a lot
- of experience, but it would definitely be an interesting project.
-
- One of the far fetched ideas I had at that time was to talk with some
- place like Software Tranformation (which already has a portable graphics
- and events library) to see if they might want to have a product which
- was a script-driven application writing system which was portable to
- the world...
-
- A downside of this is the resulting windows wouldn't look like normal
- windows. Mac's have flat looking widgets while Tk's are 3d motif style.
-
- - Wrapper to implement an interface to the native widgets using Tk (or
- Tk-like) commands. The `button' (et al) command would create a little data
- structure which encapsulates the pointer returned by the native
- windowing system into a local data structure. Other structure would
- be set up to turn native events into whatever we'd need to drive
- the script.
-
- But this also looked to be a big project. The resulting programs would
- look like native programs though ...
-
- - Write a native implementation of Xlib. This by itself would be a big
- project, but once done Tk would have instant portability to that
- system.
-
- Fortunately we didn't need to write our own Xlib as we've found one
- for DOS. Unfortunately it's been taking awhile to port that Xlib
- to the compiler we have on DOS.
-
-
- <- David Herron <david@twg.com> (work) <david@davids.mmdf.com> (home)
- <-
- <- During the '80s Usenet's mantra was: "Not all the world's a VAX".
- <- During the '90s I hope it becomes: "Not all the world's DOS (ick)".
-