/*****************************************************************************/
/* html.h - 28/07/99 - By Christophe LOREK - CRYO-NETWORKS                   */
/*                                                                           */
/* HTML class                                                                */
/*                                                                           */
/* last modified on 03/08/99 By Christophe LOREK                             */
/*****************************************************************************/

#ifndef HTML_H
#define HTML_H

#include <stdlib.h>
#include <string.h>

#include "structs.h"
#include "node.h"
#include "parser.h"
class HTML;
#include "htmltree.h"
#include "htmltext.h"
#include "htmlbitmap.h"
#include "htmltable.h"
#include "../x/version.h"
#include "../x/scolplugin.h"

#define HTML_URLTYPE_HTML				0
#define HTML_URLTYPE_HTMLBITMAP	1
#define HTML_URLTYPE_HTMLTEXT		2

#define HTML_URLSTATUS_MISSING	0
#define HTML_URLSTATUS_GIVEN		1
#define HTML_URLSTATUS_NOTFOUND	2
#define HTML_URLSTATUS_ERROR		3

typedef struct
{
	char	*string;
	int		type;
	int		status;
} URL;

class HTML 
{
	public :
		int x;
		int y;
		int w;
		int h;
		int linkcolorred;
		int linkcolorgreen;
		int linkcolorblue;

	private :
		char	*title;
		int		nbURL;
		URL		**URLlist;

	public :
	
	HTML(mmachine,TagStruct *);
	~HTML(void);
	void	SetTitle(char *);
	void	CopyTitle(char *);
	void	GetTitle(char **);
	char	*GetTitle(void);

	int		AddURL(char *,int);
	int		GetURLStatus(char *);
	int		SetUrlStatus(char *,int);
	int		DisplayURLs();
	int		URLListToScolStack(mmachine m);
	
};

#endif