next up previous contents index
Next: Command Line Options Up: Starting Xic Previous: Starting Xic   Contents   Index

Graphics Support and Requirements

Under Microsoft Windows, Xic uses the standard Microsoft interface, and operation should be familiar to Windows users. Although an attempt has been made to keep the user interface as close as possible to the Unix/Linux interface, there are subtle differences. Under Windows, Xic can support any number of colors, however if the user has a choice, using modes with more than 256 colors is recommended. The remainder of this section pertains to the Unix/Linux versions only.

Under Unix/Linux, Xic is designed to run under the X windowing system which is standard on these systems. The present version of Xic uses the GIMP Toolkit (GTK+), which is an open-source library of display objects. Previous versions of Xic used a customized version of the original Athena (Xt) widget set provided with the X-window system. The GTK+ interface provides a more powerful, more visually attractive, and more standard graphical user interface.

Support is provided for pseudo-color displays of eight planes or more, and for true-color displays of 16 planes or more. In a pseudo-color display, each pixel value is an index into an array of color values (the colormap), whereas in a true-color display, a pixel value is decomposed into red, green, and blue components which set the color without any mapping (often this is referred to as a ``fixed colormap''). Pseudo-color displays are often more efficient for certain graphics operations, in particular blinking, since screen colors may be changed immediately by changing the mapping. In a true-color display, this would require actually redrawing areas of the screen. Most slightly older and low-cost workstations use pseudo-color displays. Modern PC hardware, on the other hand, provide both true-color and pseudo-color capability. The ``16 bit'' and ``32 bit'' modes are true-color, and the ``8 bit'' or ``256 color'' mode is pseudo-color. Typically, true-color is recommended if the user has a choice, as this eliminates the possibility of exhausting the colormap.

Xic will run on some other color systems, even gray-scale, though there may be shortcomings. In pseudo-color modes under X the display colormap is shared among all applications, thus if other applications have allocated too much of the colormap before Xic is started, Xic will create its own private colormap. This colormap will be installed when the keyboard is able to send characters to an Xic window, at which time windows of other applications may be shown in false colors. When the keyboard is not directing characters to an Xic window, Xic will be shown in false colors. Startup messages will report actions with respect to the colormap. This does not happen in true-color modes, as applications do not reserve pieces of the colormap in these modes.

In pseudo-color modes, the datum at the pixel address is used as an index into a colormap array, which contains red, green, and blue components for each entry. The size of this colormap determines the number of colors simultaneously available on-screen, which is usually 256. The strength of this approach is that ghosting and highlighting can be very efficient. Furthermore, on-screen colors can be dynamically adjusted by changing the colormap entries.

Graphics systems that use 16 bits or more per pixel generally contain no colormap. Instead, the datum is split into three components, the binary values of which control the red, green, and blue intensity. For example, the 16 bits are typically allocated into five bits for red and blue, and six bits for green. Thus, for each pixel, there are 32 x 64 x 32 combinations of the red, green, and blue values. This is important when rendering images, graphics with shading, and the like.

The disadvantage of 256 colors is that this number is rapidly consumed by applications. What the world needs is 16-plane pseudo-color displays, but this would require about 200KB of high-speed static RAM for the colormap, which might be expensive. Under X, this problem is addressed with virtual colormaps. If an application can not reserve sufficient colormap space, the option exists for the application to create its own colormap, which will be loaded when the application has the keyboard focus. This was described above for Xic. The problem is that other windows will be shown in false colors, as will be the application when the focus is outside of the application. The color switching can be annoying.

Xic should be compatible with any window manager program. Some window managers, twm being an example, have a mode where windows are not automatically made visible when created, but instead must be located on-screen by the user clicking. The window outline is ghost-drawn, attached to the pointer. Although Xic can be used in this mode, it is not efficient. The window manager should be set to automatically realize newly created windows. See the documentation for the window manager for information on how to change the defaults, if it becomes necessary to make this change. In twm, giving the RandomPlacement keyword in the startup file solves this problem.

Most window managers provide a choice between ``click to focus'' and ``focus follows mouse'' modes for specifying which window will receive keyboard input. In the former, one must click the border of a window for that window to receive keyboard input, and that window will retain the ``focus'' until another window is selected. In the latter case, keyboard input is always directed to the window containing the mouse pointer. Which system to use is a matter of personal preference, though the ``focus follows mouse'' mode is usually deemed more efficient.

Xic expects button events from buttons 1-3, and the same buttons with the Shift and Ctrl keys pressed. The three buttons (a three button mouse is recommended) are normally numbered from the left, with the mouse pointing upward. The Shift-button 1 and Ctrl-button 1 events are most important, Shift-button 2 is used only peripherally (in the fill pattern editor), and Shift-button 3, and Ctrl-buttons 2,3 are not presently used but may be used in future versions of Xic. The window manager should be set to not intercept these events, particularly those for button 1. If issuing Shift-button 1 brings up a menu of window manager options, for example, then the window manager mappings must be modified. Presently, it is not generally possible to modify the Xic button mappings at the user level.


next up previous contents index
Next: Command Line Options Up: Starting Xic Previous: Starting Xic   Contents   Index
Stephen R. Whiteley 2006-10-23