/*
 * Copyright 1990 by Baylor College of Medicine ALL RIGHTS RESERVED. 
 *
 * This program is subject to a license agreement between 
 * Baylor College of Medicine and MIT. Any use inconsistent with
 * said license and any use by persons other than the faculty, 
 * students and staff at MIT or any use on a computer not operated 
 * as part of the Athena Computing Environment (ACE) is expressly 
 * prohibited.
 */
#ifndef _VNSRESIZEP_H
#define _VNSRESIZEP_H

#include <VnsResize.h>

typedef struct
{
	int dummy ;
} VnsResizeClassPart ;

typedef struct _VnsResizeClassRec
{
    CoreClassPart		core_class ;
	CompositeClassPart	composite_class ;
	ConstraintClassPart	constraint_class ;
    VnsResizeClassPart	vnsResize_class ;
} VnsResizeClassRec, *VnsResizeWidgetClass ;

extern VnsResizeClassRec vnsResizeClassRec ;

/*
 *  Widget instance structure declaration
 */

typedef struct
{
	unsigned long foreground ;
	enum {DRAG_NONE,DRAG_TOP_LEFT,DRAG_TOP,DRAG_TOP_RIGHT,DRAG_RIGHT,
			DRAG_BOTTOM_RIGHT,DRAG_BOTTOM,DRAG_BOTTOM_LEFT,DRAG_LEFT,
			DRAG_MOVE} drag_type ;
	int	orig_x,orig_y ;
	int	del_x,del_y ;
	int	last_x,last_y ;
	int	last_width,last_height ;
	int resize_border;             /* the size of the resize border (resource) */
	XtCallbackList reconfigured ;  /* reconfigure callback list (resource) */
	XtCallbackList moved_off ;     /* moved off parent callback list (resource) */
	Boolean allow_resize_x ;       /* allow resize y flag (resource) */
	Boolean allow_resize_y ;       /* allow resize x flag (resource) */
	Boolean allow_move_x ;         /* allow move y flag (resource) */
	Boolean allow_move_y ;         /* allow move x flag (resource) */
	Pixmap stip_gray;              /* stipple for gray gc */
	GC gc ;                        /* general gc */
	GC drag_gc ;                   /* drag gc for moving object */
	GC gc_gray;                    /* gray shade gc */
	GC gc_black;                   /* black shade gc */
	int grab_x;
	int grab_y;
	int grab_w;
	int grab_h;
	int grab_x_offset;
	int grab_y_offset;
	Widget size;
	Widget target_widget;          /* target width upon which VnsResize operates */
	Boolean shift;
} VnsResizePart ;

typedef struct _VnsResizeRec
{
    CorePart		core ;
	CompositePart	composite ;
	ConstraintPart	constraint ;
    VnsResizePart	vnsResize ;
} VnsResizeRec ;

#endif /* _VNSRESIZEP_H */
