cmapdoctor

HUB | Up | Download | Pheedbak | Tree | Topic | A-Z | Search | Hot | New


extended cmapdoctor application

As of May, 1996, cmapdoctor has been extended in the following two ways:

  1. the list widget now displays the colormaps sorted by the colormap handle X provides.

  2. the display no longer just shows 256 colors -- it now displays the number of colors in the visual (e.g. 32x32 if its a 12-bit visual).


cmapDoctor:                     

a scanner/viewer of X colormaps and visuals including overlays, underlays, and popups. You can use this app to diagnose/debug/ verify colormaps and their contents in applications that use multiple colormaps and visuals.

This application is based on the object oriented UI toolkit ViewKit. The interface itself was designed with the ViewKit graphical interface builder, Builder Xcessory, which explains the partitioning of the source files and the subclassing structure.

Note: for the application to look even remotely correct you must install the defaults file (Cmapdr) in either a system (/usr/lib/X11/app-defaults), or local resources directory (your HOME directory), or run the cmapdoctor.sh script with Cmapdr being in the same directory.



Operation:

The application comes up displaying the defaultColormap used by the RootWindow. Displayed below in the scrolledList window is the current list of colormaps, by default, only 1 entry. At the bottom of the interface are two buttons, "list from root" and "list from picked". These are the two basic mechanisms for modifying the list of viewable colormaps. Clicking on "list from root" traverses the entire X window hierarchy starting with the RootWindow. This tree can consist of 1000's of windows so this operation can take some time (usually on the order of seconds). A watch cursor is displayed while this activity is going on. The list of colormaps generated represent the list of unique colormaps each of which must be currently associated with a window. X provides no way of determining all of the colormaps registered with the server. So instead, the windowAttributes is retrieved for each of the windows. This contains both the colormap and visual of the window. Additionally, special visual types like underlay, overlay and popup visuals, are also registered by using XLayerInfo routines (available on the Developer Toolbox in src/exampleCode/X/Xserver). As each new unique colormap is recognized, it is added to the list and displayed in the colormap viewing window.

Selecting "list from picked" changes the cursor to a crosshair-like cursor. This allows you to pick any top level window (immediate child of the RootWindow) by clicking on it and display all the colormaps associated with that window and its children. This does not include frames put on by the window manager. This is basically the same functionality as the xwininfo(1).



Interface:

View Window
The basic layout of the application has a primary viewing window near the top of the interface. In this window the currently selected colormap is displayed. It displays small colored squares each representing the color value of each of the entries of the colormap (up to the first 256 entries). The first colormap displayed is the defaultColormap which is the colormap used by the RootWindow.

Forward/Backward Buttons
Next downward in the interface are two blue 3D looking arrow buttons. These control forward and backward cycling through the list of currently listed colormaps if there is more than one.

RGB Readout
The info window between the two buttons displays the red, green and blue values of the currently selected color cell. This starts out as cell number 0. Clicking on other cells in the colormap view window updates these values to the current cell.

Colormap List
Next still is a scrolledList window which displays the current list of viewable colormaps. Each line lists attributes about the colormap and its associated visual. Clicking on any of these entries in the list makes that colormap and visual the active one displayed in the viewing window. You can use the arrow keys or the blue buttons to cycle through the colormaps.


Files of interest from "src/apps/cmapDoctor/cmapdoctor" directory

Source

Documentation

Bitmaps

Data

Reference


Select any combo of files you'd like to send yourself a compressed tar image of. Executables/scripts are indicated with a trailing `*' character. (Depending upon the browser, it may be necessary to hold down the Ctrl key to select/deselect disjoint items.) a compressed tar image of the above-selected items.
OR, ...
a compressed tar image of the entire cmapdoctor directory.

Copyright © 1995-96, Silicon Graphics, Inc.