/*****************************************************************************/
/* htmlcell.cpp - 18/08/99 - By Christophe LOREK - CRYO-NETWORKS             */
/*                                                                           */
/* HTMLCELL class                                                            */
/*                                                                           */
/* last modified on 18/08/99 By Christophe LOREK                             */
/*****************************************************************************/

#ifdef HTML_INCLUDE

#include "htmlcell.h"


HTMLCELL::HTMLCELL(mmachine m,
										 int givenalign,
										 int givenred,
										 int givengreen,
										 int givenblue,
										 int givenwidth,
										 int givencols,
										 int givenborder,
										 int givenframe,
										 int givenrules,
										 int givencellspacing,
										 int givencellpadding)
{
	int				structbuf;
	int				nodetab;

	x = 0;
	y = 0;
	w = givenwidth;
	h = 0;
	cx = 0;
	cy = 0;

	align				= givenalign;
	red					= givenred;
	green				= givengreen;
	blue				= givenblue;	
	cols				= givencols;
	border			= givenborder;
	frame				= givenframe;
	rules				= givenrules;
	cellspacing	= givencellspacing;
	cellpadding	= givencellpadding;


// creating struct buffer
	structbuf = MMmalloc(m,NODESTRUCT_BUFSIZE,TYPEBUF);
	MMstore(m,structbuf,NODESTRUCT_STRUCT,(int)this);
	MMpush(m,1+(structbuf<<1));

// creating table node
	nodetab = MMmalloc(m,NODE_SIZE,TYPETAB);
	MMstore(m,nodetab,NODE_TYPE,NODE_TYPCELL<<1);
	MMstore(m,nodetab,NODE_FATHER,NIL);
	MMstore(m,nodetab,NODE_OBJBITMAP,NIL);
	MMstore(m,nodetab,NODE_STRUCT,MMpull(m));
	MMstore(m,nodetab,NODE_BROTHER,MMpull(m));
	MMstore(m,nodetab,NODE_SON,MMpull(m));
	MMpush(m,1+(nodetab<<1));

//	DRAWcell();
}

HTMLCELL::~HTMLCELL()
{

}

int HTMLCELL::DRAWcell()
{
	MMechostr(MSKFOO,"HTMLCELL : '%i' '%i' '%i'\n",w,h,border);
	return 0;
}

int HTMLCELL::Align()
{
	return align;
}

int HTMLCELL::Red()
{
	return red;
}

int HTMLCELL::Green()
{
	return green;
}

int HTMLCELL::Blue()
{
	return blue;
}

int HTMLCELL::Cols()
{
	return cols;
}

int HTMLCELL::Border()
{
	return border;
}

int HTMLCELL::Frame()
{
	return frame;
}

int HTMLCELL::Rules()
{
	return rules;
}

int HTMLCELL::Cellspacing()
{
	return cellspacing;
}

int HTMLCELL::Cellpadding()
{
	return cellpadding;
}

#endif

	