// HTML_Cell.cpp: implementation of the HTML_Cell class. // ////////////////////////////////////////////////////////////////////// #include "HTML_all.h" #include "HTML_Cell.h" ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// HTML_Cell::HTML_Cell() { } HTML_Cell::~HTML_Cell() { } HTML_Row* HTML_Cell::setWidth(char* x) { width = x; return(this); } HTML_Row* HTML_Cell::setHeight(char* x) { height = x; return(this); } HTML_Row* HTML_Cell::setColspan(char* x) { colspan = x; return(this); } HTML_Row* HTML_Cell::setRowspan(char* x) { rowspan = x; return(this); } const char* HTML_Cell::getWidth() { return(width.c_str()); } const char* HTML_Cell::getHeight() { return(height.c_str()); } const char* HTML_Cell::getColspan() { return(colspan.c_str()); } const char* HTML_Cell::getRowspan() { return(rowspan.c_str()); } string& HTML_Cell::printString() { //print opening tag with options and new line buffer = "\n"); //print nested objects printStringNested(); //print closing tag and new line buffer.append("\n"); return(buffer); } HTML_Element* HTML_Cell::printOptions() { if(align.size() != 0) buffer.append(" align=\"" + align + "\""); if(valign.size() != 0) buffer.append(" valign=\"" + valign + "\""); if(bgcolor.size() != 0) buffer.append(" bgcolor=\"" + bgcolor + "\""); if(colspan.size() != 0) buffer.append(" colspan=\"" + colspan + "\""); if(rowspan.size() != 0) buffer.append(" rowspan=\"" + rowspan + "\""); if(height.size() != 0) buffer.append(" height=\"" + height + "\""); if(width.size() != 0) buffer.append(" width=\"" + width + "\""); return(this); }