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

class egTreeNode extends egListItem {

	var $childNodes;
	var $iconOn;
	var $container;
	var $action;
	
	function egTreeNode($id, $title, $iconOff, $iconOn, $value, $container = '', $action = '') {
		parent::egListItem($id, $title, $iconOff, $value);
		$this->iconOn = $iconOn;
		$this->container = &$container;
		$this->childNodes = array();
		$this->action = $action;
	}

	function getAction() {
	  return $this->action;
	}

	function getIconOn() {
	  return $this->iconOn;
	}

	function getIconOff() {
	  return $this->icon;
	}
	
	function getClassName() {
    return "egTreeNode";
  }

	function &getContainer() {
		return $this->container;
	}
	
	function addChild(&$node) {
	  $this->childNodes[] = &$node;
	}
	
	function &getChildNodes() {
	  return $this->childNodes;
	}
}

?>