TclMotif Info
Welcome to...
A tcl binding to Motif
Who by
Jan Newmarch (jan@pandonia.canberra.edu.au).
Availability
The primary site for this is
csc.canberra.edu.au:/pub/motif/tclMotif/tclMotif.*.tar.z.
(Here)
It is also placed on X and tcl sites ftp.x.org and harbor.ecn.purdue.edu.
From these sites it will be available
on mirrors in lots of places. A binary version for Linux is also available
from Linux sites such as sunsite and tsx-11.
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.
Major changes in version 1.1
- Popup and Option menus added.
- XmDialogShell added.
- TopLevel widget added, and Root uses its methods (popup, popdown).
- Icons can now be set for toplevel widgets.
- Various bug fixes.
- More examples: xmeditor and wtour.
- Imakefile improved for shared libraries, contributed by Joseph E.
Sacco (jsacco@ssl.com).
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.
- Wafe uses Motif 1.1, tclMotif uses Motif 1.2. This gives me better
coverage of some parts of Motif, because Motif 1.2 supplies extra
hooks.
- The language syntax differs. tclMotif is closer to Tk than Wafe is.
Wafe (and WKSH) use
- command object ...
syntax. Both Tk and tclMotif use
- object command ...
- 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 we share code and
developments.
Status
This is now in beta status. Please report any bugs either in existing
code, or omissions that reduce the way you would like to use tclMotif.
The changes over the releases are summarised below
(CHANGES)
Requirements
TclMotif-1.1 has been built using tcl7.3 and the Motif 1.2.1 development
libraries. You need both.
It has been tested on
- SunOS 4.1
- SunOS 4.1.3
- 486 running Linux (0.99 pl26, 1.0pl9)
Earlier versions used tcl6.7, but this is
no longer supported. It should compile using tcl7.0b3 onwards, and all
versions of Motif 1.2. There is some Motif 1.1 support i.e. it will
compile and most things will run, but some things such as getting
resource values of scalars such as XmNarrowDirection won't.
Files
- The directory src contains the source files.
- doc
contains the man pages, a skimpy user manual, and a draft paper.
- The examples directory contains a number of good programs that show how
Tm works.
- The wtour directory contains a widget-tour
program based on Andrew Payne's wtour program for Tk.
- The tests directory contains the regression test
files for Tm. These cover many features of Tm, but are not designed for
easy reading. The file index in this directory shows
what is tested.
- The programs directory contains adhoc programs
used in developing Tm. These are in no particular order, not documented.
You may see some useful examples in here, but it is pot-luck.
- At the top level, INSTALL tells you how to build
Tm and moat,
MOTIFBUGS explains why things aren't
my fault and COPYRIGHT tells who owns it and why.
CHANGES documents what has happened between versions.
Changes History
alpha release 0.1 June 1993
- INCOMPATABLE CHANGE: 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.
alpha release 0.2 July 1993
- INCOMPATABLE CHANGE: all widget creation commands have changed, adding
"xm" at the front. This avoids a name clash with tcl's "list".
- Motif 1.2 drag and drop is supported in a simple way.
- Translations are now supported
- Access is available to SelectionBox children using their Motif names.
- Can now draw strings in XmDraw* widgets using XDrawImageString.
- Can map/unmap widgets.
- INCOMPATABLE CHANGE: ported to tcl7.0, and support for tcl6.7 removed.
- Program added "actions" are now available.
- Can create GCs using XtGetGC.
- Pixel to String converter added.
- Class name is deduced from tcl source file.
alpha release 0.3 September 17, 1993
18. Tcl_AppInit added.
19. Compiles under Sun cc as well as gcc.
20. Imakefile makes libtclM.a
------------------- alpha release 0.4 September 21, 1993 -------------------------
21. Fixed bug using return value of Tcl_SetVar.
------------------- alpha release 0.5 September 23, 1993 -------------------------
22. Fixed bug in ClientData for widget creation.
------------------- alpha release 0.6 October 12, 1993 -------------------------
23. Fixed zero size of _comm widget.
------------------- alpha release 0.7 October 19, 1993 -------------------------
24. Fixed bug in ClientData in Tm_DestroyWidgetHandler.
25. Can now access children of MessageBox using their name.
26. Can now access children of SelectionBox outside of dialogs.
27. New method for all widgets: callActionProc. This allows actions to
be called from code, so that interactive input can be "faked".
28. New commands xtAppInitialize, new methods realizeWidget and mainLoop.
29. Class can be set in the program using an option to xtAppInitialize.
30. Fallback resources can be set using an option to xtAppInitialize.
31. INCOMPATABLE CHANGE: All of tmMain.c moved into tmAppInit.c so that tm
now becomes just an extension to tcl, with common extension methods.
This *requires* use of xtAppInitialize, realizeWidget and mainLoop.
32. New method "addInput" so that alternative input sources can be monitored.
They can be removed by "removeInput".
33. Regression test method added from tcl and "tests" dir created.
34. Fixed bug in getting resources of ".".
35. Fixed failure to copy path in RowColumn widget info creation.
36. #ifdef protected Motif 1.2 code so that it will sort of run under
Motif 1.1 (but things like getting scalars e.g. arrowDirection won't work).
This fix due to Jean-Dominique Gascuel (Jean-Dominique.Gascuel@imag.fir).
37. Protected function defs by #ifdef __cplusplus to allow compilation under
C++. Thanks to Jean-Dominique Gascuel for this.
38. Erroneous definition of appContext in tmFuncs.h removed (Jean-Dominique Gascuel).
39. Added "type" info to getGC value so that a naive type check can be performed
when its value is used (prefixed GC value with "gc-").
40. New widget command type added internally with a command handler Tm_RootCmd.
This is for application context things such as XtAppAddInputHandler, which
are handled from "." alone.
41. Improved error handling for malformed or non-convertible resource options.
42. New method "resources" added for all widgets. This returns a list of lists
{option-string option class type value} giving info about all resources.
43. Now use more general (and more correct) tclXtSend package for "send".
44. Used some debugging malloc packages to eliminate memory overruns. Highly
recommended: Connor Cahil's dbmalloc package posted to comp.sources.unix
(use archie to find it), which caught some overruns on the Sun; Mark
Moraes malloc package caught some more under Linux. This is available
only from the Uni Toronto site.
45. Changed userman.txt to tclMotif.man as section one man page entry.
46. Added man page for TmRoot
47. Addded man page for moat.
48. Added timer handlers.
49. Added man pages for SelectionBox and MessageBox.
------------------- alpha release 0.8 November 24, 1993 -------------------------
50. Added children to FileSelectionBox and FileSelectionDialog.
51. Man page for FileSelectionBox added.
52. DrawImageString method for DrawnButton documented.
53. ScrolledWindow children added in, and ScrolledWindow manpage created.
54. Changed fileno to filenum to avoid clash with macro of that name
55. Fixed bug in registering "action" as an action.
56. Added "processEvent" to root widget, to allow event processing loop
at a point in program. This is needed for modal-style programming.
57. Separated tmAppInit.c into files tmAppInit.c and tmBasic.c so that
tmAppInit.c can be replaced in toto in using other tcl extensions.
Any replacement should include tmFuncs.h and call Tm_Init(interp).
58. Added "reason" field to callback substitutions for all widgets.
59. Many callback substitutions added and all documented.
60. More list methods added. Half-way there :-(
61. Added methods "appendValue", "setValue", "error" for Command widget.
62. Fixed bug in converter for XmStringTable->String that left a pointer
into the stack instead of to static space.
63. Added methods to Text. Almost there on this one too!
64. Extended regression tests to cover hidden children, extra children and
new methods in List and Text.
------------------- beta release 1.0 December 22, 1993 -----------------------
65. XmDialogShell added.
66. tcl variables with version info added.
67. PopupMenu added.
68. OptionMenu added.
69. TopLevel widget added, and Root uses its methods (popup, popdown).
70. Icons can now be set for toplevel widgets.
71. bug of double delete of widget on destroyWidget fixed.
72. time stamp now uses XtLastTimestampProcessed instead of time().
73. Added WidgetList to String converter for children resource.
74. Interpreter name for "send" mirrors title resource (plus maybe #n).
75. wtour example program added (based on Andrew Payne's wtour for Tk).
------------------- beta release 1.1 February 8, 1994 -----------------------
Hops (hops@sco.com)
This page htmlised from the tclMotif-1.1 README and CHANGES pages