.TH "DOM::CSSPrimitiveValue" 3 "28 Jan 2004" "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
.RI "\fIAn integer indicating which type of unit applies to the value. \fP"
.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
.RI "\fIThe type of the value as defined by the constants specified above. \fP"
.ti -1c
.RI "void \fBsetFloatValue\fP (unsigned short unitType, float floatValue)"
.br
.RI "\fIA method to set the float value with a specified unit. \fP"
.ti -1c
.RI "float \fBgetFloatValue\fP (unsigned short unitType)"
.br
.RI "\fIThis method is used to get a float value in a specified unit. \fP"
.ti -1c
.RI "void \fBsetStringValue\fP (unsigned short stringType, const  \fBDOM::DOMString\fP &stringValue)"
.br
.RI "\fIA method to set the string value with a specified unit. \fP"
.ti -1c
.RI "\fBDOM::DOMString\fP \fBgetStringValue\fP ()"
.br
.RI "\fIThis method is used to get the string value in a specified unit. \fP"
.ti -1c
.RI "\fBCounter\fP \fBgetCounterValue\fP ()"
.br
.RI "\fIThis method is used to get the \fBCounter\fP value. \fP"
.ti -1c
.RI "\fBRect\fP \fBgetRectValue\fP ()"
.br
.RI "\fIThis method is used to get the \fBRect\fP value. \fP"
.ti -1c
.RI "\fBRGBColor\fP \fBgetRGBColorValue\fP ()"
.br
.RI "\fIThis method is used to get the RGB color. \fP"
.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 \fC getPropertyCSSValue \fP method of the \fC \fBCSSStyleDeclaration\fP \fP interface. 
.PP
Definition at line 371 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. Reimplemented from \fBDOM::CSSValue\fP.
.PP
Definition at line 388 of file css_value.h.
.SH "Member Function Documentation"
.PP 
.SS "unsigned short CSSPrimitiveValue::primitiveType () const"
.PP
The type of the value as defined by the constants specified above. Definition at line 352 of file css_value.cpp.
.PP
Referenced by getFloatValue().
.SS "void CSSPrimitiveValue::setFloatValue (unsigned short unitType, float floatValue)"
.PP
A method to set the float value with a specified unit. 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. \fC NUMBER \fP , \fC PERCENTAGE \fP , \fC CSS_EMS \fP , \fC CSS_EXS \fP , \fC CSS_PX \fP , \fC CSS_PX \fP , \fC CSS_CM \fP , \fC CSS_MM \fP , \fC CSS_IN \fP , \fC CSS_PT \fP , \fC CSS_PC \fP , \fC CSS_DEG \fP , \fC CSS_RAD \fP , \fC CSS_GRAD \fP , \fC CSS_MS \fP , \fC CSS_S \fP , \fC CSS_HZ \fP , \fC CSS_KHZ \fP , \fC CSS_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. Definition at line 358 of file css_value.cpp.
.SS "float CSSPrimitiveValue::getFloatValue (unsigned short unitType)"
.PP
This method is used to get a float value in a specified unit. 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. \fC CSS_NUMBER \fP , \fC CSS_PERCENTAGE \fP , \fC CSS_EMS \fP , \fC CSS_EXS \fP , \fC CSS_PX \fP , \fC CSS_PX \fP , \fC CSS_CM \fP , \fC CSS_MM \fP , \fC CSS_IN \fP , \fC CSS_PT \fP , \fC CSS_PC \fP , \fC CSS_DEG \fP , \fC CSS_RAD \fP , \fC CSS_GRAD \fP , \fC CSS_MS \fP , \fC CSS_S \fP , \fC CSS_HZ \fP , \fC CSS_KHZ \fP , \fC CSS_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
Definition at line 369 of file css_value.cpp.
.PP
References primitiveType().
.SS "void CSSPrimitiveValue::setStringValue (unsigned short stringType, const \fBDOM::DOMString\fP & stringValue)"
.PP
A method to set the string value with a specified unit. 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. \fC CSS_URI \fP , \fC CSS_IDENT \fP , \fC CSS_INHERIT \fP and \fC CSS_ATTR \fP ).
.br
\fIstringValue\fP The new string value. If the \fC stringType \fP is equal to \fC CSS_INHERIT \fP , the \fC stringValue \fP should be \fC inherit \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. Definition at line 378 of file css_value.cpp.
.SS "\fBDOMString\fP CSSPrimitiveValue::getStringValue ()"
.PP
This method is used to get the string value in a specified unit. 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 \fC valueType \fP can only be a string unit type (e.g. \fC CSS_URI \fP , \fC CSS_IDENT \fP and \fC CSS_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
Definition at line 390 of file css_value.cpp.
.SS "\fBCounter\fP CSSPrimitiveValue::getCounterValue ()"
.PP
This method is used to get the \fBCounter\fP value. 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
Definition at line 396 of file css_value.cpp.
.SS "\fBRect\fP CSSPrimitiveValue::getRectValue ()"
.PP
This method is used to get the \fBRect\fP value. 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
Definition at line 402 of file css_value.cpp.
.SS "\fBRGBColor\fP CSSPrimitiveValue::getRGBColorValue ()"
.PP
This method is used to get the RGB color. 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
Definition at line 408 of file css_value.cpp.

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