1<?php 2 3require_once(HTML2PS_DIR.'value.generic.php'); 4 5/** 6 * @version 1.0 7 * @created 14-���-2006 17:49:11 8 */ 9class WidthConstraint extends CSSValue { 10 var $_min_width; 11 12 function WidthConstraint() { 13 $this->_min_width = Value::fromData(0, UNIT_PT); 14 } 15 16 function apply($w, $pw) { 17 $width = $this->_apply($w, $pw); 18 $width = max($this->_min_width->getPoints(), $width); 19 return $width; 20 } 21 22 function ©() { 23 $copy =& $this->_copy(); 24 25 if ($this->_min_width == CSS_PROPERTY_INHERIT) { 26 $copy->_min_width = CSS_PROPERTY_INHERIT; 27 } else { 28 $copy->_min_width = $this->_min_width->copy(); 29 }; 30 31 return $copy; 32 } 33 34 function units2pt($base) { 35 $this->_units2pt($base); 36 $this->_min_width->units2pt($base); 37 } 38 39 function isNull() { 40 return false; 41 } 42 43 function isFraction() { 44 return false; 45 } 46 47 function isConstant() { 48 return false; 49 } 50} 51?>