Source for file CursorSC.class.php

Documentation is available at CursorSC.class.php

  1. <?php
  2.  
  3. require_once(HARMONI."GUIManager/StyleComponent.class.php");
  4.  
  5. /**
  6. * The CursorSC represents CSS "cursor" values. The allowed
  7. * values are:
  8. * <ul style="font-family: monospace;">
  9. * <li> default </li>
  10. * <li> auto </li>
  11. * <li> n-resize </li>
  12. * <li> ne-resize </li>
  13. * <li> e-resize </li>
  14. * <li> se-resize </li>
  15. * <li> s-resize </li>
  16. * <li> sw-resize </li>
  17. * <li> w-resize </li>
  18. * <li> nw-resize </li>
  19. * <li> crosshair </li>
  20. * <li> pointer </li>
  21. * <li> move </li>
  22. * <li> text </li>
  23. * <li> wait </li>
  24. * <li> help </li>
  25. * <li> hand </li>
  26. * </ul>
  27. * <br /><br />
  28. * The <code>StyleComponent</code> (SC) is the most basic of the three building pieces
  29. * of CSS styles. It combines a CSS property value with a ValidatorRule to ensure that
  30. * the value follows a certain format.<br /><br />
  31. *
  32. * @package harmoni.gui.scs
  33. *
  34. * @copyright Copyright &copy; 2005, Middlebury College
  35. * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License (GPL)
  36. *
  37. * @version $Id: CursorSC.class.php,v 1.7 2006/08/15 20:44:58 sporktim Exp $
  38. */
  39. class CursorSC extends StyleComponent {
  40.  
  41. /**
  42. * The constructor.
  43. * @param string value The value to assign to this SC.
  44. * @access public
  45. ***/
  46. function CursorSC($value) {
  47. $options = array("auto","n-resize","ne-resize","e-resize","se-resize",
  48. "s-resize","sw-resize","w-resize","nw-resize","crosshair",
  49. "pointer","move","text","wait","help","hand");
  50.  
  51. $errDescription = "Could not validate the cursor StyleComponent value \"%s\".
  52. Allowed values are: ".implode(", ", $options).".";
  53. $displayName = "Cursor";
  54. $description = "Specifies the cursor type to use when the pointing device is over
  55. the element . Allowed values are: ".implode(", ", $options).".";
  56. $rule = RegexValidatorRule::getRuleByArray($options);
  57. $this->StyleComponent($value, $rule, $options, true, $errDescription, $displayName, $description);
  58. }
  59. }
  60. ?>

Documentation generated on Wed, 19 Sep 2007 10:22:28 -0400 by phpDocumentor 1.3.0RC3