/*
 * 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.
 */
/* @(#)VnsTextP.h	1.10  4/10/90 */
#ifndef _VNSTEXTP_H
#define _VNSTEXTP_H

#include <VnsText.h>

typedef struct
{
	int dummy ;

} VnsTextClassPart ;

typedef struct _VnsTextClassRec
{
    CoreClassPart        core_class ;
    VnsTextClassPart vnsText_class ;
} VnsTextClassRec,*VnsTextWidgetClass ;

extern VnsTextClassRec vnsTextClassRec ;

typedef struct
{
	int pos ;
	int len ;
} Line ;

/*
 *  Widget instance structure declaration
 */
typedef struct
{
	char *str ;                  /* text string that is displayed */
	XFontStruct *font ;
	int fhgt ;                   /* font height */
	GC gc_fore ;
	GC gc_back ;
	Pixel foreground ;
	int highlight_begin ;
	int highlight_length ;
	Line *lines ;                /* internal list of lines to be displayed */
	int nlines ;                 /* number of offset lines */
	int mlines ;
	int is_extending ;
	int ext_start ;
	int n_select ;
	Time last_time ;
	GC curs_gc ;
	Pixmap curs ;               /* cursor */
	int curs_hot_x ;
	int curs_hot_y ;
	int curs_h ;                /* cursor height */
	int curs_w ;                /* cursor width */
	Pixmap def_curs ;           /* default cursor */
	Pixmap focus_stip ;
	Boolean have_focus ;
	int sel_pos ;
	Time sel_time ;
	Boolean own_selection ;     /* True when XA_PRIMARY is owned */
	Boolean own_secondary ;     /* True when XA_SECONDARY is owned */
	int nrects ;
	XRectangle *rects ;
	GC drag_gc ;
	int is_dragging ;
	int has_drawn_rects ;
	int last_drag_x ;
	int last_drag_y ;
	Boolean read_only ;
	int last_pos ;
	Widget vbar ;               /* vertical scrollbar widget */
	int top_row ;               /* internal line index for top row */
	Boolean drag;               /* if drag and drop is on or off */
	char *cutbuf;               /* cut buffer */
	Boolean use_buffer;         /* True if we can paste in from cutbuf */
} VnsTextPart ;

typedef struct _VnsTextRec
{
    CorePart core ;
    VnsTextPart vnsText ;
} VnsTextRec ;

#endif /* _VNSTEXTP_H */
