1 <?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80:
2 -------------------------------------------------------------------------------
4 -------------------------------------------------------------------------------
5 This file is part of mlib.
7 mlib is free software; you can redistribute it and/or modify it under
8 the terms of the GNU Lesser General Public License as published by the Free
9 Software Foundation; either version 2 of the License, or (at your option)
12 mlib is distributed in the hope that it will be useful, but WITHOUT
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
17 You should have received a copy of the GNU Lesser General Public License; if
18 not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
19 Boston, MA 02111-1307 USA
20 -------------------------------------------------------------------------------
21 Created: lun ago 2 11:05:12 ART 2004
22 Authors: Martín Marrese <m_marrese@argentina.com>
23 Leandro Lucarella <luca@llucax.hn.org>
24 -------------------------------------------------------------------------------
26 -----------------------------------------------------------------------------*/
28 require_once 'MLIB/Widget/Container.php';
33 * @todo Add a global example using all the methods.
34 * @author Leandro Lucarella <luca@llucax.hn.org>
35 * @author Martín Marrese <m_marrese@argentina.com>
38 class MLIB_Widget_Window extends MLIB_Widget_Container {
41 * Style selected for the window.
52 var $properties = array ();
57 * For PHP4 backward compatibility.
59 * @copydoc __construct()
62 function MLIB_Widget_Window($style)
64 $this->__construct($style);
70 * @param style Style selected for the window.
71 * @todo Add an example.
73 function __constructor($style)
75 $this->style = $style;
79 * Converts the widget to a string that is human readable.
81 * @return The Widget "converted" to a string.
82 * @todo Add an example.
86 return $tpl->parse($this->style, $this->properties);
92 * @param key Name of the property.
93 * @param value Value of the property.
95 * @todo Add an example.
97 function setProperty($key, $value)
99 //FixMe Tiene que haber una manera mejor de hacer esto.
100 $this->properties[$key][] = $value;
104 * Removes a property and returns the property value.
106 * @param key Name of the property.
110 function removeProperty($key)
112 $value = $this->properties[$key];
113 unset($this->properties[$key]);
118 * Gets a propertie value.
120 * @param key Name of the property.
124 function getProperty($key)
126 return $this->properties[$key];