19 #ifndef __tdehtml_events_h__
20 #define __tdehtml_events_h__
22 #include <tdeparts/event.h>
24 #include "dom/dom_node.h"
25 #include "dom/dom_string.h"
33 MouseEvent(
const char *name, TQMouseEvent *qmouseEvent,
int x,
int y,
36 virtual ~MouseEvent();
38 TQMouseEvent *qmouseEvent()
const {
return m_qmouseEvent; }
39 int x()
const {
return m_x; }
40 int y()
const {
return m_y; }
41 int absX()
const {
return m_nodeAbsX; }
42 int absY()
const {
return m_nodeAbsY; }
46 DOM::Node innerNode()
const {
return m_innerNode; }
52 TQMouseEvent *m_qmouseEvent;
55 int m_nodeAbsX, m_nodeAbsY;
59 class MouseEventPrivate;
63 class MousePressEvent :
public MouseEvent
66 MousePressEvent( TQMouseEvent *mouseEvent,
int x,
int y,
69 : MouseEvent( s_strMousePressEvent, mouseEvent, x, y, url, target, innerNode )
72 static bool test(
const TQEvent *event ) {
return KParts::Event::test( event, s_strMousePressEvent ); }
76 static const char *s_strMousePressEvent;
79 class MouseDoubleClickEvent :
public MouseEvent
83 MouseDoubleClickEvent( TQMouseEvent *mouseEvent,
int x,
int y,
85 const DOM::Node &innerNode,
int clickCount = 2 )
86 : MouseEvent( s_strMouseDoubleClickEvent, mouseEvent, x, y, url, target, innerNode ),
87 m_clickCount( clickCount )
90 static bool test(
const TQEvent *event )
91 {
return KParts::Event::test( event, s_strMouseDoubleClickEvent ); }
93 int clickCount()
const {
return m_clickCount; }
97 static const char *s_strMouseDoubleClickEvent;
100 class MouseMoveEvent :
public MouseEvent
103 MouseMoveEvent( TQMouseEvent *mouseEvent,
int x,
int y,
106 : MouseEvent( s_strMouseMoveEvent, mouseEvent, x, y, url, target, innerNode )
109 static bool test(
const TQEvent *event ) {
return KParts::Event::test( event, s_strMouseMoveEvent ); }
112 static const char *s_strMouseMoveEvent;
115 class MouseReleaseEvent :
public MouseEvent
118 MouseReleaseEvent( TQMouseEvent *mouseEvent,
int x,
int y,
121 : MouseEvent( s_strMouseReleaseEvent, mouseEvent, x, y, url, target, innerNode )
124 static bool test(
const TQEvent *event ) {
return KParts::Event::test( event, s_strMouseReleaseEvent ); }
127 static const char *s_strMouseReleaseEvent;
133 DrawContentsEvent( TQPainter *painter,
int clipx,
int clipy,
int clipw,
int cliph );
134 virtual ~DrawContentsEvent();
136 TQPainter *painter()
const {
return m_painter; }
137 int clipx()
const {
return m_clipx; }
138 int clipy()
const {
return m_clipy; }
139 int clipw()
const {
return m_clipw; }
140 int cliph()
const {
return m_cliph; }
142 static bool test(
const TQEvent *event ) {
return KParts::Event::test( event, s_strDrawContentsEvent ); }
145 TQPainter *m_painter;
150 class DrawContentsEventPrivate;
151 DrawContentsEventPrivate *d;
152 static const char *s_strDrawContentsEvent;
This class implements the basic string we use in the DOM.
The Node interface is the primary datatype for the entire Document Object Model.