2 // vim: set expandtab tabstop=4 softtabstop=4 shiftwidth=4:
3 // +----------------------------------------------------------------------+
5 // +----------------------------------------------------------------------+
6 // | Copyright (c) 1997-2003 The PHP Group |
7 // +----------------------------------------------------------------------+
8 // | This source file is subject to version 2.02 of the PHP license, |
9 // | that is bundled with this package in the file LICENSE, and is |
10 // | available at through the world-wide-web at |
11 // | http://www.php.net/license/2_02.txt. |
12 // | If you did not receive a copy of the PHP license and are unable to |
13 // | obtain it through the world-wide-web, please send a note to |
14 // | license@php.net so we can mail you a copy immediately. |
15 // +----------------------------------------------------------------------+
16 // | Created: Tue Apr 29 12:35:45 2003
17 // | Author: Martin Marrese <mmarre@mecon.gov.ar>
18 // +----------------------------------------------------------------------+
27 #require_once 'PEAR.php';
31 require_once 'Menu.php';
34 // +X2C Class 100 :MenuHorizontal
36 * Clase que se encarga del manejo de los menues horizontales
40 class MenuHorizontal extends Menu {
45 * Funcion que se encarga de devolver el html de lo que hay que mostrar por pantalla
51 function toHtml() // ~X2C
53 return "<a href=\"".$this->_link."\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_displayStatusMsg('".$this->_nombre."'); MM_swapImage('".$this->_nombre."','','images/".$this->_imagen->_imgMouseOn."',1); return document.MM_returnValue\" MM_swapImage('".$this->_nombre."','','images/".$this->_imagen->_imgMouseOn."',1)><img name=\"".$this->_nombre."\" src=\"images/".$this->_imagen->_imgComun."\" border=\"0\" alt=\"".$this->_imagen->_alt."\"></a>";
59 * Constructor. Recibe el nombre del menu, el link y el nombre de la imagen.
61 * @param string $menu Array con los datos del menu
67 function MenuHorizontal($menu) // ~X2C
69 parent::Menu(null,null);
70 $this->_nombre = $menu['nombre'];
71 $this->_link = $menu['link'];
72 $this->_imagen = new ImagenAnimada($menu['imagenComun']);
76 } // -X2C Class :MenuHorizontal