• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • khtml
 

khtml

  • khtml
khtml_events.cpp
1 /* This file is part of the KDE project
2  Copyright (C) 2000 Simon Hausmann <hausmann@kde.org>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Library General Public
6  License as published by the Free Software Foundation; either
7  version 2 of the License, or (at your option) any later version.
8 
9  This library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Library General Public License for more details.
13 
14  You should have received a copy of the GNU Library General Public License
15  along with this library; see the file COPYING.LIB. If not, write to
16  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  Boston, MA 02110-1301, USA.
18 */
19 
20 #include "khtml_events.h"
21 #include "rendering/render_object.h"
22 #include "xml/dom_nodeimpl.h"
23 
24 using namespace khtml;
25 
26 class khtml::MouseEvent::MouseEventPrivate
27 {
28 };
29 
30 khtml::MouseEvent::MouseEvent( const char *name, TQMouseEvent *qmouseEvent, int x, int y,
31  const DOM::DOMString &url, const DOM::DOMString& target,
32  const DOM::Node &innerNode )
33 : KParts::Event( name ), m_qmouseEvent( qmouseEvent ), m_x( x ), m_y( y ),
34  m_url( url ), m_target(target), m_innerNode( innerNode )
35 {
36  d = 0;
37  if (innerNode.handle() && innerNode.handle()->renderer())
38  innerNode.handle()->renderer()->absolutePosition(m_nodeAbsX, m_nodeAbsY);
39 }
40 
41 khtml::MouseEvent::~MouseEvent()
42 {
43  delete d;
44 }
45 
46 long khtml::MouseEvent::offset() const
47 {
48  int offset = 0;
49  DOM::NodeImpl* tempNode = 0;
50  int absX, absY;
51  absX = absY = 0;
52  if (innerNode().handle()->renderer()) {
53  innerNode().handle()->renderer()->absolutePosition(absX, absY);
54  khtml::RenderObject::SelPointState state;
55  innerNode().handle()->renderer()->checkSelectionPoint( x(), y(), absX, absY, tempNode, offset, state );
56  }
57  return offset;
58 }
59 
60 const char *khtml::MousePressEvent::s_strMousePressEvent = "khtml/Events/MousePressEvent";
61 
62 const char *khtml::MouseDoubleClickEvent::s_strMouseDoubleClickEvent = "khtml/Events/MouseDoubleClickEvent";
63 
64 const char *khtml::MouseMoveEvent::s_strMouseMoveEvent = "khtml/Events/MouseMoveEvent";
65 
66 const char *khtml::MouseReleaseEvent::s_strMouseReleaseEvent = "khtml/Events/MouseReleaseEvent";
67 
68 const char *khtml::DrawContentsEvent::s_strDrawContentsEvent = "khtml/Events/DrawContentsEvent";
69 
70 class khtml::DrawContentsEvent::DrawContentsEventPrivate
71 {
72 public:
73  DrawContentsEventPrivate()
74  {
75  }
76  ~DrawContentsEventPrivate()
77  {
78  }
79 };
80 
81 khtml::DrawContentsEvent::DrawContentsEvent( TQPainter *painter, int clipx, int clipy, int clipw, int cliph )
82  : KParts::Event( s_strDrawContentsEvent ), m_painter( painter ), m_clipx( clipx ), m_clipy( clipy ),
83  m_clipw( clipw ), m_cliph( cliph )
84 {
85  d = new DrawContentsEventPrivate;
86 }
87 
88 khtml::DrawContentsEvent::~DrawContentsEvent()
89 {
90  delete d;
91 }
92 
DOM::Node
The Node interface is the primary datatype for the entire Document Object Model.
Definition: dom_node.h:274
khtml
Definition: khtml_caret.cpp:26
DOM::DOMString
This class implements the basic string we use in the DOM.
Definition: dom_string.h:43
KParts

khtml

Skip menu "khtml"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

khtml

Skip menu "khtml"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for khtml by doxygen 1.8.13
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |