This is TkPC / Version 0.02 (TkPC = Tk Private Colormaps) Copyright (c) 1994 by Rainer Kliese All rights reserved. See the file COPYRIGHT for the copyright notes. Restriction: ------------ Only Pseudocolormodells now!! (Only 256 large colortables in the moment, will be changed soon) Requirments: ------------ Tcl 7.3 Tk 3.6 TkPixmap (optional for demowish) c compiler (required) c++ compiler (required until you invest one day of work, to change m_color.new.cc back to C code) Tested on: ---------- SunOS 4.1.3 with gcc2.5.8 Linux/Slackware 0.99pl15 with gcc2.5.8 Description: ------------ Handle Colormaps with tcl Give an easy mechanism to use those colortables in C and C++ function for drawing Pixmaps. New wish interpreter: cwish ( You find all new lines for TkPC for the new wish interpreter with: ) ( grep TkPC m_wish.c ) Two new wish commands: --------------------- 1.) Cmap [Cmap list] : Gives a list of all by TkPC allocated colormaps [Cmap query_tk] [Cmap query_base map-name] [Cmap query_work map-name] : This three functions return a define-list with the queried information [Cmap alloc_work map-name name-of-list-variable] [Cmap store_work map-name name-of-list-variable] [Cmap store_base map-name name-of-list-variable] : Look for this functions in the file Theory_OP [Cmap free_work map-name] [Cmap modeinfo] : returns a small list off all colormap and Visualtypes which are supported by your X-Server [Cmap create map-name type-name] : Create a colormap with arbitray name map-name of type type-name. type-name must be: default or private [Cmap free map-name off max] : XFree all ColorCells in colormap map-name between index off and index max Caution: wrong usage will terminate the interpreter without warning. Problem: You must have allocate those ColorCells before you free them, which is in the moment only possible in the C or C++ code. [Cmap connect widget cmap] : Connect a allready created widget with an existing colormap. Attention: This widget must be a toplevel-widget and all its childs will be changed too!! 2.) DestroyCmap [DestroyCmap cmap-name]: Destroys a Colormap completly, and replaces it in all widgets which have used it with the default Colormap This is only an alpha alpha!!! release of colormap handling under Tcl/Tk. Nearby is a small demonstration program, which loads gif and xpm3 images and uses allways a new private Colormap for this task. I hope thinks will grow rappidly with TkPC, but are depending on how much time I have between my normal work and on good new ideas for a lot of unsolved problems. Ideas and suggestions are always welcome. Rainer Kliese, 6. April 1994 stester@ag4.ruhr-uni-bochum.de