// HTML_Row.cpp: implementation of the HTML_Row class. // ////////////////////////////////////////////////////////////////////// #include "HTML_all.h" #include "HTML_Row.h" #include "HTML_Cell.h" #include "HTML_CellHeader.h" ////////////////////////////////////////////////////////////////////// // Construction/Destruction ////////////////////////////////////////////////////////////////////// HTML_Row::HTML_Row() { } HTML_Row::~HTML_Row() { } HTML_Cell* HTML_Row::newCell() { HTML_Cell* t; t = new HTML_Cell; insert(t); return(t); } HTML_CellHeader* HTML_Row::newCellHeader() { HTML_CellHeader* t; t = new HTML_CellHeader; insert(t); return(t); } HTML_Row* HTML_Row::setAlign(char * x) { align = x; return(this); } HTML_Row* HTML_Row::setValign(char * x) { valign = x; return(this); } HTML_Row* HTML_Row::setBgcolor(char * x) { bgcolor = x; return(this); } const char* HTML_Row::getAlign() { return(align.c_str()); } const char* HTML_Row::getValign() { return(valign.c_str()); } const char* HTML_Row::getBgcolor() { return(bgcolor.c_str()); } HTML_Element* HTML_Row::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 + "\""); return(this); } string& HTML_Row::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_Row* HTML_Row::setWidth(char* x) { //subclass responsibilty return(this); } HTML_Row* HTML_Row::setHeight(char* x) { //subclass responsibilty return(this); } HTML_Row* HTML_Row::setColspan(char* x) { //subclass responsibilty return(this); } HTML_Row* HTML_Row::setRowspan(char* x) { //subclass responsibilty return(this); } const char* HTML_Row::getWidth() { //subclass responsibilty return(""); } const char* HTML_Row::getHeight() { //subclass responsibilty return(""); } const char* HTML_Row::getColspan() { //subclass responsibilty return(""); } const char* HTML_Row::getRowspan() { //subclass responsibilty return(""); }