Welcome to...
-------------

		A tcl binding to Motif
Who by
------
Jan Newmarch (jan@pandonia.canberra.edu.au).

What
----
This package consists of a set of functions and a standalone interpreter "moat"
that allow tcl programs to use the Motif set of widgets. A tcl file can be
read by the standalone interpreter much as the Tk "wish" does. The difference
is that instead of using the Tk library to create and manipulate Tk widgets,
this system uses the Tm library to create and manipulate Motif widgets.

Why
---
At the Tcl/Tk workshop, Motif was one of the things that people loved to
hate. Sure, it has set the standards for look-and-feel across X, but who
would want to use it? Debate (???) has also raged at times in the
comp.lang.tcl newsgroup, with statements such as
-	Motif must be slower - look at its overheads
-	Motif must be faster - it is compiled
-	Corporations must have Motif, nothing else
-	Just as long as it looks like Motif, who cares?
-	XmStrings are awful
-	Motif has internationalisation

So, because I know some Motif and some tcl and some tk, and am so incredibly
stupid as to be buying into such an argument, I thought that it would make it
easier to verify/disprove some of these theses if it was posible to directly
compare Tk versus Motif on the one hand, and tcl versus C on the other.
(Actually "versus" is not the right word - there is room for all of these
on a non-antagonistic basis.) Besides which, I have been involved with
Motif for so long that I don't actually find it hard to use at all, and
quite enjoy writing Motif programs. When I came across tcl, I found it
was even more fun to be playing with a type-free interpreted language
again, and thought it would be nice to combine the two.

As final reasons for doing this, consider the following: there are
bindings to Motif for the languages C, C++, Lisp, Ada, Prolog, Korn Shell
and PopLog.  A binding to Motif seems quite appropriate, especially
considering that it was so easy to do. The COSE group are apparently
considering an embedded command language - the existence of a Motif binding
would surely enhance the chance of tcl being this language.

Relation to Wafe
----------------
The Wafe project also provides a binding of Xt widgets to tcl. Originally
just the Athena widgets, it has been extended to other sets, and has a
Motif binding in beta. 
-	It uses Motif 1.1, mine uses Motif 1.2. This gives me better
	coverage of some parts of Motif, because Motif supplies extra
	hooks.
-	The language syntax differs. This one is closer to Tk than Wafe is.
-	I use the standard Motif callbacks, Wafe has its own callback model.
-	Wafe has more Xt support.
-	The primary aim of wafe is as a tcl/Xt front-end to other languages.
	My binding is just tcl to Motif, so I have been able to tune this
	to the Motif model easier.

I am in correspondence with the authors of Wafe, and it seems likely that we
will be able to share code and developments.

Status
------
This is real alpha status. The reason I have got so far so quickly with
this project is that tcl, Xt and Motif combine quite wonderfully in many
respects, and I have implemented whole swags of Motif functionality without
having the chance to test more than a fraction of it.

Changes from alpha release 0.1
-	Widgets must be explicitly managed
-	Third arg of a widget creation command can be "managed"
-	The ScrolledX and ..Dialog calls have the parent hidden as in Motif.
	A method ``parent'' is available to get at them.
-	A problem with setting some resources at create time (width, etc)
	has been fixed.
-	The verify callbacks for Text now work.
-	The size of a StringTable is deduced from the resource name.
	The internal code is gross, though.
Bugs that I know of:
-	there are many "Motif types" -> "String" convertors missing. This
	means that you can put stuff into a Widget, but can't get it back.
	This is really where the alpha status is. It shows up in error
	messages "No converter X to String".
-	The man pages are just a sample of what widgets there are. Try
	a widget and see if it works. If it doesn't, let me know.
-	There is no Xlib functionality.

It has been released at this stage to find out if there are any major
problems that I have overlooked.

Requirements
------------
This has been built using tcl6.1 and the Motif 1.2.1 development libraries.
You need both. I have so far tested this stuff on a Sun O/S 4.1 and a 486
running Linux. You may need to rebuild the tcl library or the Motif library
as described in INSTALL if the Motif library has been compiled without
the NO_REGCOMP flag. Depends on your luck, and what source code you have
access to.

Binaries
--------
Please don't ask for binary versions of this. A binary version is based
on Motif, uses Motif, and what is more offers access to the Motif library
via the Tm API. To release such a version would directly contravene the
license conditions under which I am using Motif. So I won't do it, because I
don't want to be sued.

Files
-----
The directory src contains the source files. doc contains the man pages, 
a skimpy user manual, and a draft paper (actually, a draught paper - it has
more holes than content right now). The programs directory contains all my
test stuff so far, in no particular order, and not documented. You may see
some useful examples in here. The regex directory contains tcl files
that may need to replace those in your tcl library. At the top level, INSTALL
tells you how to build it Tm and moat, MOTIFBUGS explains why things aren't
my fault and COPYRIGHT tells who owns it and why.
