id = $id; $this->padding = $padding; $this->spacing = $spacing; $this->debug = $debug; $this->elems = array(); } function add($elem, $width = -1, $height = -1, $style = "") { $this->elems[] = array($elem, $width, $height, $style); } function getHtml() { $html = ""; $html .= "id\" class=\"hbox\" "; if($this->debug) $html .= "border=\"1\" "; $html .= "cellspacing=\"$this->spacing\" cellpadding=\"$this->padding\" style=\"table-layout: fixed; width: 100%; height: 100%;\">\n"; $html .= "\n"; for($i = 0; $i < count($this->elems); $i++) { if($this->elems[$i][1] != -1) $width = $this->elems[$i][1]; else $width = "100%"; if($this->elems[$i][2] != -1) $height = $this->elems[$i][2]; else $height = "100%"; $html .= "\n"; } $html .= "\n"; $html .= "
elems[$i][3]."\">\n"; $html .= $this->elems[$i][0]->getHtml(); $html .= "
\n"; return $html; } } ?>