\section{DOM::Mouse\-Event Class Reference}
\label{classDOM_1_1MouseEvent}\index{DOM::MouseEvent@{DOM::MouseEvent}}
Introduced in {\bf DOM}{\rm (p.\,\pageref{namespaceDOM})} Level 2.  


{\tt \#include $<$dom2\_\-events.h$>$}

Inheritance diagram for DOM::Mouse\-Event:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=70pt]{classDOM_1_1MouseEvent__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for DOM::Mouse\-Event:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=70pt]{classDOM_1_1MouseEvent__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf Mouse\-Event} (const  {\bf Mouse\-Event} \&other)\label{classDOM_1_1MouseEvent_a1}

\item 
{\bf Mouse\-Event} (const  {\bf Event} \&other)\label{classDOM_1_1MouseEvent_a2}

\item 
{\bf Mouse\-Event} \& {\bf operator=} (const  {\bf Mouse\-Event} \&other)\label{classDOM_1_1MouseEvent_a3}

\item 
{\bf Mouse\-Event} \& {\bf operator=} (const  {\bf Event} \&other)\label{classDOM_1_1MouseEvent_a4}

\item 
long {\bf screen\-X} () const 
\begin{CompactList}\small\item\em The horizontal coordinate at which the event occurred relative to the origin of the screen coordinate system. \item\end{CompactList}\item 
long {\bf screen\-Y} () const 
\begin{CompactList}\small\item\em The vertical coordinate at which the event occurred relative to the origin of the screen coordinate system. \item\end{CompactList}\item 
long {\bf client\-X} () const 
\begin{CompactList}\small\item\em The horizontal coordinate at which the event occurred relative to the {\bf DOM}{\rm (p.\,\pageref{namespaceDOM})} implementation's client area. \item\end{CompactList}\item 
long {\bf client\-Y} () const 
\begin{CompactList}\small\item\em The vertical coordinate at which the event occurred relative to the {\bf DOM}{\rm (p.\,\pageref{namespaceDOM})} implementation's client area. \item\end{CompactList}\item 
bool {\bf ctrl\-Key} () const 
\begin{CompactList}\small\item\em Used to indicate whether the 'ctrl' key was depressed during the firing of the event. \item\end{CompactList}\item 
bool {\bf shift\-Key} () const 
\begin{CompactList}\small\item\em Used to indicate whether the 'shift' key was depressed during the firing of the event. \item\end{CompactList}\item 
bool {\bf alt\-Key} () const 
\begin{CompactList}\small\item\em Used to indicate whether the 'alt' key was depressed during the firing of the event. \item\end{CompactList}\item 
bool {\bf meta\-Key} () const 
\begin{CompactList}\small\item\em Used to indicate whether the 'meta' key was depressed during the firing of the event. \item\end{CompactList}\item 
unsigned short {\bf button} () const 
\begin{CompactList}\small\item\em During mouse events caused by the depression or release of a mouse button, button is used to indicate which mouse button changed state. \item\end{CompactList}\item 
{\bf Node} {\bf related\-Target} () const 
\begin{CompactList}\small\item\em Used to identify a secondary Event\-Target related to a UI event. \item\end{CompactList}\item 
void {\bf init\-Mouse\-Event} (const  {\bf DOMString} \&type\-Arg, bool can\-Bubble\-Arg, bool cancelable\-Arg, const  {\bf Abstract\-View} \&view\-Arg, long detail\-Arg, long screen\-XArg, long screen\-YArg, long client\-XArg, long client\-YArg, bool ctrl\-Key\-Arg, bool alt\-Key\-Arg, bool shift\-Key\-Arg, bool meta\-Key\-Arg, unsigned short button\-Arg, const  {\bf Node} \&related\-Target\-Arg)
\begin{CompactList}\small\item\em The init\-Mouse\-Event method is used to initialize the value of a {\bf Mouse\-Event}{\rm (p.\,\pageref{classDOM_1_1MouseEvent})} created through the Document\-Event interface. \item\end{CompactList}\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
{\bf Mouse\-Event} (Mouse\-Event\-Impl $\ast$impl)\label{classDOM_1_1MouseEvent_b0}

\end{CompactItemize}


\subsection{Detailed Description}
Introduced in {\bf DOM}{\rm (p.\,\pageref{namespaceDOM})} Level 2. 

The {\bf Mouse\-Event}{\rm (p.\,\pageref{classDOM_1_1MouseEvent})} interface provides specific contextual information associated with Mouse events.

The detail attribute inherited from {\bf UIEvent}{\rm (p.\,\pageref{classDOM_1_1UIEvent})} indicates the number of times a mouse button has been pressed and released over the same screen location during a user action. The attribute value is 1 when the user begins this action and increments by 1 for each full sequence of pressing and releasing. If the user moves the mouse between the mousedown and mouseup the value will be set to 0, indicating that no click is occurring.

In the case of nested elements mouse events are always targeted at the most deeply nested element. Ancestors of the targeted element may use bubbling to obtain notification of mouse events which occur within its descendent elements. 



Definition at line 383 of file dom2\_\-events.h.

\subsection{Member Function Documentation}
\index{DOM::MouseEvent@{DOM::Mouse\-Event}!screenX@{screenX}}
\index{screenX@{screenX}!DOM::MouseEvent@{DOM::Mouse\-Event}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}long DOM::Mouse\-Event::screen\-X () const}\label{classDOM_1_1MouseEvent_a6}


The horizontal coordinate at which the event occurred relative to the origin of the screen coordinate system. 

\index{DOM::MouseEvent@{DOM::Mouse\-Event}!screenY@{screenY}}
\index{screenY@{screenY}!DOM::MouseEvent@{DOM::Mouse\-Event}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}long DOM::Mouse\-Event::screen\-Y () const}\label{classDOM_1_1MouseEvent_a7}


The vertical coordinate at which the event occurred relative to the origin of the screen coordinate system. 

\index{DOM::MouseEvent@{DOM::Mouse\-Event}!clientX@{clientX}}
\index{clientX@{clientX}!DOM::MouseEvent@{DOM::Mouse\-Event}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}long DOM::Mouse\-Event::client\-X () const}\label{classDOM_1_1MouseEvent_a8}


The horizontal coordinate at which the event occurred relative to the {\bf DOM}{\rm (p.\,\pageref{namespaceDOM})} implementation's client area. 

\index{DOM::MouseEvent@{DOM::Mouse\-Event}!clientY@{clientY}}
\index{clientY@{clientY}!DOM::MouseEvent@{DOM::Mouse\-Event}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}long DOM::Mouse\-Event::client\-Y () const}\label{classDOM_1_1MouseEvent_a9}


The vertical coordinate at which the event occurred relative to the {\bf DOM}{\rm (p.\,\pageref{namespaceDOM})} implementation's client area. 

\index{DOM::MouseEvent@{DOM::Mouse\-Event}!ctrlKey@{ctrlKey}}
\index{ctrlKey@{ctrlKey}!DOM::MouseEvent@{DOM::Mouse\-Event}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool DOM::Mouse\-Event::ctrl\-Key () const}\label{classDOM_1_1MouseEvent_a10}


Used to indicate whether the 'ctrl' key was depressed during the firing of the event. 

\index{DOM::MouseEvent@{DOM::Mouse\-Event}!shiftKey@{shiftKey}}
\index{shiftKey@{shiftKey}!DOM::MouseEvent@{DOM::Mouse\-Event}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool DOM::Mouse\-Event::shift\-Key () const}\label{classDOM_1_1MouseEvent_a11}


Used to indicate whether the 'shift' key was depressed during the firing of the event. 

\index{DOM::MouseEvent@{DOM::Mouse\-Event}!altKey@{altKey}}
\index{altKey@{altKey}!DOM::MouseEvent@{DOM::Mouse\-Event}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool DOM::Mouse\-Event::alt\-Key () const}\label{classDOM_1_1MouseEvent_a12}


Used to indicate whether the 'alt' key was depressed during the firing of the event. 

On some platforms this key may map to an alternative key name. \index{DOM::MouseEvent@{DOM::Mouse\-Event}!metaKey@{metaKey}}
\index{metaKey@{metaKey}!DOM::MouseEvent@{DOM::Mouse\-Event}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool DOM::Mouse\-Event::meta\-Key () const}\label{classDOM_1_1MouseEvent_a13}


Used to indicate whether the 'meta' key was depressed during the firing of the event. 

On some platforms this key may map to an alternative key name. \index{DOM::MouseEvent@{DOM::Mouse\-Event}!button@{button}}
\index{button@{button}!DOM::MouseEvent@{DOM::Mouse\-Event}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned short DOM::Mouse\-Event::button () const}\label{classDOM_1_1MouseEvent_a14}


During mouse events caused by the depression or release of a mouse button, button is used to indicate which mouse button changed state. 

The values for button range from zero to indicate the left button of the mouse, one to indicate the middle button if present, and two to indicate the right button. For mice configured for left handed use in which the button actions are reversed the values are instead read from right to left. \index{DOM::MouseEvent@{DOM::Mouse\-Event}!relatedTarget@{relatedTarget}}
\index{relatedTarget@{relatedTarget}!DOM::MouseEvent@{DOM::Mouse\-Event}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Node} DOM::Mouse\-Event::related\-Target () const}\label{classDOM_1_1MouseEvent_a15}


Used to identify a secondary Event\-Target related to a UI event. 

Currently this attribute is used with the mouseover event to indicate the Event\-Target which the pointing device exited and with the mouseout event to indicate the Event\-Target which the pointing device entered. \index{DOM::MouseEvent@{DOM::Mouse\-Event}!initMouseEvent@{initMouseEvent}}
\index{initMouseEvent@{initMouseEvent}!DOM::MouseEvent@{DOM::Mouse\-Event}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void DOM::Mouse\-Event::init\-Mouse\-Event (const {\bf DOMString} \& {\em type\-Arg}, bool {\em can\-Bubble\-Arg}, bool {\em cancelable\-Arg}, const {\bf Abstract\-View} \& {\em view\-Arg}, long {\em detail\-Arg}, long {\em screen\-XArg}, long {\em screen\-YArg}, long {\em client\-XArg}, long {\em client\-YArg}, bool {\em ctrl\-Key\-Arg}, bool {\em alt\-Key\-Arg}, bool {\em shift\-Key\-Arg}, bool {\em meta\-Key\-Arg}, unsigned short {\em button\-Arg}, const {\bf Node} \& {\em related\-Target\-Arg})}\label{classDOM_1_1MouseEvent_a16}


The init\-Mouse\-Event method is used to initialize the value of a {\bf Mouse\-Event}{\rm (p.\,\pageref{classDOM_1_1MouseEvent})} created through the Document\-Event interface. 

This method may only be called before the {\bf Mouse\-Event}{\rm (p.\,\pageref{classDOM_1_1MouseEvent})} has been dispatched via the dispatch\-Event method, though it may be called multiple times during that phase if necessary. If called multiple times, the final invocation takes precedence. Parameters

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em type\-Arg}]Specifies the event type.\item[{\em can\-Bubble\-Arg}]Specifies whether or not the event can bubble.\item[{\em cancelable\-Arg}]Specifies whether or not the event's default action can be prevented.\item[{\em view\-Arg}]Specifies the Event's {\bf Abstract\-View}{\rm (p.\,\pageref{classDOM_1_1AbstractView})}.\item[{\em detail\-Arg}]Specifies the Event's mouse click count.\item[{\em screen\-XArg}]Specifies the Event's screen x coordinate\item[{\em screen\-YArg}]Specifies the Event's screen y coordinate\item[{\em client\-XArg}]Specifies the Event's client x coordinate\item[{\em client\-YArg}]Specifies the Event's client y coordinate\item[{\em ctrl\-Key\-Arg}]Specifies whether or not control key was depressed during the {\bf Event}{\rm (p.\,\pageref{classDOM_1_1Event})}.\item[{\em alt\-Key\-Arg}]Specifies whether or not alt key was depressed during the {\bf Event}{\rm (p.\,\pageref{classDOM_1_1Event})}.\item[{\em shift\-Key\-Arg}]Specifies whether or not shift key was depressed during the {\bf Event}{\rm (p.\,\pageref{classDOM_1_1Event})}.\item[{\em meta\-Key\-Arg}]Specifies whether or not meta key was depressed during the {\bf Event}{\rm (p.\,\pageref{classDOM_1_1Event})}.\item[{\em button\-Arg}]Specifies the Event's mouse button.\item[{\em related\-Target\-Arg}]Specifies the Event's related Event\-Target. \end{description}
\end{Desc}


The documentation for this class was generated from the following file:\begin{CompactItemize}
\item 
dom2\_\-events.h\end{CompactItemize}
