Catalog(3U) | InterViews Reference Manual | Catalog(3U) |
Catalog - stores and retrieves named objects
#include <Unidraw/catalog.h>
A catalog provides independent name-to-object mappings for component subjects, commands, tools, and editor info objects. Once named, an object can be retrieved later, even if the application has been exited and restarted. The catalog thus provides a means for saving objects in non-volatile form for subsequent retrieval.
brushi: Define the ith brush resource. The ReadBrush operation retrieves the brush object for this resource given a definition. The definition usually specifies two numbers: a 16-bit hexadecimal number to define the brush's line style (each 1 bit draws a dash and each 0 bit produces a gap), and a decimal integer to define the brush's width in pixels. For example, ``ffff 1'' defines a single pixel wide solid line. If the definition specifies only the string ``none'', then it defines the nonexistent brush.
fgcolori: Define the ith foreground color resource. The ReadColor operation retrieves the color object for this resource given a definition. The definition contains a string defining the name of the color, optionally followed by three decimal numbers between 0 and 65535 to define the red, green, and blue components of the color's intensity. The intensities override the name; that is, the catalog will look the name up in the database of common colors only if you omit the intensities. For example, ``Indigo 48896 0 65280'' defines a color which is a mixture of red and blue. You can define shades of gray by using equal proportions of each primary color.
bgcolori: The background color resource definition is specified in the same manner as the foreground color.
fonti: Define the ith font resource. The ReadFont operation retrieves the font object for this resource given a definition. The definition contains three strings separated by whitespace. The first string defines the font's name, the second string the corresponding print font, and the third string the print size. For example, ``8x13bold Courier-Bold 13'' defines the third font entry.
patterni: Define the ith pattern resource. The ReadPattern operation retrieves the pattern object for this resource given a definition. The definition can specify the pattern for a 16x16 bitmap, a 8x8 bitmap, a 4x4 bitmap, a grayscale number, or the string ``none''. You specify the 16x16 bitmap with sixteen 16-bit hexadecimal numbers, the 8x8 bitmap with eight 8-bit hexadecimal numbers, the 4x4 bitmap with a single 16-bit hexadecimal number, and the grayscale number with a single floating point number. The floating point number must contain a period to distinguish itself from the single hexadecimal number, and it must lie between 0.0 and 1.0, where 0.0 corresponds to a solid pattern and 1.0 to a clear pattern. On the printer, the bitmap patterns appear as bitmaps, the grayscale patterns appear as halftoned shades, and the ``none'' patterns never obscure underlying graphics. For example, ``pattern8:8421'' defines a diagonally hatched pattern.
Clipboard(3U), Command(3U), Component(3U), ControlInfo(3U), Creator(3U), EditorInfo(3U), Graphic(3U), PropertySheet(3I), StateVar(3U), Tool(3U), TransferFunct(3U), World(3I), globals(3U), istream(3C++), ostream(3C++)
11 June 1990 | Unidraw |