Leandro Lucarella ------------------------------------------------------------------------------- $Id$ -----------------------------------------------------------------------------*/ require_once 'MLIB/Widget/Container.php'; /** * Window base class. * * @todo Add a global example using all the methods. * @author Leandro Lucarella * @author Martín Marrese * @since 1.0 */ class MLIB_Widget_Window extends MLIB_Widget_Container { /** * Style selected for the window. * * @protected */ var $style = null; /** * Property List. * * @protected */ var $properties = array (); /** * Constructor. * For PHP4 backward compatibility. * * @copydoc __construct() * @see __construct() */ function MLIB_Widget_Window($style) { $this->__construct($style); } /** * Constructor. * * @param style Style selected for the window. * @todo Add an example. */ function __constructor($style) { $this->style = $style; } /** * Converts the widget to a string that is human readable. * * @return The Widget "converted" to a string. * @todo Add an example. */ function __toString() { return $tpl->parse($this->style, $this->properties); } /** * Sets a property. * * @param key Name of the property. * @param value Value of the property. * * @todo Add an example. */ function setProperty($key, $value) { //FixMe Tiene que haber una manera mejor de hacer esto. $this->properties[$key][] = $value; } /** * Removes a property and returns the property value. * * @param key Name of the property. * * @return PropValue. */ function removeProperty($key) { $value = $this->properties[$key]; unset($this->properties[$key]); return $value; } /** * Gets a propertie value. * * @param key Name of the property. * * @return PropValue. */ function getProperty($key) { return $this->properties[$key]; } } ?>