<?php
require_once "Text.php";

class OptionText extends Text {

	private $text = "";
	private $state = null;
	
	const StateGray = "GRAY";
	const StateNormal = "NORMAL";
	
	public function __construct($text = null, $state = OptionText::StateNormal) {
			
		if ($text != null) {
			$this->text = $text;
		}
		
		$attributes = array();
		$attributes["State"] = $state;
		
		parent::__construct($attributes);
	}
	
	public function renderXMLBeforeChildsHook(xmlWriter &$xw) {
		$xw->text($this->text);
	}	

	protected function name() {
		return "OptionText";
	}
	
}