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

tdehtml

tdehtml_events.cpp
00001 /* This file is part of the KDE project
00002    Copyright (C) 2000 Simon Hausmann <hausmann@kde.org>
00003 
00004    This library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Library General Public
00006    License as published by the Free Software Foundation; either
00007    version 2 of the License, or (at your option) any later version.
00008 
00009    This library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Library General Public License for more details.
00013 
00014    You should have received a copy of the GNU Library General Public License
00015    along with this library; see the file COPYING.LIB.  If not, write to
00016    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017    Boston, MA 02110-1301, USA.
00018 */
00019 
00020 #include "tdehtml_events.h"
00021 #include "rendering/render_object.h"
00022 #include "xml/dom_nodeimpl.h"
00023 
00024 using namespace tdehtml;
00025 
00026 class tdehtml::MouseEvent::MouseEventPrivate
00027 {
00028 };
00029 
00030 tdehtml::MouseEvent::MouseEvent( const char *name, TQMouseEvent *qmouseEvent, int x, int y,
00031                                const DOM::DOMString &url, const DOM::DOMString& target,
00032                     const DOM::Node &innerNode )
00033 : KParts::Event( name ), m_qmouseEvent( qmouseEvent ), m_x( x ), m_y( y ),
00034   m_url( url ), m_target(target), m_innerNode( innerNode )
00035 {
00036   d = 0;
00037   if (innerNode.handle() && innerNode.handle()->renderer())
00038       innerNode.handle()->renderer()->absolutePosition(m_nodeAbsX, m_nodeAbsY);
00039 }
00040 
00041 tdehtml::MouseEvent::~MouseEvent()
00042 {
00043   delete d;
00044 }
00045 
00046 long tdehtml::MouseEvent::offset() const
00047 {
00048     int offset = 0;
00049     DOM::NodeImpl* tempNode = 0;
00050     int absX, absY;
00051     absX = absY = 0;
00052     if (innerNode().handle()->renderer()) {
00053         innerNode().handle()->renderer()->absolutePosition(absX, absY);
00054         tdehtml::RenderObject::SelPointState state;
00055         innerNode().handle()->renderer()->checkSelectionPoint( x(), y(), absX, absY, tempNode, offset, state );
00056     }
00057     return offset;
00058 }
00059 
00060 const char *tdehtml::MousePressEvent::s_strMousePressEvent = "tdehtml/Events/MousePressEvent";
00061 
00062 const char *tdehtml::MouseDoubleClickEvent::s_strMouseDoubleClickEvent = "tdehtml/Events/MouseDoubleClickEvent";
00063 
00064 const char *tdehtml::MouseMoveEvent::s_strMouseMoveEvent = "tdehtml/Events/MouseMoveEvent";
00065 
00066 const char *tdehtml::MouseReleaseEvent::s_strMouseReleaseEvent = "tdehtml/Events/MouseReleaseEvent";
00067 
00068 const char *tdehtml::DrawContentsEvent::s_strDrawContentsEvent = "tdehtml/Events/DrawContentsEvent";
00069 
00070 class tdehtml::DrawContentsEvent::DrawContentsEventPrivate
00071 {
00072 public:
00073   DrawContentsEventPrivate()
00074   {
00075   }
00076   ~DrawContentsEventPrivate()
00077   {
00078   }
00079 };
00080 
00081 tdehtml::DrawContentsEvent::DrawContentsEvent( TQPainter *painter, int clipx, int clipy, int clipw, int cliph )
00082   : KParts::Event( s_strDrawContentsEvent ), m_painter( painter ), m_clipx( clipx ), m_clipy( clipy ),
00083     m_clipw( clipw ), m_cliph( cliph )
00084 {
00085   d = new DrawContentsEventPrivate;
00086 }
00087 
00088 tdehtml::DrawContentsEvent::~DrawContentsEvent()
00089 {
00090   delete d;
00091 }
00092 

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.7.6.1
This website is maintained by Timothy Pearson.