/opensource.apple.com/source/WebCore/WebCore-332/dom/MouseRelatedEvent.h
C++ Header | 103 lines | 72 code | 9 blank | 22 comment | 0 complexity | 0e5b8c9fa7f9fbd92346ab74ccd47af4 MD5 | raw file
Possible License(s): MPL-2.0-no-copyleft-exception, GPL-2.0, BSD-3-Clause, GPL-3.0, MPL-2.0, LGPL-2.0, LGPL-2.1, CC-BY-SA-3.0, IPL-1.0, ISC, AGPL-1.0, AGPL-3.0, JSON, Apache-2.0, 0BSD
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head>
- <title>MouseRelatedEvent.h</title>
- <style type="text/css">
- .enscript-comment { font-style: italic; color: rgb(178,34,34); }
- .enscript-function-name { font-weight: bold; color: rgb(0,0,255); }
- .enscript-variable-name { font-weight: bold; color: rgb(184,134,11); }
- .enscript-keyword { font-weight: bold; color: rgb(160,32,240); }
- .enscript-reference { font-weight: bold; color: rgb(95,158,160); }
- .enscript-string { font-weight: bold; color: rgb(188,143,143); }
- .enscript-builtin { font-weight: bold; color: rgb(218,112,214); }
- .enscript-type { font-weight: bold; color: rgb(34,139,34); }
- .enscript-highlight { text-decoration: underline; color: 0; }
- </style>
- </head>
- <body id="top">
- <h1 style="margin:8px;" id="f1">MouseRelatedEvent.h <span style="font-weight: normal; font-size: 0.5em;">[<a href="?txt">plain text</a>]</span></h1>
- <hr/>
- <div></div>
- <pre>
- <span class="enscript-comment">/*
- * This file is part of the DOM implementation for KDE.
- *
- * Copyright (C) 2001 Peter Kelly (<a href="mailto:pmk@post.com">pmk@post.com</a>)
- * Copyright (C) 2001 Tobias Anton (<a href="mailto:anton@stud.fbi.fh-darmstadt.de">anton@stud.fbi.fh-darmstadt.de</a>)
- * Copyright (C) 2006 Samuel Weinig (<a href="mailto:sam.weinig@gmail.com">sam.weinig@gmail.com</a>)
- * Copyright (C) 2003, 2004, 2005, 2006 Apple Computer, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public License
- * along with this library; see the file COPYING.LIB. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- *
- */</span>
- #<span class="enscript-reference">ifndef</span> <span class="enscript-variable-name">MouseRelatedEvent_h</span>
- #<span class="enscript-reference">define</span> <span class="enscript-variable-name">MouseRelatedEvent_h</span>
- #<span class="enscript-reference">include</span> <span class="enscript-string">"UIEventWithKeyState.h"</span>
- namespace WebCore {
- <span class="enscript-comment">// Internal only: Helper class for what's common between mouse and wheel events.
- </span> class MouseRelatedEvent : public UIEventWithKeyState {
- <span class="enscript-reference">public</span>:
- MouseRelatedEvent();
- MouseRelatedEvent(<span class="enscript-type">const</span> AtomicString& type, bool canBubble, bool cancelable, AbstractView* view,
- <span class="enscript-type">int</span> detail, <span class="enscript-type">int</span> screenX, <span class="enscript-type">int</span> screenY, <span class="enscript-type">int</span> pageX, <span class="enscript-type">int</span> pageY,
- bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool isSimulated = false);
- <span class="enscript-type">int</span> screenX() <span class="enscript-type">const</span> { <span class="enscript-keyword">return</span> m_screenX; }
- <span class="enscript-type">int</span> screenY() <span class="enscript-type">const</span> { <span class="enscript-keyword">return</span> m_screenY; }
- <span class="enscript-type">int</span> clientX() <span class="enscript-type">const</span> { <span class="enscript-keyword">return</span> m_clientX; }
- <span class="enscript-type">int</span> clientY() <span class="enscript-type">const</span> { <span class="enscript-keyword">return</span> m_clientY; }
- <span class="enscript-type">int</span> layerX() <span class="enscript-type">const</span> { <span class="enscript-keyword">return</span> m_layerX; }
- <span class="enscript-type">int</span> layerY() <span class="enscript-type">const</span> { <span class="enscript-keyword">return</span> m_layerY; }
- <span class="enscript-type">int</span> offsetX() <span class="enscript-type">const</span> { <span class="enscript-keyword">return</span> m_offsetX; }
- <span class="enscript-type">int</span> offsetY() <span class="enscript-type">const</span> { <span class="enscript-keyword">return</span> m_offsetY; }
- bool isSimulated() <span class="enscript-type">const</span> { <span class="enscript-keyword">return</span> m_isSimulated; }
- virtual <span class="enscript-type">int</span> pageX() <span class="enscript-type">const</span>;
- virtual <span class="enscript-type">int</span> pageY() <span class="enscript-type">const</span>;
- <span class="enscript-type">int</span> x() <span class="enscript-type">const</span>;
- <span class="enscript-type">int</span> y() <span class="enscript-type">const</span>;
-
- <span class="enscript-reference">protected</span>:
- <span class="enscript-type">void</span> initCoordinates();
- <span class="enscript-type">void</span> initCoordinates(<span class="enscript-type">int</span> clientX, <span class="enscript-type">int</span> clientY);
- virtual <span class="enscript-type">void</span> receivedTarget();
-
- <span class="enscript-comment">// Expose these so MouseEvent::initMouseEvent can set them.
- </span> <span class="enscript-type">int</span> m_screenX;
- <span class="enscript-type">int</span> m_screenY;
- <span class="enscript-type">int</span> m_clientX;
- <span class="enscript-type">int</span> m_clientY;
- <span class="enscript-reference">private</span>:
- <span class="enscript-type">int</span> m_pageX;
- <span class="enscript-type">int</span> m_pageY;
- <span class="enscript-type">int</span> m_layerX;
- <span class="enscript-type">int</span> m_layerY;
- <span class="enscript-type">int</span> m_offsetX;
- <span class="enscript-type">int</span> m_offsetY;
- bool m_isSimulated;
- };
- } <span class="enscript-comment">// namespace WebCore
- </span>
- #<span class="enscript-reference">endif</span> // <span class="enscript-variable-name">MouseRelatedEvent_h</span>
- </pre>
- <hr />
- </body></html>