1<?php 2// $Header: /cvsroot/html2ps/value.list-style.class.php,v 1.3 2007/01/09 20:10:09 Konstantin Exp $ 3 4require_once(HTML2PS_DIR.'value.generic.php'); 5 6class ListStyleValue extends CSSValue { 7 var $image; 8 var $position; 9 var $type; 10 11 function doInherit(&$state) { 12 if ($this->image === CSS_PROPERTY_INHERIT) { 13 $value = $state->getInheritedProperty(CSS_LIST_STYLE_IMAGE); 14 $this->image = $value->copy(); 15 }; 16 17 if ($this->position === CSS_PROPERTY_INHERIT) { 18 $value = $state->getInheritedProperty(CSS_LIST_STYLE_POSITION); 19 $this->position = $value; 20 }; 21 22 if ($this->type === CSS_PROPERTY_INHERIT) { 23 $value = $state->getInheritedProperty(CSS_LIST_STYLE_TYPE); 24 $this->type = $value; 25 }; 26 } 27 28 function is_default() { 29 return 30 $this->image->is_default() && 31 $this->position == CSSListStylePosition::default_value() && 32 $this->type == CSSListStyleType::default_value(); 33 } 34 35 function ©() { 36 $object =& new ListStyleValue; 37 38 if ($this->image === CSS_PROPERTY_INHERIT) { 39 $object->image = CSS_PROPERTY_INHERIT; 40 } else { 41 $object->image = $this->image->copy(); 42 }; 43 44 $object->position = $this->position; 45 $object->type = $this->type; 46 47 return $object; 48 } 49} 50 51?>