Father Chrysostomos > CSS-DOM-0.06 > CSS::DOM::Value::Primitive

Download:
CSS-DOM-0.06.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  1
View Bugs
Report a bug
Module Version: 0.06   Source   Latest Release: CSS-DOM-0.08

NAME ^

CSS::DOM::Value::Primitive - CSSPrimitiveValue class for CSS::DOM

VERSION ^

Version 0.06

SYNOPSIS ^

  # ...

DESCRIPTION ^

This module implements objects that represent CSS primitive property values (as opposed to lists). It implements the DOM CSSPrimitiveValue interface and inherits from CSS::DOM::Value.

METHODS ^

Constructor

You probably don't need to call this, but here it is anyway:

  $val = new CSS::DOM::Value::Primitive TYPE, @args;

where TYPE is one of the constants listed below. The @args are interpreted differently depending on the TYPE:

  $class = "CSS::DOM::Value::Primitive";
  $val = new $class  CSS_DIMENSION, $value, $unit_text
  $val = new $class  CSS_COUNTER,   $counter_name, $separator, $style
  $val = new $class  CSS_RECT,      $top, $right, $bottom, $left

All other types just use the first of the @args, treating it as the value.

Object Methods

cssText

Returns a string representation of the attribute. Pass an argument to set it (not yet supported).

The rest have still to be implemented.

cssValueType

Returns CSS::DOM::Value::CSS_PRIMITIVE_VALUE.

CONSTANTS ^

The following constants can be imported with use CSS::DOM::Value::Primitive ':all'. They represent the type of primitive value.

CSS_UNKNOWN
CSS_NUMBER
CSS_PERCENTAGE
CSS_EMS
CSS_EXS
CSS_PX
CSS_CM
CSS_MM
CSS_IN
CSS_PT
CSS_PC
CSS_DEG
CSS_RAD
CSS_GRAD
CSS_MS
CSS_S
CSS_HZ
CSS_KHZ
CSS_DIMENSION
CSS_STRING
CSS_URI
CSS_IDENT
CSS_ATTR
CSS_COUNTER
CSS_RECT
CSS_RGBCOLOR

SEE ALSO ^

CSS::DOM

CSS::DOM::Value

CSS::DOM::Value::List (doesn't exist yet)

CSS::DOM::Style