Tcl Powered

Tcl/Tk Extensions

Extension Name Description, Readme, & Examples Source & Binary links
Extension Name Description, Readme, & Examples Source & Binary links
Curses TK
Tk emulation for terminals 
For Unix
Date: 5 September 1999
Current Source Tree
Last in-work snapshot
PNG, JPEG file production Nearly identical interface to GDI Windows & Unix
Last update: 22 May 2008


Sample Output JPEG 

Sample Output PNG 
Tom Boutell's Home Page 

Tcl8.4 (Microsoft) (304546)
Windows GDI calls Same interface as GD, and similar to canvas calls For Windows
Last update: 10 May 2009

Example 1 
Example 2 

Tcl8.5 (Microsoft) (142449)
Handle interface and utilities. Manipulates name/address translation at the Tcl level, or for other extensions. For Windows & Unix
Version: hdc version:
Last update: 22 May 2008


Tcl8.5 (Microsoft) (33709)
.INI file manipulation 

Windows and Unix

Unix code includes functions for complete INI file support in C as well as the code for the static or dynamic extension

Formerly known as the "profile" extension
Last update: 22 May 2008


Tcl8.4 (Microsoft) (30367)
MAPI and CMC interfaces to enable sending mail from programs. Mail includes To, CC, BCC, Subject, Body, Attachments, logon if needed. Includes selection of addresses from mail address book. For Windows
Last update: 22 May 2008

Example 2 

Tcl8.4 (Microsoft) (71960)
Windows printer interface and utilities

For Windows & Unix
Last update: 27 May 2009

sample usage
Sample procs for text file printing
a2ps-like text processor for ANY windows printer
Simple proc to print a canvas to ANY windows printer (Thanks to John Blattner for original code)
Simple UI to print canvas contents. Requires prntcanv.tcl in current directory

Tcl8.5 (Microsoft) (144105)
This extension adds dynamically loadable signal handling to Tcl/Tk scripts

For Unix
Version: signal version:
Date: 21 Mar 2012


Unix (22339)

Windows metafile extension. Creates drawing contexts for metafiles and allows copying to and pasting from the clipboard.

For Windows
Last update: 31 May 2009

sample program is provided which uses wmf and gdi extensions to create an enhanced metafile and paste it to the clipboard.
A sample program is provide which uses wmf to interpret a metafile and place it on a canvas.

Tcl8.5 (Microsoft) (104633)

Tcl/Tk Items Of Interest

  Curses TK

Due to the work of Martin Andrews (Cleveland Clinic) and Juanjo Ciarla (Argentina?), a version of curses TK is available which compiles under Tcl8.0 (Tested under OSF1 V4.0).

This version does not yet have all the features of tcl 8.0--in fact, featurewise it's stuck back in 7.4 land. I do hope to add the grid command soon, though, and fix the options and commands to match 8.0, as well as switching to the new include structure.

Current CTk source tree

Graphics Drawing (GD) Extension

Based on Tom Boutell's GD library with some enhancements, this extension allows the user to generate images (JPEG or PNG). Tk is not needed.

GD source and binaries are available Here

Graphics Device Interface (GDI) Extension

To test the printer, it was necessary to develop a few graphics device interface (GDI) routines. To be useful, these were also put into a Tcl extension called the GDI extension.

The GDI source code and binaries are available Here

The copybits subcommand owes its initial implementation to Arndt Roger Scheider ( and Heiko Schock ( Thanks!

This command still needs work, and I will continue to change it to use more code from the Tk Canvas widget commands. A Readme file and sample usages (1) (2) (3) are provided.

Note that the GDI extension test uses the Printer extension.

Hdc extension

The hdc extension allows the scripter or programmer to associate arbitrary addresses with typed names. This allows the script to manipulate meaningful names, while the underlying mechanism is very open. The printer extension uses this to manage printer contexts; the wmf extension uses it to manage metafile contexts and metafile handles; the gdi extension uses these handles to extract the windows device context for manipulation.

HDC source code and binaries are available Here

MAPIMail Extension

The MAPIMail Extension (formerly Tkmsmail) also includes source code. This extension enables MAPI and cmc interfaces from your Tcl/Tk programs. These allow a Tcl program to send mail in a Windows environment by using your installed mail program. That is, if you use Exchange, the mail will be posted by Exchange--if you use Eudora, the mail will be sent by Eudora. If you leave off recipients (or specify the -debug flag) your mailer will prompt you for the missing information. If you have set a default mailer, it will even offer to log you in if you haven't done so yet.

Version 0.6 adds the ability to use your mailer's address book and system UI to select recipients for mail. This capability works for Windows95 and WindowsNT only.

Version 0.7 provides consolidated Borland and Microsoft code, thanks to the contributions of Christopher Nelson (

Version 1.0 adds basic inbox reading capabilities thanks to Mark Austin (

Get MAPIMail source and binaries Here

Printing package

The printer extension allows invocation of common printer dialogs, and exposes the device context (DC) for supporting interaction with other platform-specific drawing primitives.

Many interesting things drawn on the screen can be drawn on the printer.

A related extension is the GDI extension, which can draw on the device contexts returned from the printer command, including copying screen images to the printer with other text and graphics.

The Printer extension source and binaries are available Here

A new version for Unix (9580) is also available. This version has fairly primitive dialog boxes, and "hardcodes" /bin/lp and /bin/lpstat -a in as versions of the printing commands, but should work on most platforms with minimal tweaking. Settings can be saved if the version of Ini is used.

Andreas Sievers helped with corrections to the Printer command for ISO papers and for improvements to the simple print procedure

Ini (formerly Profile) (.INI file) Extension

While Tcl/Tk version 8.0 provides a built-in capability to manipulate the Windows registry, it does not have the capability to manipulate profiles (.ini files). The ini extension allows this manipulation.

A Unix version of this extension is also available. The Unix release of the source, makefile for Linux, and a sample binary for Linux kernel 2.4 here.

The Unix version also contains C interfaces sufficient for complete INI file manipulation

Source and binaries for this extension are available Here

WMF (Windows Metafile) Extension

The wmf extension allows the scripter to create windows enhanced metafiles. The handles are suitable for the GDI extension to draw upon, or to copy to or from. The wmf extension (with gdi) can thus copy any window or drawing to the clipboard. Once on the clipboard, most products can paste the image into a document.

This package was originally written by Gerlinger Leopold as an addon for the GDI package. With his permission, I separated it into a package of its own for the purpose of providing contexts.

WMF source code and binaries are available Here