Changes in Tk4.1
(Taken from the Release Notice)
Below is a list of the most important changes in Tk 4.1, relative
to Tk 4.0. Besides these changes, there have been numerous bug fixes.
For a complete list of absolutely every visible change, see the "changes"
file in the distribution.
- There is a new command "grid"
that implements a table style of
geometry management. This will be used by future releases of
the SpecTcl GUI builder.
- The wish main program now supports
-visual and -colormap commandline arguments.
- Text widgets have been improved in several ways:
- Performance when there are many tags should be much better now;
tags should only be slow if there are a very large number of tags
on an individual character.
- There are new "dump", "mark next", "mark prev" and "tag prevrange"
widget commands for extracting information out of a text widget.
- Tk is now a first-class Tcl package
(in the sense of the new
Tcl "package" command). You can load Tk into a slave interpreter
"foo" with the command "load {} Tk foo" if Tk is statically
linked. Tk can also be compiled as a shared library using the
--enable-shared switch for "configure".
- The event loop has moved to Tcl.
Many procedures and #defines
have been renamed, such as the "tkerror" command (now "bgerror"),
TK_READABLE (now TCL_READABLE), and Tk_DoOneEvent (now
Tcl_DoOneEvent). All of the old Tk names are still supported
for backwards compatibility but you should switch over ASAP to
the new ones.
- Tk_Preserve, Tk_Release, and Tk_Eventually have been
moved to Tcl.
There are #defines in tk.h for backward compatibility, but you
should switch ASAP to the new Tcl APIs.
- There is a new command "after info"
that allows you to find out about
pending "after" handlers that haven't yet fired.
- Scrollbars and scales now have proper button 2 support as required
by Motif.
- Menus have two new options,
-transient and -tearoffcommand.
- Entries have a new "bbox" widget command.
- When manual pages are installed, additional links are created for
each of the procedures described in the manual page, so that it's
easier to invoke the "man" command.
- Wish supports a new "--" option:
it will only process options
up through the --; anything after that will be passed through
to the application in the argc and argv variables.
Incompatibilities
Although Tk 4.1 is compatible with Tk 4.0 scripts at the Tcl level,
there are a few incompatible changes in Tk's C APIs. These will
only affect C code, not Tcl/Tk scripts, and they are obscure enough that
they probably won't affect many existing extensions. If there are any
potential problems, they will be detected by an ANSI-compliant C compiler
such as gcc.
- The procedure Tk_CreateMainWindow
no longer exists. Instead,
Tk_Init does everything that Tk_CreateMainWindow used to do.
- The procedures Tk_EventInit and Tk_CreateFileHandler2 have been
eliminated.
Tk_EventInit is no longer needed since the event loop
is always available. Tk_CreateFileHandler doesn't make sense with
the new notifier in Tcl, but you can get the same effect with the
new "event source" mechanism (see the Notifier.3 manual entry in
Tcl).
- Tk doesn't export any global C variables anymore,
because this
doesn't work with Windows DLLs. The C variable tk_NumMainWindows
has been replaced with the procedures Tk_GetNumMainWindows(), and
the variable tk_CanvasTagsOption has been replaced with the
procedures Tk_CanvasTagsParseProc and Tk_CanvasTagsPrintProc.
- The interface to Tk_RestrictProc has changed
so that the restrict
procedure can ask for an event to be discarded, as well as processed
or deferred.
Hops
(hops@sco.com)
$ Last Modified: $Date: 1996/04/24 00:19:08 $: