/* Generated by wbuild from "LinkText.w"
** (generator version $Revision: 3.0 $ of $Date: 95/08/30 17:50:38 $)
*/
#ifndef _LinkTextP_H_
#define _LinkTextP_H_
#include <X11/CompositeP.h>
#include <./LinkText.h>
_XFUNCPROTOBEGIN
#define ATTR_CENTERED 0x01 


#define ATTR_WRAPPED 0x02 


#define ATTR_HANGINGINDENT 0x04 


typedef enum { CT_TEXT, CT_LINK, CT_DOTTAB, CT_LINEBREAK, 
							CT_BULLET, CT_TRAVERSER } ChunkType;
typedef struct _textChunk {
		ChunkType	type;
		String		text;
		String		link;
		int			text_attributes;
		int			font;
		int			color;
		int			indent;
		int			pagenum;
		int			x;
		int 		y;
		int			width;
		int 		height;
		int			depth;
		int			chunknum;
		struct _textChunk	*next;
	} TextChunk;
typedef struct _selectionMarker {
		TextChunk *chunk;
		int chunknum;
		int pos;
		} SelectionMarker;
typedef struct _pageDescription {
		TextChunk *start;
		int height;
		int width;
		} PageDescription;
typedef enum { PS_TEXT, PS_TAG, PS_FONT, PS_LINK,
		PS_LINKTEXT, PS_LINKEND, PS_DOTTAB, PS_INDENT, PS_HANGINGINDENT,
		PS_COLOR, PS_MIDDLE, PS_WRAP, PS_ENDATTR, PS_BULLET} ParseState;

typedef struct {
/* methods */
/* class variables */
int dummy;
} LinkTextClassPart;

typedef struct _LinkTextClassRec {
CoreClassPart core_class;
CompositeClassPart composite_class;
LinkTextClassPart linkText_class;
} LinkTextClassRec;

typedef struct {
/* resources */
String  hypertext;
XtCallbackList  activate;
XtCallbackList  newpage;
Dimension  internalOffset;
XFontStruct * font1;
XFontStruct * font2;
XFontStruct * font3;
XFontStruct * font4;
XFontStruct * font5;
Pixel  color1;
Pixel  color2;
Pixel  color3;
Pixel  color4;
Pixel  color5;
Pixel  color6;
Pixel  color7;
Pixel  color8;
Pixel  linkColor;
Pixel  selectForeground;
Pixel  selectBackground;
Boolean  underlineLinks;
Cursor  normalCursor;
Cursor  linkCursor;
Cursor  busyCursor;
int  selectThreshold;
int  spaceWidth;
Boolean  indentAscii;
int  bulletDiameter;
int  scrollInterval;
/* private state */
Boolean  selecting;
Boolean  selected;
Buffer * asciitext;
GC  ngc;
GC  graygc;
TextChunk * head;
TextChunk * tail;
TextChunk * lastFindChunk;
int  lastFindPos;
int  preferred_width;
int  preferred_height;
Boolean  busy;
int  maxheight;
int  grabx;
int  graby;
int  viewx;
int  viewy;
int  selectx_root;
int  selecty_root;
int  selectx;
int  selecty;
SelectionMarker  selectStart;
SelectionMarker  selectEnd;
SelectionMarker  lastend;
Position  topBorder;
Position  bottomBorder;
XtIntervalId  scrollTimer;
Cursor  grabCursor;
int  numPages;
PageDescription  pages[25];
int  currentPage;
Pixmap  pageBitmap;
} LinkTextPart;

typedef struct _LinkTextRec {
CorePart core;
CompositePart composite;
LinkTextPart linkText;
} LinkTextRec;

externalref LinkTextClassRec linkTextClassRec;

_XFUNCPROTOEND
#endif /* _LinkTextP_H_ */
