.TH "DOM::CSSPrimitiveValue" kde3 "11 Jun 2005" "Version Version 3.4.1" "khtml Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
DOM::CSSPrimitiveValue \- The \fC\fBCSSPrimitiveValue\fP\fP interface represents a single \fCCSS value \fP .  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <css_value.h>\fP
.PP
Inherits \fBDOM::CSSValue\fP.
.PP
.SS "Public Types"

.in +1c
.ti -1c
.RI "enum \fBUnitTypes\fP { \fBCSS_UNKNOWN\fP =  0, \fBCSS_NUMBER\fP =  1, \fBCSS_PERCENTAGE\fP =  2, \fBCSS_EMS\fP =  3, \fBCSS_EXS\fP =  4, \fBCSS_PX\fP =  5, \fBCSS_CM\fP =  6, \fBCSS_MM\fP =  7, \fBCSS_IN\fP =  8, \fBCSS_PT\fP =  9, \fBCSS_PC\fP =  10, \fBCSS_DEG\fP =  11, \fBCSS_RAD\fP =  12, \fBCSS_GRAD\fP =  13, \fBCSS_MS\fP =  14, \fBCSS_S\fP =  15, \fBCSS_HZ\fP =  16, \fBCSS_KHZ\fP =  17, \fBCSS_DIMENSION\fP =  18, \fBCSS_STRING\fP =  19, \fBCSS_URI\fP =  20, \fBCSS_IDENT\fP =  21, \fBCSS_ATTR\fP =  22, \fBCSS_COUNTER\fP =  23, \fBCSS_RECT\fP =  24, \fBCSS_RGBCOLOR\fP =  25, \fBCSS_HTML_RELATIVE\fP =  255 }"
.br
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBCSSPrimitiveValue\fP (const \fBCSSPrimitiveValue\fP &other)"
.br
.ti -1c
.RI "\fBCSSPrimitiveValue\fP (const \fBCSSValue\fP &other)"
.br
.ti -1c
.RI "\fBCSSPrimitiveValue\fP (CSSPrimitiveValueImpl *impl)"
.br
.ti -1c
.RI "\fBCSSPrimitiveValue\fP & \fBoperator=\fP (const \fBCSSPrimitiveValue\fP &other)"
.br
.ti -1c
.RI "\fBCSSPrimitiveValue\fP & \fBoperator=\fP (const \fBCSSValue\fP &other)"
.br
.ti -1c
.RI "unsigned short \fBprimitiveType\fP () const "
.br
.ti -1c
.RI "void \fBsetFloatValue\fP (unsigned short unitType, float floatValue)"
.br
.ti -1c
.RI "float \fBgetFloatValue\fP (unsigned short unitType)"
.br
.ti -1c
.RI "void \fBsetStringValue\fP (unsigned short stringType, const \fBDOM::DOMString\fP &stringValue)"
.br
.ti -1c
.RI "\fBDOM::DOMString\fP \fBgetStringValue\fP ()"
.br
.ti -1c
.RI "\fBCounter\fP \fBgetCounterValue\fP ()"
.br
.ti -1c
.RI "\fBRect\fP \fBgetRectValue\fP ()"
.br
.ti -1c
.RI "\fBRGBColor\fP \fBgetRGBColorValue\fP ()"
.br
.in -1c
.SH "Detailed Description"
.PP 
The \fC\fBCSSPrimitiveValue\fP\fP interface represents a single \fCCSS value \fP . 

This interface may be used to determine the value of a specific style property currently set in a block or to set a specific style properties explicitly within the block. An instance of this interface can be obtained from the \fCgetPropertyCSSValue\fP method of the \fC\fBCSSStyleDeclaration\fP\fP interface. 
.PP
Definition at line 373 of file css_value.h.
.SH "Member Enumeration Documentation"
.PP 
.SS "enum \fBDOM::CSSPrimitiveValue::UnitTypes\fP"
.PP
An integer indicating which type of unit applies to the value. 
.PP
Reimplemented from \fBDOM::CSSValue\fP.
.PP
Definition at line 390 of file css_value.h.
.SH "Member Function Documentation"
.PP 
.SS "unsigned short DOM::CSSPrimitiveValue::primitiveType () const"
.PP
The type of the value as defined by the constants specified above. 
.PP
Definition at line 351 of file css_value.cpp.
.PP
Referenced by getFloatValue().
.SS "void DOM::CSSPrimitiveValue::setFloatValue (unsigned short unitType, float floatValue)"
.PP
A method to set the float value with a specified unit. 
.PP
If the property attached with this value can not accept the specified unit or the float value, the value will be unchanged and a \fC\fBDOMException\fP\fP will be raised.
.PP
\fBParameters:\fP
.RS 4
\fIunitType\fP A unit code as defined above. The unit code can only be a float unit type (e.g. \fCNUMBER\fP , \fCPERCENTAGE\fP , \fCCSS_EMS\fP , \fCCSS_EXS\fP , \fCCSS_PX\fP , \fCCSS_PX\fP , \fCCSS_CM\fP , \fCCSS_MM\fP , \fCCSS_IN\fP , \fCCSS_PT\fP , \fCCSS_PC\fP , \fCCSS_DEG\fP , \fCCSS_RAD\fP , \fCCSS_GRAD\fP , \fCCSS_MS\fP , \fCCSS_S\fP , \fCCSS_HZ\fP , \fCCSS_KHZ\fP , \fCCSS_DIMENSION\fP ).
.br
\fIfloatValue\fP The new float value.
.RE
.PP
\fBReturns:\fP
.RS 4
.RE
.PP
\fBExceptions:\fP
.RS 4
\fIDOMException\fP INVALID_ACCESS_ERR: Raises if the attached property doesn't support the float value or the unit type.
.RE
.PP
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. 
.PP
Definition at line 357 of file css_value.cpp.
.SS "float DOM::CSSPrimitiveValue::getFloatValue (unsigned short unitType)"
.PP
This method is used to get a float value in a specified unit. 
.PP
If this CSS value doesn't contain a float value or can't be converted into the specified unit, a \fC\fBDOMException\fP\fP is raised.
.PP
\fBParameters:\fP
.RS 4
\fIunitType\fP A unit code to get the float value. The unit code can only be a float unit type (e.g. \fCCSS_NUMBER\fP , \fCCSS_PERCENTAGE\fP , \fCCSS_EMS\fP , \fCCSS_EXS\fP , \fCCSS_PX\fP , \fCCSS_PX\fP , \fCCSS_CM\fP , \fCCSS_MM\fP , \fCCSS_IN\fP , \fCCSS_PT\fP , \fCCSS_PC\fP , \fCCSS_DEG\fP , \fCCSS_RAD\fP , \fCCSS_GRAD\fP , \fCCSS_MS\fP , \fCCSS_S\fP , \fCCSS_HZ\fP , \fCCSS_KHZ\fP , \fCCSS_DIMENSION\fP ).
.RE
.PP
\fBReturns:\fP
.RS 4
The float value in the specified unit.
.RE
.PP
\fBExceptions:\fP
.RS 4
\fIDOMException\fP INVALID_ACCESS_ERR: Raises if the CSS value doesn't contain a float value or if the float value can't be converted into the specified unit. 
.RE
.PP

.PP
Definition at line 368 of file css_value.cpp.
.PP
References primitiveType().
.SS "void DOM::CSSPrimitiveValue::setStringValue (unsigned short stringType, const \fBDOM::DOMString\fP & stringValue)"
.PP
A method to set the string value with a specified unit. 
.PP
If the property attached to this value can't accept the specified unit or the string value, the value will be unchanged and a \fC\fBDOMException\fP\fP will be raised.
.PP
\fBParameters:\fP
.RS 4
\fIstringType\fP A string code as defined above. The string code can only be a string unit type (e.g. \fCCSS_URI\fP , \fCCSS_IDENT\fP , \fCCSS_INHERIT\fP and \fCCSS_ATTR\fP ).
.br
\fIstringValue\fP The new string value. If the \fCstringType\fP is equal to \fCCSS_INHERIT\fP , the \fCstringValue\fP should be \fCinherit\fP .
.RE
.PP
\fBReturns:\fP
.RS 4
.RE
.PP
\fBExceptions:\fP
.RS 4
\fIDOMException\fP INVALID_ACCESS_ERR: Raises if the CSS value doesn't contain a string value or if the string value can't be converted into the specified unit.
.RE
.PP
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. 
.PP
Definition at line 377 of file css_value.cpp.
.SS "\fBDOMString\fP DOM::CSSPrimitiveValue::getStringValue ()"
.PP
This method is used to get the string value in a specified unit. 
.PP
If the CSS value doesn't contain a string value, a \fC\fBDOMException\fP\fP is raised.
.PP
\fBReturns:\fP
.RS 4
The string value in the current unit. The current \fCvalueType\fP can only be a string unit type (e.g. \fCCSS_URI\fP , \fCCSS_IDENT\fP and \fCCSS_ATTR\fP ).
.RE
.PP
\fBExceptions:\fP
.RS 4
\fIDOMException\fP INVALID_ACCESS_ERR: Raises if the CSS value doesn't contain a string value. 
.RE
.PP

.PP
Definition at line 389 of file css_value.cpp.
.SS "\fBCounter\fP DOM::CSSPrimitiveValue::getCounterValue ()"
.PP
This method is used to get the \fBCounter\fP value. 
.PP
If this CSS value doesn't contain a counter value, a \fC\fBDOMException\fP\fP is raised. Modification to the corresponding style property can be achieved using the \fC\fBCounter\fP\fP interface.
.PP
\fBReturns:\fP
.RS 4
The \fBCounter\fP value.
.RE
.PP
\fBExceptions:\fP
.RS 4
\fIDOMException\fP INVALID_ACCESS_ERR: Raises if the CSS value doesn't contain a \fBCounter\fP value. 
.RE
.PP

.PP
Definition at line 395 of file css_value.cpp.
.SS "\fBRect\fP DOM::CSSPrimitiveValue::getRectValue ()"
.PP
This method is used to get the \fBRect\fP value. 
.PP
If this CSS value doesn't contain a rect value, a \fC\fBDOMException\fP\fP is raised. Modification to the corresponding style property can be achieved using the \fC\fBRect\fP\fP interface.
.PP
\fBReturns:\fP
.RS 4
The \fBRect\fP value.
.RE
.PP
\fBExceptions:\fP
.RS 4
\fIDOMException\fP INVALID_ACCESS_ERR: Raises if the CSS value doesn't contain a \fBRect\fP value. 
.RE
.PP

.PP
Definition at line 401 of file css_value.cpp.
.SS "\fBRGBColor\fP DOM::CSSPrimitiveValue::getRGBColorValue ()"
.PP
This method is used to get the RGB color. 
.PP
If this CSS value doesn't contain a RGB color value, a \fC\fBDOMException\fP\fP is raised. Modification to the corresponding style property can be achieved using the \fC\fBRGBColor\fP\fP interface.
.PP
\fBReturns:\fP
.RS 4
the RGB color value.
.RE
.PP
\fBExceptions:\fP
.RS 4
\fIDOMException\fP INVALID_ACCESS_ERR: Raises if the attached property can't return a RGB color value. 
.RE
.PP

.PP
Definition at line 407 of file css_value.cpp.

.SH "Author"
.PP 
Generated automatically by Doxygen for khtml Library from the source code.
