/*****************************************************************************/
/* htmltext.h - 29/07/99 - By Christophe LOREK - CRYO-NETWORKS               */
/*                                                                           */
/* HTMLTEXT class                                                            */
/*                                                                           */
/* last modified on 12/08/99 By Christophe LOREK                             */
/*****************************************************************************/


#ifndef HTMLTEXT_H
#define HTMLTEXT_H

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

#include "node.h"
#include "structs.h"
#include "../x/version.h"
#include "../x/scolplugin.h"

// text alignements
#define HTMLTEXT_ALIGN_LEFT			0
#define HTMLTEXT_ALIGN_CENTER		1
#define HTMLTEXT_ALIGN_RIGHT		2
#define HTMLTEXT_ALIGN_JUSTIFY	3
#define HTMLTEXT_ALIGN_CHAR			4

// text attributes
#define HTMLTEXT_ATT_NORMAL			0
#define HTMLTEXT_ATT_BOLD				(1<<0)
#define HTMLTEXT_ATT_ITALIC			(1<<1)
#define HTMLTEXT_ATT_STRIKED		(1<<2)
#define HTMLTEXT_ATT_UNDERLINED	(1<<3)

// text attributes
#define HTMLTEXT_FLAG_NOCR	0
#define HTMLTEXT_FLAG_CR		1

class HTMLTEXT 
{
	public :
		int x;
		int y;
		int w;
		int textw;
		int h;
		int cx;
		int cy;
		int charheight;

	private :
		char	*string;
		char	*face;
		char	*url;
		int		size;
		int		align;
		int		red,green,blue;	
		int		attributes;
		int		flags;

	public :

	HTMLTEXT(mmachine,int givensize,int givenred,int givengreen,int givenblue,char *givenface,char *givenurl,int givenalign,int givenattributes,char *givenstring,int givenflags);
	~HTMLTEXT();
	int DRAWtext();
	char *Text();
	char *Font();
	char *Url();
	int Size();
	int Align();
	int Attributes();
	int Red();
	int Green();
	int Blue();
	int Flags();
};

#endif
