TkZinc widgets are very similar to Tk Canvases in that they support structured graphics. Like the Canvas, TkZinc implements items used to display graphical entities. Those items can be manipulated and bindings can be associated with them to implement interaction behaviors. But unlike the Canvas, TkZinc can structure the items in a hierarchy (with the use of group items), has support for affine 2D transforms (i.e. translation, scaling, and rotation), clipping can be set for sub-trees of the item hierarchy, the item set is quite more powerful including field specific items for Air Traffic systems and new rendering techniques such as transparency and gradients. If needed, it is also possible to extend the item set in an additionnal dynamic library through the use of a C api.
Since the 3.2.2 version, TkZinc also offers as a runtime option, the support for openGL rendering, giving access to features such as antialiasing, transparency, color gradients and even a new, openGL oriented, item type : triangles . In order to use the openGL features, you need the support of the GLX extension on your X11 server. Of course, performances will be dependant of your graphic card. At the time of writing, NVidia drivers for XFree86 R4.1 are doing a nice job. A laptop with a GeForce GO graphic card works nice for non trivial applications. We also succeeded in using TkZinc with openGL on the Exceed X11 server (running on windows and developped by Hummingbird) with the 3D extension.
As an example of TkZinc capabilities when combined with openGL, we implemented the TkZinc logo as a Perl module (available as a goodie in LogoZinc.pm). This logo (see below) was designed with Adobe Illustrator and then programmed in Perl.
Like the canvas TkZinc focuses on the notion of script language. We strongly believe that the script environments are very powerful for rapid prototyping and for developping small to medium scale field specific applications. In these cases developper know-how and time are a scarce resource and the application either has few clients or is short lived. It is important to grant non-specialists an access to the powerful tools that are available today for HMI building, through a rather simple product.
The TkZinc widget is available for the Tcl/Tk and the Perl/Tk scripting environments. A binding over Tcl/Tk is also provided for Python. It should be easy to do the same for Ruby, a binding for Tk is provided in the standard distribution of Ruby. Other scripting languages may be used as well depending on the availability of a Tk interface.
As of the 3.3.2 release, a C++ binding has been added thanks to Intuilab www.intuilab.com . It doesn’t cover the full Tk/Tkzinc extent but it should be quite adequate to test the concept and write small apps. It can be found in the directoy zinclib.d. It is provide in source form only, makefiles are available to build it for linux and windows.
This document is Tcl/Tk and Perl/Tk oriented but it should be easy for Python or Ruby programmers to adapt. Every time a TkZinc command is described in this document, it is given first in Tcl/Tk idiom and then in Perl/Tk idiom.
This document is also referenced as CENA technical note NT03-532.
This release has been mainly focused on producing a stable code base that compile and run on all three supported platforms with as little effort as possible.
The only functional change is the integration of the fieldbbox command into the bbox command.
TkZinc is available as source in tar.gz format or as Debian or RedHat/Mandrake packages at http://www.tkzinc.org/ .
The public Tkzinc CVS repository can be browsed at cvs.tkzinc.org . The most up to date copy can be grabbed anonymously with the following command:
cvs -d :pserver:firstname.lastname@example.org:/srv/tkzinc/cvsroot login
(press return when asked for a password), and then:
cvs -d :pserver:email@example.com:/srv/tkzinc/cvsroot co Tkzinc
Developpers can obtain a read/write access to the CVS database by giving their ssh public key to the Tkzinc maintainer. Once acknowledged as a developper they will be able to checkout with the command:
cvs -d :ext:firstname.lastname@example.org:/srv/tkzinc/cvsroot co Tkzinc
Then they’ll be able to commit theirs changes into the base.
This documentation is available as part of the TkZinc software. It is also available separately on the web sites. This document is formatted with LATEX and is distributed as either html pages or a pdf file.
As a complement to this reference manual, small Perl/Tk demos of TkZinc are also available through a small application named zinc-demos , highly inspired from the widget application included in Tk. The aim of these demos are both to demonstrates the power of TkZinc and to help newcomers start using Zinc with small examples.
This reference manual describes the TkZinc widget interface. It shows how to create and configure a TkZinc widget, and how to use the commands it provides to create and manipulate items. The next chapter Widget creation and options describes how to create a new widget and which options and resources are available to configure it. The chapter Groups, Display List and Transformations describes the use of groups and coordinates transformations. The chapter Item ids, tags and indices describes the item tags along with their main purposes. Also introduced is the concept of part name used by some items (track and waypoint ). Finally, this chapter provides a description of textual indices.
The chapter Widget commands describes the commands which apply to a Zinc widget. They are used for creating, modifying or deleting objects, applying transforms ... The chapter Item types describes all the items provided by TkZinc along with their attributes. The chapter Labels, fields and labelformat describes the use of labels, the possible attributes of fields and finally the labelformat syntax. The chapter Attributes types describes the legal form of all item attributes. The chapter The mapinfo commands introduces the mapinfo, a simple map description structure, and describes the commands used to create and manipulate mapinfos. Finally the chapter Other resources provided by the widget describes some resources provided by or with TkZinc.
Zinc has been developed by the CENA (Centres d’Etudes de la Navigation Arienne) for its own needs in advanced HMI (Human Machine Interfaces or Interactions). Because we are confident in the benefit of free software, the CENA delivered this toolkit under the GNU Lesser General Public License.
This software is copyrighted by the Centre d’tudes de la Navigation Arienne, Patrick Lecoanet, and other parties. The following terms apply to all files associated with the software unless explicitly disclaimed in individual files.
Here is the license text:
Copyright (c) 2005, Centre d’tudes de la Navigation Arienne, Patrick Lecoanet All rights reserved.
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Parts of this software are derived from the Tk toolkit which is copyrighted by The Regents of the University of California and Sun Microsystems, Inc.. The GL font rendering is derived from Mark Kilgard code described in “A Simple OpenGL-based API for Texture Mapped Text” and is copyrighted by Mark Kilgard under an open source license.
Zinc has been developed by Patrick Lecoanet. He also developed two previous version called Radar Widget which share some characteristics with this version. The Radar Widget was heavily used at CENA for many projects over nearly 10 years. The release 2 is still in use. It was enhanced and then used for actual radar displays in two main French Air Traffic Control Centres 24 hours a day. Dominique Ruiz, Frederic Lepied helped a lot in the developement of these earlier versions.
Zinc benefited greatly from the close interaction and the needs expressed by Jean-Luc Vinot. Jean-Luc has a background of Graphic Designer and is now an HMI developer at CENA. He envisions many, many new ideas for advanced HMI. Many of them would have been difficult to implement if at all possible with similar widgets. Zinc would have been less interesting without his ideas.
Didier Pavet and his team as well as Daniel Etienne and Herve Damiano were the first users and helped a lot either by reporting bugs, problems or solutions. Thanks to all these people and to the CENA for supporting this work.
The core of this documentation has been written by Patrick Lecoanet, the main author of TkZinc. This documentation has been enriched by Christophe Mertz.
If you are stuck with a feature you don’t understand. If you don’t know how to do something with TkZinc. If you think you have found a bug or a mismatch between the documentation and the behavior of the widget. Please feel free to contact us. Mail either email@example.com or the TkZinc mailing list. To subscribe to the mailing list, please consult the site http://www.tkzinc.org/ . Bugs can be looked up or reported using the Bugzilla facility located at bugzilla.tkzinc.org
If you think TkZinc is an interesting tool, they are many ways to help with TkZinc development. First of all, subscribe to the TkZinc mailing list and get in touch with us. To subscribe, please consult the site http://www.tkzinc.org/ .