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

tdehtml

  • tdehtml
tdehtml_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 "tdehtml_events.h"
21#include "rendering/render_object.h"
22#include "xml/dom_nodeimpl.h"
23
24using namespace tdehtml;
25
26class tdehtml::MouseEvent::MouseEventPrivate
27{
28};
29
30tdehtml::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
41tdehtml::MouseEvent::~MouseEvent()
42{
43 delete d;
44}
45
46long tdehtml::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 tdehtml::RenderObject::SelPointState state;
55 innerNode().handle()->renderer()->checkSelectionPoint( x(), y(), absX, absY, tempNode, offset, state );
56 }
57 return offset;
58}
59
60const char *tdehtml::MousePressEvent::s_strMousePressEvent = "tdehtml/Events/MousePressEvent";
61
62const char *tdehtml::MouseDoubleClickEvent::s_strMouseDoubleClickEvent = "tdehtml/Events/MouseDoubleClickEvent";
63
64const char *tdehtml::MouseMoveEvent::s_strMouseMoveEvent = "tdehtml/Events/MouseMoveEvent";
65
66const char *tdehtml::MouseReleaseEvent::s_strMouseReleaseEvent = "tdehtml/Events/MouseReleaseEvent";
67
68const char *tdehtml::DrawContentsEvent::s_strDrawContentsEvent = "tdehtml/Events/DrawContentsEvent";
69
70class tdehtml::DrawContentsEvent::DrawContentsEventPrivate
71{
72public:
73 DrawContentsEventPrivate()
74 {
75 }
76 ~DrawContentsEventPrivate()
77 {
78 }
79};
80
81tdehtml::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
88tdehtml::DrawContentsEvent::~DrawContentsEvent()
89{
90 delete d;
91}
92
DOM::DOMString
This class implements the basic string we use in the DOM.
Definition: dom_string.h:44
DOM::Node
The Node interface is the primary datatype for the entire Document Object Model.
Definition: dom_node.h:275
TDEStdAccel::name
TQString name(StdAccel id)

tdehtml

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

tdehtml

Skip menu "tdehtml"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdehtml by doxygen 1.9.4
This website is maintained by Timothy Pearson.