Theory of operation:
--------------------

This is an short and dirty documenten, sorry!         

The basic idea:
---------------
Normaly an graphic-applikation needs colors for its
buttons and labels, which should be allways the same,
and it needs colors for its iamges, which could be changed 
without redrawing the whole image. 
Colors of the first kind are located in the base-part of the TkPC-Colormaps,
those of the second kind are located in the work-part of the TkPC-Colormaps.

Too achieve both aims, one has to use private colortables.
Although TkPC gives you a possibility to define a work-part 
with a default colortable (Cmap alloc_work map list),
you have allways to redraw your iamges after changing the work_part of an default colortable!!!

Example:
--------
If you are using xf from Sven Delmas try the following lines 
in the tcl-script input part:

-------------------------
Cmap create map1 private
set v1 [Cmap query_tk]
set real_number_of_stored_colors [Cmap store_base map1 v1]
Cmap connect . map1
-------------------------

What happens here:

Cmap create map1 private:
This line creates a new colormap as a private type and the tag map1.

set v1 [Cmap query_tk]:
Ask the running Applikation which colors are allready in use.
After this call v1 contains a list of colors
e.g: 
puts stdout $v1 
{0 65535 65535 65535} {17 39529 36408 33287} {1 0 0 0} {3 65535 61423 54741}
each list-entry in v1 is also a list witch following structure:
index 0: pixel_index
index 1: red value {0 - 65535}
index 2: green value {0 - 65535}
index 3: blue value {0 - 65535}

Cmap store_base map1 v1:
Now store the informations in v1 as the base part of the 
private colormap

Cmap connect . map1:
In the last step you have to connect the colormap map1
with the top-level-widget "." (Which means everything in the application)

--------------------------------------
By trying out this example with xf you can also
see the difference between a libtk of PATCH-LEVEL I or II:

If you are opening a new window in xf, let us say the Procedure manager,
than the new widgets will allocate new colors in the case of LEVEL I,
but they are using the Colors of the base part of your private map, if
you are using libtk of LEVEL II in this example.

That's all in the moment, because I'm a not too motivated writing documentation.
For the rest of the problem, study the demo_scripts.
