\section{DOM::CSSPrimitive\-Value Class Reference}
\label{classDOM_1_1CSSPrimitiveValue}\index{DOM::CSSPrimitiveValue@{DOM::CSSPrimitiveValue}}
The {\tt  {\bf CSSPrimitive\-Value}{\rm (p.\,\pageref{classDOM_1_1CSSPrimitiveValue})} } interface represents a single {\tt CSS value } .  


{\tt \#include $<$css\_\-value.h$>$}

Inheritance diagram for DOM::CSSPrimitive\-Value:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=86pt]{classDOM_1_1CSSPrimitiveValue__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for DOM::CSSPrimitive\-Value:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=86pt]{classDOM_1_1CSSPrimitiveValue__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{CompactItemize}
\item 
enum {\bf Unit\-Types} \{ \par
{\bf CSS\_\-UNKNOWN} =  0, 
{\bf CSS\_\-NUMBER} =  1, 
{\bf CSS\_\-PERCENTAGE} =  2, 
{\bf CSS\_\-EMS} =  3, 
\par
{\bf CSS\_\-EXS} =  4, 
{\bf CSS\_\-PX} =  5, 
{\bf CSS\_\-CM} =  6, 
{\bf CSS\_\-MM} =  7, 
\par
{\bf CSS\_\-IN} =  8, 
{\bf CSS\_\-PT} =  9, 
{\bf CSS\_\-PC} =  10, 
{\bf CSS\_\-DEG} =  11, 
\par
{\bf CSS\_\-RAD} =  12, 
{\bf CSS\_\-GRAD} =  13, 
{\bf CSS\_\-MS} =  14, 
{\bf CSS\_\-S} =  15, 
\par
{\bf CSS\_\-HZ} =  16, 
{\bf CSS\_\-KHZ} =  17, 
{\bf CSS\_\-DIMENSION} =  18, 
{\bf CSS\_\-STRING} =  19, 
\par
{\bf CSS\_\-URI} =  20, 
{\bf CSS\_\-IDENT} =  21, 
{\bf CSS\_\-ATTR} =  22, 
{\bf CSS\_\-COUNTER} =  23, 
\par
{\bf CSS\_\-RECT} =  24, 
{\bf CSS\_\-RGBCOLOR} =  25, 
{\bf CSS\_\-HTML\_\-RELATIVE} =  255
 \}
\begin{CompactList}\small\item\em An integer indicating which type of unit applies to the value. \item\end{CompactList}\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf CSSPrimitive\-Value} (const  {\bf CSSPrimitive\-Value} \&other)\label{classDOM_1_1CSSPrimitiveValue_a1}

\item 
{\bf CSSPrimitive\-Value} (const  {\bf CSSValue} \&other)\label{classDOM_1_1CSSPrimitiveValue_a2}

\item 
{\bf CSSPrimitive\-Value} (CSSPrimitive\-Value\-Impl $\ast$impl)\label{classDOM_1_1CSSPrimitiveValue_a3}

\item 
{\bf CSSPrimitive\-Value} \& {\bf operator=} (const  {\bf CSSPrimitive\-Value} \&other)\label{classDOM_1_1CSSPrimitiveValue_a4}

\item 
{\bf CSSPrimitive\-Value} \& {\bf operator=} (const  {\bf CSSValue} \&other)\label{classDOM_1_1CSSPrimitiveValue_a5}

\item 
unsigned short {\bf primitive\-Type} () const 
\begin{CompactList}\small\item\em The type of the value as defined by the constants specified above. \item\end{CompactList}\item 
void {\bf set\-Float\-Value} (unsigned short unit\-Type, float float\-Value)
\begin{CompactList}\small\item\em A method to set the float value with a specified unit. \item\end{CompactList}\item 
float {\bf get\-Float\-Value} (unsigned short unit\-Type)
\begin{CompactList}\small\item\em This method is used to get a float value in a specified unit. \item\end{CompactList}\item 
void {\bf set\-String\-Value} (unsigned short string\-Type, const  {\bf DOM::DOMString} \&string\-Value)
\begin{CompactList}\small\item\em A method to set the string value with a specified unit. \item\end{CompactList}\item 
{\bf DOM::DOMString} {\bf get\-String\-Value} ()
\begin{CompactList}\small\item\em This method is used to get the string value in a specified unit. \item\end{CompactList}\item 
{\bf Counter} {\bf get\-Counter\-Value} ()
\begin{CompactList}\small\item\em This method is used to get the {\bf Counter}{\rm (p.\,\pageref{classDOM_1_1Counter})} value. \item\end{CompactList}\item 
{\bf Rect} {\bf get\-Rect\-Value} ()
\begin{CompactList}\small\item\em This method is used to get the {\bf Rect}{\rm (p.\,\pageref{classDOM_1_1Rect})} value. \item\end{CompactList}\item 
{\bf RGBColor} {\bf get\-RGBColor\-Value} ()
\begin{CompactList}\small\item\em This method is used to get the RGB color. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
The {\tt  {\bf CSSPrimitive\-Value}{\rm (p.\,\pageref{classDOM_1_1CSSPrimitiveValue})} } interface represents a single {\tt CSS value } . 

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 {\tt  get\-Property\-CSSValue } method of the {\tt  {\bf CSSStyle\-Declaration}{\rm (p.\,\pageref{classDOM_1_1CSSStyleDeclaration})} } interface. 



Definition at line 371 of file css\_\-value.h.

\subsection{Member Enumeration Documentation}
\index{DOM::CSSPrimitiveValue@{DOM::CSSPrimitive\-Value}!UnitTypes@{UnitTypes}}
\index{UnitTypes@{UnitTypes}!DOM::CSSPrimitiveValue@{DOM::CSSPrimitive\-Value}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}enum {\bf DOM::CSSPrimitive\-Value::Unit\-Types}}\label{classDOM_1_1CSSPrimitiveValue_w27}


An integer indicating which type of unit applies to the value. 



Reimplemented from {\bf DOM::CSSValue} {\rm (p.\,\pageref{classDOM_1_1CSSValue_w4})}.

Definition at line 388 of file css\_\-value.h.

\subsection{Member Function Documentation}
\index{DOM::CSSPrimitiveValue@{DOM::CSSPrimitive\-Value}!primitiveType@{primitiveType}}
\index{primitiveType@{primitiveType}!DOM::CSSPrimitiveValue@{DOM::CSSPrimitive\-Value}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned short CSSPrimitive\-Value::primitive\-Type () const}\label{classDOM_1_1CSSPrimitiveValue_a7}


The type of the value as defined by the constants specified above. 



Definition at line 352 of file css\_\-value.cpp.

Referenced by get\-Float\-Value().\index{DOM::CSSPrimitiveValue@{DOM::CSSPrimitive\-Value}!setFloatValue@{setFloatValue}}
\index{setFloatValue@{setFloatValue}!DOM::CSSPrimitiveValue@{DOM::CSSPrimitive\-Value}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void CSSPrimitive\-Value::set\-Float\-Value (unsigned short {\em unit\-Type}, float {\em float\-Value})}\label{classDOM_1_1CSSPrimitiveValue_a8}


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 {\tt  {\bf DOMException}{\rm (p.\,\pageref{classDOM_1_1DOMException})} } will be raised.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em unit\-Type}]A unit code as defined above. The unit code can only be a float unit type (e.g. {\tt  NUMBER } , {\tt  PERCENTAGE } , {\tt  CSS\_\-EMS } , {\tt  CSS\_\-EXS } , {\tt  CSS\_\-PX } , {\tt  CSS\_\-PX } , {\tt  CSS\_\-CM } , {\tt  CSS\_\-MM } , {\tt  CSS\_\-IN } , {\tt  CSS\_\-PT } , {\tt  CSS\_\-PC } , {\tt  CSS\_\-DEG } , {\tt  CSS\_\-RAD } , {\tt  CSS\_\-GRAD } , {\tt  CSS\_\-MS } , {\tt  CSS\_\-S } , {\tt  CSS\_\-HZ } , {\tt  CSS\_\-KHZ } , {\tt  CSS\_\-DIMENSION } ).\item[{\em float\-Value}]The new float value.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]\end{Desc}
\begin{Desc}
\item[Exceptions:]
\begin{description}
\item[{\em DOMException}]INVALID\_\-ACCESS\_\-ERR: Raises if the attached property doesn't support the float value or the unit type.\end{description}
\end{Desc}
NO\_\-MODIFICATION\_\-ALLOWED\_\-ERR: Raised if this property is readonly. 

Definition at line 358 of file css\_\-value.cpp.\index{DOM::CSSPrimitiveValue@{DOM::CSSPrimitive\-Value}!getFloatValue@{getFloatValue}}
\index{getFloatValue@{getFloatValue}!DOM::CSSPrimitiveValue@{DOM::CSSPrimitive\-Value}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}float CSSPrimitive\-Value::get\-Float\-Value (unsigned short {\em unit\-Type})}\label{classDOM_1_1CSSPrimitiveValue_a9}


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 {\tt  {\bf DOMException}{\rm (p.\,\pageref{classDOM_1_1DOMException})} } is raised.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em unit\-Type}]A unit code to get the float value. The unit code can only be a float unit type (e.g. {\tt  CSS\_\-NUMBER } , {\tt  CSS\_\-PERCENTAGE } , {\tt  CSS\_\-EMS } , {\tt  CSS\_\-EXS } , {\tt  CSS\_\-PX } , {\tt  CSS\_\-PX } , {\tt  CSS\_\-CM } , {\tt  CSS\_\-MM } , {\tt  CSS\_\-IN } , {\tt  CSS\_\-PT } , {\tt  CSS\_\-PC } , {\tt  CSS\_\-DEG } , {\tt  CSS\_\-RAD } , {\tt  CSS\_\-GRAD } , {\tt  CSS\_\-MS } , {\tt  CSS\_\-S } , {\tt  CSS\_\-HZ } , {\tt  CSS\_\-KHZ } , {\tt  CSS\_\-DIMENSION } ).\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The float value in the specified unit.\end{Desc}
\begin{Desc}
\item[Exceptions:]
\begin{description}
\item[{\em DOMException}]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. \end{description}
\end{Desc}


Definition at line 369 of file css\_\-value.cpp.

References primitive\-Type().\index{DOM::CSSPrimitiveValue@{DOM::CSSPrimitive\-Value}!setStringValue@{setStringValue}}
\index{setStringValue@{setStringValue}!DOM::CSSPrimitiveValue@{DOM::CSSPrimitive\-Value}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void CSSPrimitive\-Value::set\-String\-Value (unsigned short {\em string\-Type}, const {\bf DOM::DOMString} \& {\em string\-Value})}\label{classDOM_1_1CSSPrimitiveValue_a10}


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 {\tt  {\bf DOMException}{\rm (p.\,\pageref{classDOM_1_1DOMException})} } will be raised.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em string\-Type}]A string code as defined above. The string code can only be a string unit type (e.g. {\tt  CSS\_\-URI } , {\tt  CSS\_\-IDENT } , {\tt  CSS\_\-INHERIT } and {\tt  CSS\_\-ATTR } ).\item[{\em string\-Value}]The new string value. If the {\tt  string\-Type } is equal to {\tt  CSS\_\-INHERIT } , the {\tt  string\-Value } should be {\tt  inherit } .\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]\end{Desc}
\begin{Desc}
\item[Exceptions:]
\begin{description}
\item[{\em DOMException}]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.\end{description}
\end{Desc}
NO\_\-MODIFICATION\_\-ALLOWED\_\-ERR: Raised if this property is readonly. 

Definition at line 378 of file css\_\-value.cpp.\index{DOM::CSSPrimitiveValue@{DOM::CSSPrimitive\-Value}!getStringValue@{getStringValue}}
\index{getStringValue@{getStringValue}!DOM::CSSPrimitiveValue@{DOM::CSSPrimitive\-Value}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf DOMString} CSSPrimitive\-Value::get\-String\-Value ()}\label{classDOM_1_1CSSPrimitiveValue_a11}


This method is used to get the string value in a specified unit. 

If the CSS value doesn't contain a string value, a {\tt  {\bf DOMException}{\rm (p.\,\pageref{classDOM_1_1DOMException})} } is raised.

\begin{Desc}
\item[Returns:]The string value in the current unit. The current {\tt  value\-Type } can only be a string unit type (e.g. {\tt  CSS\_\-URI } , {\tt  CSS\_\-IDENT } and {\tt  CSS\_\-ATTR } ).\end{Desc}
\begin{Desc}
\item[Exceptions:]
\begin{description}
\item[{\em DOMException}]INVALID\_\-ACCESS\_\-ERR: Raises if the CSS value doesn't contain a string value. \end{description}
\end{Desc}


Definition at line 390 of file css\_\-value.cpp.\index{DOM::CSSPrimitiveValue@{DOM::CSSPrimitive\-Value}!getCounterValue@{getCounterValue}}
\index{getCounterValue@{getCounterValue}!DOM::CSSPrimitiveValue@{DOM::CSSPrimitive\-Value}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Counter} CSSPrimitive\-Value::get\-Counter\-Value ()}\label{classDOM_1_1CSSPrimitiveValue_a12}


This method is used to get the {\bf Counter}{\rm (p.\,\pageref{classDOM_1_1Counter})} value. 

If this CSS value doesn't contain a counter value, a {\tt  {\bf DOMException}{\rm (p.\,\pageref{classDOM_1_1DOMException})} } is raised. Modification to the corresponding style property can be achieved using the {\tt  {\bf Counter}{\rm (p.\,\pageref{classDOM_1_1Counter})} } interface.

\begin{Desc}
\item[Returns:]The {\bf Counter}{\rm (p.\,\pageref{classDOM_1_1Counter})} value.\end{Desc}
\begin{Desc}
\item[Exceptions:]
\begin{description}
\item[{\em DOMException}]INVALID\_\-ACCESS\_\-ERR: Raises if the CSS value doesn't contain a {\bf Counter}{\rm (p.\,\pageref{classDOM_1_1Counter})} value. \end{description}
\end{Desc}


Definition at line 396 of file css\_\-value.cpp.\index{DOM::CSSPrimitiveValue@{DOM::CSSPrimitive\-Value}!getRectValue@{getRectValue}}
\index{getRectValue@{getRectValue}!DOM::CSSPrimitiveValue@{DOM::CSSPrimitive\-Value}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Rect} CSSPrimitive\-Value::get\-Rect\-Value ()}\label{classDOM_1_1CSSPrimitiveValue_a13}


This method is used to get the {\bf Rect}{\rm (p.\,\pageref{classDOM_1_1Rect})} value. 

If this CSS value doesn't contain a rect value, a {\tt  {\bf DOMException}{\rm (p.\,\pageref{classDOM_1_1DOMException})} } is raised. Modification to the corresponding style property can be achieved using the {\tt  {\bf Rect}{\rm (p.\,\pageref{classDOM_1_1Rect})} } interface.

\begin{Desc}
\item[Returns:]The {\bf Rect}{\rm (p.\,\pageref{classDOM_1_1Rect})} value.\end{Desc}
\begin{Desc}
\item[Exceptions:]
\begin{description}
\item[{\em DOMException}]INVALID\_\-ACCESS\_\-ERR: Raises if the CSS value doesn't contain a {\bf Rect}{\rm (p.\,\pageref{classDOM_1_1Rect})} value. \end{description}
\end{Desc}


Definition at line 402 of file css\_\-value.cpp.\index{DOM::CSSPrimitiveValue@{DOM::CSSPrimitive\-Value}!getRGBColorValue@{getRGBColorValue}}
\index{getRGBColorValue@{getRGBColorValue}!DOM::CSSPrimitiveValue@{DOM::CSSPrimitive\-Value}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf RGBColor} CSSPrimitive\-Value::get\-RGBColor\-Value ()}\label{classDOM_1_1CSSPrimitiveValue_a14}


This method is used to get the RGB color. 

If this CSS value doesn't contain a RGB color value, a {\tt  {\bf DOMException}{\rm (p.\,\pageref{classDOM_1_1DOMException})} } is raised. Modification to the corresponding style property can be achieved using the {\tt  {\bf RGBColor}{\rm (p.\,\pageref{classDOM_1_1RGBColor})} } interface.

\begin{Desc}
\item[Returns:]the RGB color value.\end{Desc}
\begin{Desc}
\item[Exceptions:]
\begin{description}
\item[{\em DOMException}]INVALID\_\-ACCESS\_\-ERR: Raises if the attached property can't return a RGB color value. \end{description}
\end{Desc}


Definition at line 408 of file css\_\-value.cpp.

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
css\_\-value.h\item 
css\_\-value.cpp\end{CompactItemize}
