PageRenderTime 56ms CodeModel.GetById 21ms RepoModel.GetById 1ms app.codeStats 0ms

/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
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  2. "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  3. <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  4. <head>
  5. <title>MouseRelatedEvent.h</title>
  6. <style type="text/css">
  7. .enscript-comment { font-style: italic; color: rgb(178,34,34); }
  8. .enscript-function-name { font-weight: bold; color: rgb(0,0,255); }
  9. .enscript-variable-name { font-weight: bold; color: rgb(184,134,11); }
  10. .enscript-keyword { font-weight: bold; color: rgb(160,32,240); }
  11. .enscript-reference { font-weight: bold; color: rgb(95,158,160); }
  12. .enscript-string { font-weight: bold; color: rgb(188,143,143); }
  13. .enscript-builtin { font-weight: bold; color: rgb(218,112,214); }
  14. .enscript-type { font-weight: bold; color: rgb(34,139,34); }
  15. .enscript-highlight { text-decoration: underline; color: 0; }
  16. </style>
  17. </head>
  18. <body id="top">
  19. <h1 style="margin:8px;" id="f1">MouseRelatedEvent.h&nbsp;&nbsp;&nbsp;<span style="font-weight: normal; font-size: 0.5em;">[<a href="?txt">plain text</a>]</span></h1>
  20. <hr/>
  21. <div></div>
  22. <pre>
  23. <span class="enscript-comment">/*
  24. * This file is part of the DOM implementation for KDE.
  25. *
  26. * Copyright (C) 2001 Peter Kelly (<a href="mailto:pmk@post.com">pmk@post.com</a>)
  27. * Copyright (C) 2001 Tobias Anton (<a href="mailto:anton@stud.fbi.fh-darmstadt.de">anton@stud.fbi.fh-darmstadt.de</a>)
  28. * Copyright (C) 2006 Samuel Weinig (<a href="mailto:sam.weinig@gmail.com">sam.weinig@gmail.com</a>)
  29. * Copyright (C) 2003, 2004, 2005, 2006 Apple Computer, Inc.
  30. *
  31. * This library is free software; you can redistribute it and/or
  32. * modify it under the terms of the GNU Library General Public
  33. * License as published by the Free Software Foundation; either
  34. * version 2 of the License, or (at your option) any later version.
  35. *
  36. * This library is distributed in the hope that it will be useful,
  37. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  38. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  39. * Library General Public License for more details.
  40. *
  41. * You should have received a copy of the GNU Library General Public License
  42. * along with this library; see the file COPYING.LIB. If not, write to
  43. * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  44. * Boston, MA 02110-1301, USA.
  45. *
  46. */</span>
  47. #<span class="enscript-reference">ifndef</span> <span class="enscript-variable-name">MouseRelatedEvent_h</span>
  48. #<span class="enscript-reference">define</span> <span class="enscript-variable-name">MouseRelatedEvent_h</span>
  49. #<span class="enscript-reference">include</span> <span class="enscript-string">&quot;UIEventWithKeyState.h&quot;</span>
  50. namespace WebCore {
  51. <span class="enscript-comment">// Internal only: Helper class for what's common between mouse and wheel events.
  52. </span> class MouseRelatedEvent : public UIEventWithKeyState {
  53. <span class="enscript-reference">public</span>:
  54. MouseRelatedEvent();
  55. MouseRelatedEvent(<span class="enscript-type">const</span> AtomicString&amp; type, bool canBubble, bool cancelable, AbstractView* view,
  56. <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,
  57. bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, bool isSimulated = false);
  58. <span class="enscript-type">int</span> screenX() <span class="enscript-type">const</span> { <span class="enscript-keyword">return</span> m_screenX; }
  59. <span class="enscript-type">int</span> screenY() <span class="enscript-type">const</span> { <span class="enscript-keyword">return</span> m_screenY; }
  60. <span class="enscript-type">int</span> clientX() <span class="enscript-type">const</span> { <span class="enscript-keyword">return</span> m_clientX; }
  61. <span class="enscript-type">int</span> clientY() <span class="enscript-type">const</span> { <span class="enscript-keyword">return</span> m_clientY; }
  62. <span class="enscript-type">int</span> layerX() <span class="enscript-type">const</span> { <span class="enscript-keyword">return</span> m_layerX; }
  63. <span class="enscript-type">int</span> layerY() <span class="enscript-type">const</span> { <span class="enscript-keyword">return</span> m_layerY; }
  64. <span class="enscript-type">int</span> offsetX() <span class="enscript-type">const</span> { <span class="enscript-keyword">return</span> m_offsetX; }
  65. <span class="enscript-type">int</span> offsetY() <span class="enscript-type">const</span> { <span class="enscript-keyword">return</span> m_offsetY; }
  66. bool isSimulated() <span class="enscript-type">const</span> { <span class="enscript-keyword">return</span> m_isSimulated; }
  67. virtual <span class="enscript-type">int</span> pageX() <span class="enscript-type">const</span>;
  68. virtual <span class="enscript-type">int</span> pageY() <span class="enscript-type">const</span>;
  69. <span class="enscript-type">int</span> x() <span class="enscript-type">const</span>;
  70. <span class="enscript-type">int</span> y() <span class="enscript-type">const</span>;
  71. <span class="enscript-reference">protected</span>:
  72. <span class="enscript-type">void</span> initCoordinates();
  73. <span class="enscript-type">void</span> initCoordinates(<span class="enscript-type">int</span> clientX, <span class="enscript-type">int</span> clientY);
  74. virtual <span class="enscript-type">void</span> receivedTarget();
  75. <span class="enscript-comment">// Expose these so MouseEvent::initMouseEvent can set them.
  76. </span> <span class="enscript-type">int</span> m_screenX;
  77. <span class="enscript-type">int</span> m_screenY;
  78. <span class="enscript-type">int</span> m_clientX;
  79. <span class="enscript-type">int</span> m_clientY;
  80. <span class="enscript-reference">private</span>:
  81. <span class="enscript-type">int</span> m_pageX;
  82. <span class="enscript-type">int</span> m_pageY;
  83. <span class="enscript-type">int</span> m_layerX;
  84. <span class="enscript-type">int</span> m_layerY;
  85. <span class="enscript-type">int</span> m_offsetX;
  86. <span class="enscript-type">int</span> m_offsetY;
  87. bool m_isSimulated;
  88. };
  89. } <span class="enscript-comment">// namespace WebCore
  90. </span>
  91. #<span class="enscript-reference">endif</span> // <span class="enscript-variable-name">MouseRelatedEvent_h</span>
  92. </pre>
  93. <hr />
  94. </body></html>