<?php
defined('ROOT_DIR') or die(__FILE__.' requires egConfig.inc.php');

include_once(ROOT_DIR.'egWindow.class.php');

class egFile extends egWindow {

	var $name;


	function egFile($id, $value, $posX=0, $posY=0, $width=0, $height=18, $name="") {
		if($height == null) {
			$height = 18;
		}
		$this->name = $name;
		parent::egWindow($id, $value, $posX, $posY, $width, $height);
	}

	function getClassName() {
		return "egFile";
	}

	function getHTML($container = null) {
		$html = "var file_{$this->id} = new egFile('{$this->id}', '{$this->title}', '{$this->posX}', '{$this->posY}', '{$this->width}', '{$this->height}', '{$container}', '{$this->name}');";
		$html .= "egObjectsArray['file_{$this->id}'] = file_{$this->id};";

		return $html;
	}

	/**
   *
   * @static
	 */
	function getScriptsFiles() {
		$scriptsArray = array();
		$scriptsArray[ALL] = "egFile_default.js";
		return $scriptsArray;
	}

	/**
   *
   * @static
   */
	function getStylesFiles() {
    $stylesArray = array();
    $stylesArray[ALL] = "egFile_default.css";
    return $stylesArray;
  }
}
?>