
Package name: array
Include file: array.h

Attribute			Type		Default
---------			----		-------

ARRAY_TILE_COLUMN_GAP		int		15

	The horizontal distance in pixels between objects in array.  Also, 
	the distance from leftmost and rightmost objects to the edge of the 
	array.

ARRAY_TILE_ROW_GAP		int		15

	The vertical distance in pixels between objects in array.  Also, 
	the distance from bottom and top objects to the edge of the 
	array.
	
ARRAY_TILE_COLUMN_WIDTH		int		40

	The horizontal space in pixels allocated to columns.  If a child 
	with a width larger than this is added to the array_tile or if a child
	is resized to be larger than this, this attribute grows accordingly.
	
ARRAY_TILE_ROW_HEIGHT  		int		20

	The horizontal space in pixels allocated to rows.  If a child 
	with a height larger than this is added to the array_tile, this number 
	grows accordingly, and the array_tile is rearranged to the new size.  

ARRAY_TILE_N_COLUMNS 		int		4

	The number of columns in the array_tile.
	
ARRAY_TILE_N_ROWS		int		1

	The number of rows in the array_tile.

ARRAY_TILE_COLUMN		object, int	-

	The column index of the object referenced.
	E.g.
		xv_set(array_tile, ARRAY_TILE_COLUMN, child, 12, ...)
	sets the `child' object's column to 12.
		xv_get(array_tile, ARRAY_TILE_COLUMN, child)
	returns the column index for the `child' object.

ARRAY_TILE_ROW			object, int	-

	The row index of the object referenced.  Same semantics as 
	ARRAY_TILE_COLUMN except references rows.

ARRAY_TILE_POSITION		object, int, int -

	The row and column position of the object referenced.
	For example,
		xv_set(array_tile, ARRAY_TILE_POSITION, child, 4, 5, ...)
	sets the position of `child' to column 4, row 5.
		(Rectobj) xv_get(array_tile, ARRAY_TILE_POSITION, 7, 3)
	returns the rectobj at position (7,3) in the array_tile.

	If a child's position is set outside of the array_tile's 
	dimensions it will not be visible.  Additionally, xv_get()
	of ARRAY_TILE_POSITION will only return handles of children that are 
	within the array_tile's dimensions.

	It is not permitted to have two rectobjs at the same position 
	in the array_tile.  If this happens, the object previously
	at that position will repositioned to (-1, -1).

ARRAY_TILE_LAYOUT		enumerated	ARRAY_TILE_LAYOUT_ROW

	This controls automatic layout of objects when they are added to
	an array_tile.  It also controls the growth of the array_tile
	when all the available positions are taken.

	This attribute should be either ARRAY_TILE_LAYOUT_COLUMN or 
	ARRAY_TILE_LAYOUT_ROW.

	If set to ARRAY_TILE_LAYOUT_COLUMN, new columns will added
	when the array_tile is full.  When not full, a position for the
	new object will searched for starting at the upper left (0,0)
	corner, proceding down each column in succession.

	If set to ARRAY_TILE_LAYOUT_ROW, new rows will added when the 
	array_tile is full.  When not full, a position for the new 
	object will searched for starting at the upper left (0,0)
	corner, proceding across each row in succession.

	When changing between layouts, objects will be repositioned if
	ARRAY_TILE_AUTO_LAYOUT is TRUE.

ARRAY_TILE_AUTO_LAYOUT		boolean		TRUE

	This controls repositioning of children when changes are made.
	Including the changes described in ARRAY_TILE_LAYOUT, this also 
	effects repositioning when children are added or deleted.

	When objects are added and this is TRUE, they are positioned
	automatically, as described by ARRAY_TILE_LAYOUT.  If FALSE,
	the application must specifically position children, using
	ARRAY_TILE_POSITION.

	If this attribute is TRUE, the hole left by a deleted object is 
	filled, as objects are shuffled about to keep the array_tile 
	compact as possible.  The ARRAY_TILE_LAYOUT attribute indicates 
	the direction of this shuffling.  If FALSE, no repositioning
	is done when objects are deleted.


Package name: canvas_shell
Include file: canshell.h

Attribute			Type		Default
---------			----		-------

CANVAS_SHELL_DELAY_REPAINT	bool		FALSE

	At the end of each xv_set() call, changes in visual appearance
	of objects on the canvas_shell are flushed to the screen.  
	Sometimes it is necessary to make several xv_set() calls to
	accomplish a task.  This can cause unnecessary and distracting 
	repainting if the type or number of changes is substantial.  
	This attribute is a workaround to avoid these problems.

	Setting CANVAS_SHELL_DELAY_REPAINT to TRUE prohibits all objects
	in the canvas_shell from repainting until the time that it is 
	reset to to FALSE.  At the time it is set to FALSE, any pending 
	changes are flushed.

	CANVAS_SHELL_DELAY_REPAINT can be set to TRUE several times, but
	it must be set to FALSE an equal number of times.  This can be
	helpful when the structure of the code is deeply nested.

CANVAS_SHELL_BATCH_REPAINT	bool		FALSE

	When this is set to TRUE, the canvas_shell creates a pixmap
	the size of the canvas_shell.  This pixmap is used to batch
	changes and reduces flashing during repaints.  Flashing is
	a problem mostly when object overlap or when there is a large
	number of objects.  Flashing is avoided because all repaints
	are first sent to this pixmap and then copied as a whole onto
	the canvas_shell's paint windows at once.

	This is a resource (memory) hit on the server.  There should
	be a flag added so the user can always override this.

	This may improve performance in some circumstances.  For example,
	if the canvas_shell is split, it one takes one additional
	copy to update each split window.  If the system this is running
	on has a cgsix (gx) board there is a performance hit because
	offscreen pixmaps are not accellerated.

	There is a problem with this, the canvas_shell doesn't currently
	listen for resize events.  This means that the batching pixmap
	will not be sized accordingly.  This needs to be fixed, but in 
	the meantime, the application that turns this on should 
	explicitly set this to TRUE on each resize so that it is the
	right size.

The canvas_shell sets the following attributes of the canvas package on
creation:
	CANVAS_REPAINT_PROC, 
	OPENWIN_SPLIT_INIT_PROC,
	CANVAS_PAINTWINDOW_ATTRS.
Application should avoid using these attributes.

 
Package name: drawarea
Include file: drawobj.h

Rendering Functions
-------------------


VDrawLine(drawarea, x1, y1, x2, y2)
		Drawarea drawarea;
		short x1,y1,x2,y2;

	Appends a XDrawline call to the display list.
	Coordinates are in 0 to 10000 virtual space.

VDrawLines(drawarea, points, npoints, mode)
		Drawarea drawarea;
		XPoint *points;
		int npoints, mode;

	Appends a XDrawLines call to the display list.
	Coordinates are in 0 to 10000 virtual space.

VDrawRectangle(drawarea, x, y, width, height)
		Drawarea drawarea;
		short x, y, width, height;

	Appends a XDrawRectangle call to the display list.
	Coordinates and dimensions are in 0 to 10000 virtual space.

VFillRectangle(drawarea, x, y, width, height)
		Drawarea drawarea;
		short x,y, width, height;

	Appends a XFillRectangle call to the display list.
	Coordinates and dimensions are in 0 to 10000 virtual space.

VDrawArc(drawarea, x, y, width, height, start, stop)
		Drawarea drawarea;
		short x, y, width, height, start, stop;

	Appends a XDrawArc call to the display list.
	Coordinates and dimensions are in 0 to 10000 virtual space.

VFillArc(drawarea, x, y, width, height, start, stop)
		Drawarea drawarea;
		short x, y, width, height, start, stop;

	Appends a XFillArc call to the display list.
	Coordinates and dimensions are in 0 to 10000 virtual space.

VDrawString(drawarea, x, y, string, length)
		Drawarea drawarea;
		short x, y;
		int length;
		char * string;

	Appends a XDrawString call to the display list.
	Coordinates are in 0 to 10000 virtual space.
	The string is rendered in the current font, regardless of
	scalling.

VDrawPoly(drawarea, points, npoints, mode)
		Drawarea drawarea;
		XPoint *points;
		int npoints, mode;

	Appends a XDrawLines call to the display list.
	Coordinates are in 0 to 10000 virtual space.

VFillPoly(drawarea, points, npoints, shape, mode)
		Drawarea drawarea;
		XPoint *points;
		int npoints, shape, mode;

	Appends a XFillPolygon call to the display list.
	Coordinates are in 0 to 10000 virtual space.

Mode Setting Functions
----------------------

VSetFont(drawarea, font)
		Drawarea drawarea;
		Xv_font font;

	Appends a XSetFont call to the display list.
	The font is an xview font object.

VSetTile(drawarea, server_image)
		Drawarea drawarea;
		Server_image server_image;

	Appends a XSetTile call to the display list.
	The server_image is an xview server_image object.

VSetStipple(drawarea, server_image)
		Drawarea drawarea;
		Server_image server_image;

	Appends a XSetStipple call to the display list.
	The server_image is an xview server_image object.

VSetFillStyle(drawarea, fillstyle)
		Drawarea drawarea;
		int fillstyle;

	Appends a XSetFillStyle call to the display list.

VSetLineWidth(drawarea, linewidth)
		Drawarea drawarea;
		int linewidth;

	Appends a XSetLineWidth call to the display list.

VSetLineStyle(drawarea, linestyle)
		Drawarea drawarea;
		int linestyle;

	Appends a XSetLineStyle call to the display list.

VSetColor(drawarea, color)
		Drawarea drawarea;
		int color;

	Appends a XSetColor call to the display list.
	The color is an index into the window's cms.


Control Functions
-----------------

VFlush(drawarea)
		Drawarea drawarea;

	Traverses the entire display list, rendering as it goes.

VClear(drawarea)
		Drawarea drawarea;

	Clears the display list.  All commands are removed.



Package name: Drawicon
Include file: drawobj.h

Attribute			Type		Default
---------			----		-------

DRAWICON_TEXT			Drawtext	-

	The handle of the drawtext object that is contained in
	the drawicon.  Get only.

DRAWICON_IMAGE			Drawimage	NULL

	The handle of the drawimage object that is contained in
	the drawicon.  Get only.

DRAWICON_TEXT_COLOR		int		RECTOBJ_FOREGROUND_COLOR

	The color of the drawtext object that is contained in
	the drawicon.

DRAWICON_IMAGE_COLOR		int		RECTOBJ_FOREGROUND_COLOR

	The color of the drawimage object that is contained in
	the drawicon.



Package name: Drawimage
Include file: drawobj.h

Attribute			Type		Default
---------			----		-------

DRAWIMAGE_IMAGE			Server_image	NULL

	The xview server_image object to be displayed when
	the object is not selected.

DRAWIMAGE_HIGHLIGHT_IMAGE	Server_image	NULL

	The xview server_image object to be displayed 
	the object is selected.


Package name: Drawline
Include file: drawobj.h

Attribute			Type			Default
---------			----			-------

DRAWLINE_X			int pair		0
DRAWLINE_Y			int pair		0

	These two attributes are used to set/get the end points of the line
	relative to the parent.


DRAWLINE_ARROW_ANGLE		int pair		60 (* 64)

	The angle at the tip of the arrow.  This is measured in 
	degrees * 64, maximum is 360 * 64.


DRAWLINE_ARROW_LENGTH		int pair		10

	This is the length of the lines (in pixel dimensions) of the 
	cutting edge of the arrow head.


DRAWLINE_ARROW_INSET_LENGTH	int pair		7

	This is the length from the tip of the arrow to the 
	"neck" of the arrowhead.  It is measured in pixel dimensions.


DRAWLINE_ARROW_STYLE		int, enum (Arrow_style)	ARROW_NONE

	This should be one of the following:
		ARROW_FILLED
		ARROW_HOLLOW
		ARROW_SIMPLE
		ARROW_NONE

	Both ARROW_FILLED and ARROW_HOLLOW are filled polygon shapes.
	With ARROW_FILLED the arrowhead is drawn completely in the foreground
	color.  With ARROW_HOLLOW, the arrowhead is drawn in the background
	color and outlined in the foreground color.  

	ARROW_SIMPLE is not drawn as a polygon, but as the connection of
	three lines.  DRAWLINE_ARROW_INSET_LENGTH has no effect with this
	style.

	ARROW_NONE indicates that no arrowhead is drawn.  The basic simple
	line.


DRAWLINE_X0			int		0
DRAWLINE_Y0			int		0
DRAWLINE_X1			int		0
DRAWLINE_Y1			int		0

	These four attributes are functionally equivalent to their 
	DRAWLINE_X and DRAWLINE_Y counterparts except that they are 
	positioned within global coordinate space (i.e. relative to 
	the canvas_shell).



Package name: Drawrect
Include file:  drawobj.h

Attribute			Type		Default
---------			----		-------

DRAWOBJ_OPAQUE			Boolean		TRUE

	If TRUE, the drawrect is filled with the RECTOBJ_BACKGROUND_COLOR.
	If FALSE, the drawrect is not filled and whatever is behind it shows
	through.  In both cases, a rectangle border is rendered in 
	RECTOBJ_FOREGROUND_COLOR.



Package name: Drawtext
Include file: drawicon.h

Attribute			Type		Default
---------			----		-------

DRAWTEXT_STRING			char *		NULL

	The string to place in the object.  The drawtext will automatically
	shrink or grow to match the size of this string.

DRAWTEXT_FONT			Xv_font		(Default Toolkit font)

	The XView font that the drawtext is to be rendered in.



Package name: Grip
Include file: grip.h

Attribute			Type		Default
---------			----		-------

GRIP_SLIDE_X			Boolean		TRUE

	Specifies if the grip can be moved horizontally.

GRIP_SLIDE_Y			Boolean		TRUE

	Specifies if the grip can be moved vertically.

GRIP_MOVE_PROC			(int(*)())	default_grip_move_proc

	Called for each grip movement.

GRIP_DONE_PROC			(void(*)())	NULL

	Called when the grip has been released (button up).

GRIP_MAX_X			int		INT_MAX

	The maximum X position that the grip may move to.
	In canvas_shell coordinates.

GRIP_MAX_Y			int		INT_MAX

	The maximum Y position that the grip may move to.
	In canvas_shell coordinates.

GRIP_MIN_X			int		0

	The minimum X position that the grip may move to.
	In canvas_shell coordinates.

GRIP_MIN_Y			int		0

	The minimum Y position that the grip may move to.
	In canvas_shell coordinates.


Functions
---------

int default_grip_move_proc()

	Enforces the min/max and slide constraints.


Package name: Rectobj
Include file: rectobj.h

Attribute			Type		Default
---------			----		-------

RECTOBJ_CHILDREN		Rectobj_list*	NULL

	A doubly linked list of children.  Get only.

RECTOBJ_SELECTABLE		Boolean		FALSE

	If set to TRUE, the rectobj can be selected.

RECTOBJ_SELECTED		Boolean		FALSE

	If selected, this is TRUE.  Otherwise, it is FALSE.

RECTOBJ_CANVAS			Canvas		-

	The canvas_shell that the rectobj is in.

RECTOBJ_FOREGROUND_COLOR	int		WIN_FOREGROUND_COLOR
RECTOBJ_BACKGROUND_COLOR	int		WIN_BACKGROUND_COLOR

	Colors of the rectobjs, indexed into the cms.

RECTOBJ_X			int		0

	The X position of the rectobj, relative to the canvas_shell.

RECTOBJ_Y			int		0

	The Y position of the rectobj, relative to the canvas_shell.

RECTOBJ_PARENT			Xv_opaque	-

	The rectobj's parent (or "owner").  Except for Canvas_shells,
	this is equivalent to XV_OWNER.

RECTOBJ_NTH_CHILD		int		-

	The Nth child of a rectobj.  Get only.

RECTOBJ_STACKING_POSITION	int		INT_MAX

	The stacking position of an rectobj.  Setting this to
	0 will put the rectobj on the bottom, INT_MAX puts it
	on the top.

RECTOBJ_PAINT_PROC		(void (*)())	rectobj_paint_proc
RECTOBJ_EVENT_PROC		(void (*)())	rectobj_event_proc
RECTOBJ_MAP_EVENT_PROC		(Rectobj (*)())	rectobj_map_event_proc

	The paint, event, and map_event functions for a rectobj.
	Not normally used by applications.

RECTOBJ_DRAGGABLE		Boolean		FALSE
	
	If TRUE, the rectobj can be the source of a drag and drop
	operation.

RECTOBJ_DRAG_CURSOR 		Xv_cursor	(copy cursor)

	The cursor to represent the rectobj while it is being drag 
	and dropped.

RECTOBJ_DROP_PROC		(void(*)())	NULL

	The function to be called when the rectobj is a drop target
	and something has been dropped on it.

RECTOBJ_ACCEPTS_DROP		Boolean		FALSE

	If TRUE, the rectobj is a drop target.  This must be
	true if the drop notification procedure is to be called.

RECTOBJ_MENU			Menu		NULL

	The menu to be displayed when the left mouse button is 
	clicked on a rectobj.  Menus cascade down the hierarchy,
	such that children use their parent's menu if none is
	specified for the child.

RECTOBJ_DBL_CLICK_PROC		(void(*)())	NULL

	For selectable rectobjs, the function to be called when a
	double click occurs.

XV_X				int		0

	The X position of the rectobj, relative to the rectobj's parent.
	The meaning of setting this varies with the XV_OWNER's type.

XV_Y				int		0

	The Y position of the rectobj, relative to the rectobj's parent.
	The meaning of setting this varies with the XV_OWNER's type.

XV_WIDTH			int		0
XV_HEIGHT			int		0

	The size of the rectobj in pixels.

XV_RECT				Rect *		{0,0,0,0}

	The position and size of the object.

XV_OWNER

	The parent of an rectobj.  This can be changed at any time.


Functions
---------

void	(*root_window_drop_proc)();

	A pointer to a function for notification when objects are dropped
	on the root window.  


void	show_rectobj_hierarchy( rectobj, frame )

	This creates a popup showing the hierarchy of objects beneath
	`rectobj'.  The `frame' is the frame that `rectobj' is in.
	This is intended as a debugging utility only.


Package name: Tree
Include file: tree.h

Attribute			Type		Default
---------			----		-------

TREE_ADD_LINK			Rectobj, Rectobj -

	Connects the second argument as a subtree of the 
	first argument.  Set only.

TREE_UNLINK			Rectobj		-

	Detaches a node from the tree hierarchy. Set only.

TREE_LINK_FROM			Rectobj		-

	Returns the node (rectobj) that points to the argument.
	(The node that this leaf is a subtree of.)

TREE_LINK_TO_LIST		Rectobj_list	-

	Returns a linked list of a node's leaves.  Get only.

TREE_PARENT_DISTANCE		int		30

	Distance, in pixels, between nodes and their leaves.

TREE_LAYOUT			Tree_layout	TREE_LAYOUT_HORIZONTAL

	Either: TREE_LAYOUT_HORIZONTAL (trees grow to the left), or 
	TREE_LAYOUT_VERTICAL (trees grow down).

TREE_BORDER			int		4

	The amount of space, in pixels, that forms a border around objects 
	in the tree.

TREE_DRAWLINE			Drawline	-

	The returns the handle to the drawline object that points to it. 
	Get only.

