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


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

Inheritance diagram for DOM::Event:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=152pt]{classDOM_1_1Event__inherit__graph}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{CompactItemize}
\item 
enum {\bf Phase\-Type} \{ {\bf CAPTURING\_\-PHASE} =  1, 
{\bf AT\_\-TARGET} =  2, 
{\bf BUBBLING\_\-PHASE} =  3
 \}
\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf Event} (const {\bf Event} \&other)\label{classDOM_1_1Event_a1}

\item 
{\bf Event} \& {\bf operator=} (const {\bf Event} \&other)\label{classDOM_1_1Event_a3}

\item 
{\bf DOMString} {\bf type} () const 
\item 
{\bf Node} {\bf target} () const 
\item 
{\bf Node} {\bf current\-Target} () const 
\item 
unsigned short {\bf event\-Phase} () const 
\item 
bool {\bf bubbles} () const 
\item 
bool {\bf cancelable} () const 
\item 
{\bf DOMTime\-Stamp} {\bf time\-Stamp} () const 
\item 
void {\bf stop\-Propagation} ()
\item 
void {\bf prevent\-Default} ()
\item 
void {\bf init\-Event} (const {\bf DOMString} \&event\-Type\-Arg, bool can\-Bubble\-Arg, bool cancelable\-Arg)
\item 
Event\-Impl $\ast$ {\bf handle} () const \label{classDOM_1_1Event_a14}

\item 
bool {\bf is\-Null} () const \label{classDOM_1_1Event_a15}

\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
{\bf Event} (Event\-Impl $\ast$i)\label{classDOM_1_1Event_b0}

\end{CompactItemize}
\subsection*{Protected Attributes}
\begin{CompactItemize}
\item 
Event\-Impl $\ast$ {\bf impl}\label{classDOM_1_1Event_p0}

\end{CompactItemize}
\subsection*{Friends}
\begin{CompactItemize}
\item 
class {\bf Document}\label{classDOM_1_1Event_n0}

\item 
class {\bf Node\-Impl}\label{classDOM_1_1Event_n1}

\item 
class {\bf Document\-Impl}\label{classDOM_1_1Event_n2}

\item 
class {\bf KJS::Image}\label{classDOM_1_1Event_n3}

\end{CompactItemize}


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

The {\bf Event}{\rm (p.\,\pageref{classDOM_1_1Event})} interface is used to provide contextual information about an event to the handler processing the event. An object which implements the {\bf Event}{\rm (p.\,\pageref{classDOM_1_1Event})} interface is generally passed as the first parameter to an event handler. More specific context information is passed to event handlers by deriving additional interfaces from {\bf Event}{\rm (p.\,\pageref{classDOM_1_1Event})} which contain information directly relating to the type of event they accompany. These derived interfaces are also implemented by the object passed to the event listener. 



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

\subsection{Member Enumeration Documentation}
\index{DOM::Event@{DOM::Event}!PhaseType@{PhaseType}}
\index{PhaseType@{PhaseType}!DOM::Event@{DOM::Event}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}enum {\bf DOM::Event::Phase\-Type}}\label{classDOM_1_1Event_w3}


An integer indicating which phase of event flow is being processed. 

AT\_\-TARGET: The event is currently being evaluated at the target Event\-Target.

BUBBLING\_\-PHASE: The current event phase is the bubbling phase.

CAPTURING\_\-PHASE: The current event phase is the capturing phase. 

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

\subsection{Member Function Documentation}
\index{DOM::Event@{DOM::Event}!type@{type}}
\index{type@{type}!DOM::Event@{DOM::Event}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf DOMString} Event::type () const}\label{classDOM_1_1Event_a4}


The name of the event (case-insensitive). 

The name must be an XML name. 

Definition at line 81 of file dom2\_\-events.cpp.\index{DOM::Event@{DOM::Event}!target@{target}}
\index{target@{target}!DOM::Event@{DOM::Event}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Node} Event::target () const}\label{classDOM_1_1Event_a5}


Used to indicate the Event\-Target to which the event was originally dispatched. 



Definition at line 89 of file dom2\_\-events.cpp.\index{DOM::Event@{DOM::Event}!currentTarget@{currentTarget}}
\index{currentTarget@{currentTarget}!DOM::Event@{DOM::Event}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf Node} Event::current\-Target () const}\label{classDOM_1_1Event_a6}


Used to indicate the Event\-Target whose Event\-Listeners are currently being processed. 

This is particularly useful during capturing and bubbling. 

Definition at line 97 of file dom2\_\-events.cpp.\index{DOM::Event@{DOM::Event}!eventPhase@{eventPhase}}
\index{eventPhase@{eventPhase}!DOM::Event@{DOM::Event}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}unsigned short Event::event\-Phase () const}\label{classDOM_1_1Event_a7}


Used to indicate which phase of event flow is currently being evaluated. 



Definition at line 105 of file dom2\_\-events.cpp.\index{DOM::Event@{DOM::Event}!bubbles@{bubbles}}
\index{bubbles@{bubbles}!DOM::Event@{DOM::Event}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool Event::bubbles () const}\label{classDOM_1_1Event_a8}


Used to indicate whether or not an event is a bubbling event. 

If the event can bubble the value is true, else the value is false. 

Definition at line 113 of file dom2\_\-events.cpp.\index{DOM::Event@{DOM::Event}!cancelable@{cancelable}}
\index{cancelable@{cancelable}!DOM::Event@{DOM::Event}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool Event::cancelable () const}\label{classDOM_1_1Event_a9}


Used to indicate whether or not an event can have its default action prevented. 

If the default action can be prevented the value is true, else the value is false. 

Definition at line 121 of file dom2\_\-events.cpp.\index{DOM::Event@{DOM::Event}!timeStamp@{timeStamp}}
\index{timeStamp@{timeStamp}!DOM::Event@{DOM::Event}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf DOMTime\-Stamp} Event::time\-Stamp () const}\label{classDOM_1_1Event_a10}


Used to specify the time (in milliseconds relative to the epoch) at which the event was created. 

Due to the fact that some systems may not provide this information the value of time\-Stamp may be not available for all events. When not available, a value of 0 will be returned. Examples of epoch time are the time of the system start or 0:0:0 UTC 1st January 1970. 

Definition at line 129 of file dom2\_\-events.cpp.\index{DOM::Event@{DOM::Event}!stopPropagation@{stopPropagation}}
\index{stopPropagation@{stopPropagation}!DOM::Event@{DOM::Event}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Event::stop\-Propagation ()}\label{classDOM_1_1Event_a11}


The stop\-Propagation method is used prevent further propagation of an event during event flow. 

If this method is called by any {\bf Event\-Listener}{\rm (p.\,\pageref{classDOM_1_1EventListener})} the event will cease propagating through the tree. The event will complete dispatch to all listeners on the current Event\-Target before event flow stops. This method may be used during any stage of event flow. 

Definition at line 137 of file dom2\_\-events.cpp.\index{DOM::Event@{DOM::Event}!preventDefault@{preventDefault}}
\index{preventDefault@{preventDefault}!DOM::Event@{DOM::Event}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Event::prevent\-Default ()}\label{classDOM_1_1Event_a12}


If an event is cancelable, the prevent\-Default method is used to signify that the event is to be canceled, meaning any default action normally taken by the implementation as a result of the event will not occur. 

If, during any stage of event flow, the prevent\-Default method is called the event is canceled. Any default action associated with the event will not occur. Calling this method for a non-cancelable event has no effect. Once prevent\-Default has been called it will remain in effect throughout the remainder of the event's propagation. This method may be used during any stage of event flow. 

Definition at line 145 of file dom2\_\-events.cpp.\index{DOM::Event@{DOM::Event}!initEvent@{initEvent}}
\index{initEvent@{initEvent}!DOM::Event@{DOM::Event}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void Event::init\-Event (const {\bf DOMString} \& {\em event\-Type\-Arg}, bool {\em can\-Bubble\-Arg}, bool {\em cancelable\-Arg})}\label{classDOM_1_1Event_a13}


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

This method may only be called before the {\bf Event}{\rm (p.\,\pageref{classDOM_1_1Event})} 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. If called from a subclass of {\bf Event}{\rm (p.\,\pageref{classDOM_1_1Event})} interface only the values specified in the init\-Event method are modified, all other attributes are left unchanged.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em event\-Type\-Arg}]Specifies the event type. This type may be any event type currently defined in this specification or a new event type.. The string must be an XML name.\end{description}
\end{Desc}
Any new event type must not begin with any upper, lower, or mixed case version of the string \char`\"{}DOM\char`\"{}. This prefix is reserved for future {\bf DOM}{\rm (p.\,\pageref{namespaceDOM})} event sets. It is also strongly recommended that third parties adding their own events use their own prefix to avoid confusion and lessen the probability of conflicts with other new events.

\begin{Desc}
\item[Parameters:]
\begin{description}
\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. \end{description}
\end{Desc}


Definition at line 153 of file dom2\_\-events.cpp.

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