TkZinc creates two sets of bitmaps.
The first set contains symbols for ATC tracks position, waypoints position and maps symbols. These bitmaps are named AtcSymbol1 to AtcSymbol22.
The second set provides stipples that can be used to implement transparency, they are named AlphaStipple0 to AlphaStipple15, AlphaStipple0 being the most transparent.
Tk::Zinc::Debug.pm is a Perl module useful for debugging purpose. It can be used in a Perl application using TkZinc to display the hierarchical tree of items, to display items selected by their id or tags, to grab items with the mouse and to get the list of items enclosed or overlapped by a rectangle designated by the mouse. You will be presented a list of items, with many interesting attributes such as position, priority, visibility, group... and even more information on request. Much of the selected items attributes can be interactively modified. When an application uses Tk::Zinc::Debug.pm, you can get a short reminder by depressing the Esc key in the main window of this application. For more information, please refer to the Tk::Zinc::Debug.pm man pages with the classical command man Tk::Zinc::Debug
To use this module, you can import it either by adding, for example, the following statements in your source code:
use Tk::Zinc::Debug;
finditems($zinc); tree($zinc, -optionsToDisplay => '-tags', -optionsFormat => 'row'); |
or simply by using the -M option of Perl:
perl -MTk::Zinc::Debug yourscript.pl
|
TkZinc package includes two tools for helping you debugging your Perl/Tk scripts or tracking some nasty segfault which should never occure since TkZinc is (almost) totally bugfree.
Because you sometime get some errors inside TkZinc with a cryptic message like ".... errors in Tk.pm line 228", it may be usefull to know where exactly in your code is the error. There is a simple and convenient mean to do this, just by using a small module called Tk::Zinc::TraceErrors, released with TkZinc. It traces every call of a TkZinc method inducing a Tk error. It prints on the standard output the following informations:
To use this module you can import it either by adding the following statement in your source code:
use Tk::Zinc::TraceErrors;
|
or better, by using the -M option of Perl:
perl -MTk::Zinc::TraceErrors yourscript.pl
|
If you encounters a segfault in one Perl/Tk script and you suspects that TkZinc might be responsible, you should use a small module called Tk::Zinc::Trace, released with TkZinc. It traces every call of a TkZinc method. The method call is printed on the standard output before the effective call, and the result of the invokation is printed after the call. To be sure to identify a segfault at the proper time, it forces an update of TkZinc widget. Thus, this might slow down your script, but should dramatically speed up the identification of the call which makes TkZinc segfaulting. It prints on the standard output the following informations:
To use this module you can import it either by adding the following statement in your source code:
use Tk::Zinc::Trace;
|
or better, by using the -M option of Perl:
perl -MTk::Zinc::Trace yourscript.pl
|
Starting at version 3.2.4 of TkZinc small applications are included as demos. They are all accessible through an application called zinc-demos. These numerous (about 30) tiny demos are useful for newcomers and as starting points for developing real applications. They consists in toy applications, graphically advanced examples or even a TkZinc port of TkTetris from Slaven Rezic.
The Tk::Zinc::Graphics Perl module implements many high level functions for building high quality graphic objects with TkZinc.
Please read the man page for more details: man Tk::Zinc::Graphics, french version only currently. Any volontear to translate it in English?
NB: There is also a tcl version of this module.
The Tk::Zinc::Text Perl module implements bindings for text input ’a la emacs’. It works for text item or for text fields of track, waypoint or tabular items. The item which requires text input must just be tagged with the ’text’ tag.
Please read the man page for more details: man Tk::Zinc::Text
The C function AddItemClass provided with the source code of TkZinc, can be used to extent the default set of items in TkZinc in an additionnal dynamic library. The AddItemClass C function is extensively used for implementing the core item set. So please refer to the source code for examples or send email for more information on precise problems.
We will try to further document this feature in the future.
In the course of the development of IntuiKit, IntuiLab developed a C++ API to TkZinc. This wrapper gives access to functions of TkZinc for opening/closing of a Tkzinc window, creating/destroying items, using colour gradients, events, access to the mainloop... directly in C++ by hiding the use of Tk. This source code (as well as samples and tests) are distributed with TkZinc. IntuiLab choose the same licence than TkZinc, ie LGPL. The C++ API does not fully cover all TkZinc functions, but most of them can be easily extended (e.g. the access of some ATC items currently not wrapped such as track, waypoint, tabular...).
The C++ api is fully documented and have been largely tested by IntuiLab for its own need.
IntuiLab hopes this wrapper will be useful to the TkZinc community.
[front]