\section{DOM::CSS2Background\-Position Class Reference}
\label{classDOM_1_1CSS2BackgroundPosition}\index{DOM::CSS2BackgroundPosition@{DOM::CSS2BackgroundPosition}}
The {\tt {\bf CSS2Background\-Position}{\rm (p.\,\pageref{classDOM_1_1CSS2BackgroundPosition})}} interface represents the {\tt background-position } CSS Level 2 property.  


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

Inheritance diagram for DOM::CSS2Background\-Position:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=98pt]{classDOM_1_1CSS2BackgroundPosition__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for DOM::CSS2Background\-Position:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=98pt]{classDOM_1_1CSS2BackgroundPosition__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf CSS2Background\-Position} (const {\bf CSS2Background\-Position} \&other)\label{classDOM_1_1CSS2BackgroundPosition_a1}

\item 
{\bf CSS2Background\-Position} (CSS2Background\-Position\-Impl $\ast$impl)\label{classDOM_1_1CSS2BackgroundPosition_a2}

\item 
{\bf CSS2Background\-Position} \& {\bf operator=} (const {\bf CSS2Background\-Position} \&other)\label{classDOM_1_1CSS2BackgroundPosition_a3}

\item 
unsigned short {\bf horizontal\-Type} () const 
\item 
unsigned short {\bf vertical\-Type} () const 
\item 
{\bf DOM::DOMString} {\bf horizontal\-Identifier} () const 
\item 
{\bf DOM::DOMString} {\bf vertical\-Identifier} () const 
\item 
float {\bf get\-Horizontal\-Position} (const float horizontal\-Type)
\item 
float {\bf get\-Vertical\-Position} (const float vertical\-Type)
\item 
void {\bf set\-Horizontal\-Position} (const unsigned short horizontal\-Type, const float value)
\item 
void {\bf set\-Vertical\-Position} (const unsigned short vertical\-Type, const float value)
\item 
void {\bf set\-Position\-Identifier} (const {\bf DOM::DOMString} \&horizontal\-Identifier, const {\bf DOM::DOMString} \&vertical\-Identifier)
\end{CompactItemize}


\subsection{Detailed Description}
The {\tt {\bf CSS2Background\-Position}{\rm (p.\,\pageref{classDOM_1_1CSS2BackgroundPosition})}} interface represents the {\tt background-position } CSS Level 2 property. 



Definition at line 145 of file css\_\-extensions.h.

\subsection{Member Function Documentation}
\index{DOM::CSS2BackgroundPosition@{DOM::CSS2Background\-Position}!horizontalType@{horizontalType}}
\index{horizontalType@{horizontalType}!DOM::CSS2BackgroundPosition@{DOM::CSS2Background\-Position}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned short CSS2Background\-Position::horizontal\-Type () const}\label{classDOM_1_1CSS2BackgroundPosition_a5}


A code defining the type of the horizontal value. 

It would be one {\tt CSS\_\-PERCENTAGE} , {\tt CSS\_\-EMS} , {\tt CSS\_\-EXS} , {\tt CSS\_\-PX} , {\tt CSS\_\-CM} , {\tt CSS\_\-MM} , {\tt CSS\_\-IN} , {\tt CSS\_\-PT} , {\tt CSS\_\-PC} , {\tt CSS\_\-IDENT} , {\tt CSS\_\-INHERIT} . If one of horizontal or vertical is {\tt CSS\_\-IDENT} or {\tt CSS\_\-INHERIT} , it's guaranteed that the other is the same. 

Definition at line 112 of file css\_\-extensions.cpp.\index{DOM::CSS2BackgroundPosition@{DOM::CSS2Background\-Position}!verticalType@{verticalType}}
\index{verticalType@{verticalType}!DOM::CSS2BackgroundPosition@{DOM::CSS2Background\-Position}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned short CSS2Background\-Position::vertical\-Type () const}\label{classDOM_1_1CSS2BackgroundPosition_a6}


A code defining the type of the horizontal value. 

The code can be one of the following units : {\tt CSS\_\-PERCENTAGE} , {\tt CSS\_\-EMS} , {\tt CSS\_\-EXS} , {\tt CSS\_\-PX} , {\tt CSS\_\-CM} , {\tt CSS\_\-MM} , {\tt CSS\_\-IN} , {\tt CSS\_\-PT} , {\tt CSS\_\-PC} , {\tt CSS\_\-IDENT} , {\tt CSS\_\-INHERIT} . If one of horizontal or vertical is {\tt CSS\_\-IDENT} or {\tt CSS\_\-INHERIT} , it's guaranteed that the other is the same. 

Definition at line 118 of file css\_\-extensions.cpp.\index{DOM::CSS2BackgroundPosition@{DOM::CSS2Background\-Position}!horizontalIdentifier@{horizontalIdentifier}}
\index{horizontalIdentifier@{horizontalIdentifier}!DOM::CSS2BackgroundPosition@{DOM::CSS2Background\-Position}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf DOMString} CSS2Background\-Position::horizontal\-Identifier () const}\label{classDOM_1_1CSS2BackgroundPosition_a7}


If {\tt horizontal\-Type} is {\tt CSS\_\-IDENT} or {\tt CSS\_\-INHERIT} , this attribute contains the string representation of the ident, otherwise it contains an empty string. 



Definition at line 124 of file css\_\-extensions.cpp.

Referenced by set\-Position\-Identifier().\index{DOM::CSS2BackgroundPosition@{DOM::CSS2Background\-Position}!verticalIdentifier@{verticalIdentifier}}
\index{verticalIdentifier@{verticalIdentifier}!DOM::CSS2BackgroundPosition@{DOM::CSS2Background\-Position}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf DOMString} CSS2Background\-Position::vertical\-Identifier () const}\label{classDOM_1_1CSS2BackgroundPosition_a8}


If {\tt vertical\-Type} is {\tt CSS\_\-IDENT} or {\tt CSS\_\-INHERIT} , this attribute contains the string representation of the ident, otherwise it contains an empty string. 

The value is {\tt \char`\"{}center\char`\"{}} if only the horizontal\-Identifier has been set. The value is {\tt \char`\"{}inherit\char`\"{}} if the horizontal\-Identifier is {\tt \char`\"{}inherit\char`\"{}} . 

Definition at line 130 of file css\_\-extensions.cpp.

Referenced by set\-Position\-Identifier().\index{DOM::CSS2BackgroundPosition@{DOM::CSS2Background\-Position}!getHorizontalPosition@{getHorizontalPosition}}
\index{getHorizontalPosition@{getHorizontalPosition}!DOM::CSS2BackgroundPosition@{DOM::CSS2Background\-Position}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}float CSS2Background\-Position::get\-Horizontal\-Position (const float {\em horizontal\-Type})}\label{classDOM_1_1CSS2BackgroundPosition_a9}


This method is used to get the float value in a specified unit if the {\tt horizontal\-Position} represents a length or a percentage. 

If the float 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 horizontal\-Type}]The specified unit.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The float value.\end{Desc}
\begin{Desc}
\item[Exceptions:]
\begin{description}
\item[{\em DOMException}]INVALID\_\-ACCESS\_\-ERR: Raises if the property doesn't contain a float or the value can't be converted. \end{description}
\end{Desc}


Definition at line 136 of file css\_\-extensions.cpp.\index{DOM::CSS2BackgroundPosition@{DOM::CSS2Background\-Position}!getVerticalPosition@{getVerticalPosition}}
\index{getVerticalPosition@{getVerticalPosition}!DOM::CSS2BackgroundPosition@{DOM::CSS2Background\-Position}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}float CSS2Background\-Position::get\-Vertical\-Position (const float {\em vertical\-Type})}\label{classDOM_1_1CSS2BackgroundPosition_a10}


This method is used to get the float value in a specified unit if the {\tt vertical\-Position} represents a length or a percentage. 

If the float 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. The value is {\tt 50\%} if only the horizontal value has been specified.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em vertical\-Type}]The specified unit.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The float value.\end{Desc}
\begin{Desc}
\item[Exceptions:]
\begin{description}
\item[{\em DOMException}]INVALID\_\-ACCESS\_\-ERR: Raises if the property doesn't contain a float or the value can't be converted. \end{description}
\end{Desc}


Definition at line 142 of file css\_\-extensions.cpp.\index{DOM::CSS2BackgroundPosition@{DOM::CSS2Background\-Position}!setHorizontalPosition@{setHorizontalPosition}}
\index{setHorizontalPosition@{setHorizontalPosition}!DOM::CSS2BackgroundPosition@{DOM::CSS2Background\-Position}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void CSS2Background\-Position::set\-Horizontal\-Position (const unsigned short {\em horizontal\-Type}, const float {\em value})}\label{classDOM_1_1CSS2BackgroundPosition_a11}


This method is used to set the horizontal position with a specified unit. 

If the vertical value is not a percentage or a length, it sets the vertical position to {\tt 50\%} .

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em horizontal\-Type}]The specified unit (a length or a percentage).\item[{\em value}]The new 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 specified unit is not a length or a percentage.\end{description}
\end{Desc}
NO\_\-MODIFICATION\_\-ALLOWED\_\-ERR: Raises if this property is readonly. 

Definition at line 148 of file css\_\-extensions.cpp.\index{DOM::CSS2BackgroundPosition@{DOM::CSS2Background\-Position}!setVerticalPosition@{setVerticalPosition}}
\index{setVerticalPosition@{setVerticalPosition}!DOM::CSS2BackgroundPosition@{DOM::CSS2Background\-Position}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void CSS2Background\-Position::set\-Vertical\-Position (const unsigned short {\em vertical\-Type}, const float {\em value})}\label{classDOM_1_1CSS2BackgroundPosition_a12}


This method is used to set the vertical position with a specified unit. 

If the horizontal value is not a percentage or a length, it sets the vertical position to {\tt 50\%} .

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em vertical\-Type}]The specified unit (a length or a percentage).\item[{\em value}]The new 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 specified unit is not a length or a percentage.\end{description}
\end{Desc}
NO\_\-MODIFICATION\_\-ALLOWED\_\-ERR: Raises if this property is readonly. 

Definition at line 154 of file css\_\-extensions.cpp.\index{DOM::CSS2BackgroundPosition@{DOM::CSS2Background\-Position}!setPositionIdentifier@{setPositionIdentifier}}
\index{setPositionIdentifier@{setPositionIdentifier}!DOM::CSS2BackgroundPosition@{DOM::CSS2Background\-Position}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void CSS2Background\-Position::set\-Position\-Identifier (const {\bf DOM::DOMString} \& {\em horizontal\-Identifier}, const {\bf DOM::DOMString} \& {\em vertical\-Identifier})}\label{classDOM_1_1CSS2BackgroundPosition_a13}


Sets the identifiers. 

If the second identifier is the empty string, the vertical identifier is set to his default value ( {\tt \char`\"{}center\char`\"{}} ). If the first identfier is {\tt \char`\"{}inherit} , the second identifier is ignored and is set to {\tt \char`\"{}inherit\char`\"{}} .

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em horizontal\-Identifier}]The new horizontal identifier.\item[{\em vertical\-Identifier}]The new vertical identifier.\end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]\end{Desc}
\begin{Desc}
\item[Exceptions:]
\begin{description}
\item[{\em DOMException}]SYNTAX\_\-ERR: Raises if the identifiers have a syntax error and is unparsable.\end{description}
\end{Desc}
NO\_\-MODIFICATION\_\-ALLOWED\_\-ERR: Raises if this property is readonly. 

Definition at line 160 of file css\_\-extensions.cpp.

References horizontal\-Identifier(), and vertical\-Identifier().

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