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