#ifndef HTML_GADGET_P_H
#define HTML_GADGET_P_H

#include <Xclasses/gadget.h>
#include <Xclasses/scroller.h>

#define WBORDER	2
#define HBORDER	2

class hgadget : public gadget
{
	class html_drawspecXclasses *drawspec;

	int markx1,markx2;
	int marky1,marky2;
	unsigned int marked:1;

public:
	hgadget(void);
	hgadget(class html_drawspecXclasses *);
	~hgadget();
	int Create(void);
	void GExpose(XEvent *e);
	int GActivate(XEvent *e,int why);
	int GSelected(XEvent *e,int why,int wasabove);
	int GMouseMove(int mx,int my,int rx,int ry,unsigned int state,int button);
	int GClipHandler(int why,char *,int);

	void scroll(int x,int y);
};

class phtml_gadget : public callable
{
public:
	friend class html_gadget;
	class html_gadget *o;

	phtml_gadget(void);
	~phtml_gadget();

	class html_parser 			*parser;
	class html_drawspecXclasses *xc;
	hgadget						*gg;

	int							hscrollersize;
	int							vscrollersize;
	scroller					horiz;
	scroller					vert;

	int							real_width;
	int							real_height;

	int							minrows;
	int							mincols;

	void draw(void);
	void move(void);
	void link(char *);
	void moveto(int,int);
};

#endif
