InterViews(3I) — InterViews Reference Manual
NAME
InterViews − user interface library
SYNOPSIS
#include <InterViews/class.h>
CC ... −lInterViews −lX −lm
DESCRIPTION
The InterViews library contains a collection of C++ classes for implementing user interfaces. All interactive objects are derived directly or indirectly from the Interactor class. All composite interactive objects are derived directly or indirectly from the Scene class, which itself is derived from Interactor. Subclasses include Box(3I) and Glue(3I) for tiling interactors, Tray(3I) for overlapping/aligning, Frame(3I) for decorating a single interactor, Deck(3I) for paging through a list of interactors (one visible at a time), Viewport(3I) for scrolling/panning around a larger interactor, Scroller(3I) for a simple scrollbar, Panner(3I) for 2-D scrolling and zooming, and Menu(3I) for simple pop-up menus. An instance of the World(3I) subclass is used to map interactors onto a display.
A number of classes are provided for graphics input and output. These include Canvas(3I) for display regions; Painter(3I) for drawing operations; Brush(3I), Color(3I), Font(3I), and Pattern(3I) for controlling graphics characteristics; Cursor(3I) for the screen appearance of a pointing device; Event(3I) for input events, and Sensor(3I) for expressing interest in a set of possible events; Rubberband(3I) objects for interactive dragging and placement.
The basic InterViews library includes the above classes. The libgraphic(3I) library provides an additional set of classes for defining structured graphics and storing graphical objects in files.
All InterViews header files include the following definitions from “<InterViews/defs.h>”:
typedef int Coord;
Display coordinates are represented uniformly as 32-bit integers; however, the units depend on context because of the possibility of coordinate transformations (see Painter(3I)). The predefined variables cm, inches, pixels, and points should be used as units if no transformations are present (e.g., “Coord x = 3∗inches”). This convention makes the coordinate values independent of screen resolution. The variables inch and point are also provided as synonyms for inches and points, respectively.
typedef unsigned boolean;
Boolean values are represented as unsigned integers. The constants true and false are predefined.
typedef unsigned Alignment;
Alignments are used to specify the physical relationship between objects such as components in a Tray(3I). The interpretation of an Alignment is context-specific. The constants TopLeft, TopCenter, TopRight, CenterLeft, Center, CenterRight, BottomLeft, BottomCenter, BottomRight, Left, Right, Top, Bottom, HorizCenter, and VertCenter are predefined.
typedef unsigned TextStyle;
A TextStyle specifies a combination of stylistic attributes that are applied to text drawing. The style is obtained by ORing together zero or more of the predefined constants Boldface, Underlined, and Reversed. The constant Plain specifies an unadorned style.
#define nil 0
The symbol nil represents a pointer to a non-existent object. Dereferencing nil is an error.
int min(int, int), int max(int, int)
float min(float, float), float max(float, float)
double min(double, double), double max(double, double)
Return the minimum or maximum of two integers, floats, or doubles.
int round(double)
Return the integer closest to its argument.
InterViews — Last change: 31 July 1988