• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KHTML

  • khtml
  • dom
dom2_events.cpp
Go to the documentation of this file.
1
23#include "dom/dom2_views.h"
24#include "dom/dom_exception.h"
25#include "xml/dom2_eventsimpl.h"
26#include "xml/dom_nodeimpl.h"
27
28using namespace DOM;
29
30EventListener::EventListener()
31{
32}
33
34EventListener::~EventListener()
35{
36}
37
38void EventListener::handleEvent(Event &/*evt*/)
39{
40}
41
42DOMString EventListener::eventListenerType()
43{
44 return "";
45}
46
47// -----------------------------------------------------------------------------
48
49Event::Event()
50{
51 impl = 0;
52}
53
54
55Event::Event(const Event &other)
56{
57 impl = other.impl;
58 if (impl) impl->ref();
59}
60
61Event::Event(EventImpl *i)
62{
63 impl = i;
64 if (impl) impl->ref();
65}
66
67Event::~Event()
68{
69 if (impl) impl->deref();
70}
71
72Event &Event::operator = (const Event &other)
73{
74 if ( impl != other.impl ) {
75 if(impl) impl->deref();
76 impl = other.impl;
77 if(impl) impl->ref();
78 }
79 return *this;
80}
81
82DOMString Event::type() const
83{
84 if (!impl)
85 throw DOMException(DOMException::INVALID_STATE_ERR);
86
87 return impl->type();
88}
89
90Node Event::target() const
91{
92 if (!impl)
93 throw DOMException(DOMException::INVALID_STATE_ERR);
94
95 if (impl->target()->eventTargetType() == EventTargetImpl::DOM_NODE)
96 return static_cast<DOM::NodeImpl*>(impl->target());
97 return 0;
98}
99
100Node Event::currentTarget() const
101{
102 if (!impl)
103 throw DOMException(DOMException::INVALID_STATE_ERR);
104
105 if (impl->currentTarget()->eventTargetType() == EventTargetImpl::DOM_NODE)
106 return static_cast<DOM::NodeImpl*>(impl->currentTarget());
107 return 0;
108}
109
110unsigned short Event::eventPhase() const
111{
112 if (!impl)
113 throw DOMException(DOMException::INVALID_STATE_ERR);
114
115 return impl->eventPhase();
116}
117
118bool Event::bubbles() const
119{
120 if (!impl)
121 throw DOMException(DOMException::INVALID_STATE_ERR);
122
123 return impl->bubbles();
124}
125
126bool Event::cancelable() const
127{
128 if (!impl)
129 throw DOMException(DOMException::INVALID_STATE_ERR);
130
131 return impl->cancelable();
132}
133
134DOMTimeStamp Event::timeStamp() const
135{
136 if (!impl)
137 throw DOMException(DOMException::INVALID_STATE_ERR);
138
139 return impl->timeStamp();
140}
141
142void Event::stopPropagation()
143{
144 if (!impl)
145 throw DOMException(DOMException::INVALID_STATE_ERR);
146
147 impl->stopPropagation(true);
148}
149
150void Event::preventDefault()
151{
152 if (!impl)
153 throw DOMException(DOMException::INVALID_STATE_ERR);
154
155 impl->preventDefault(true);
156}
157
158void Event::initEvent(const DOMString &eventTypeArg, bool canBubbleArg, bool cancelableArg)
159{
160 if (!impl)
161 throw DOMException(DOMException::INVALID_STATE_ERR);
162
163 impl->initEvent(eventTypeArg,canBubbleArg,cancelableArg);
164}
165
166EventImpl *Event::handle() const
167{
168 return impl;
169}
170
171bool Event::isNull() const
172{
173 return (impl == 0);
174}
175
176// -----------------------------------------------------------------------------
177
178#ifndef SAVE_SPACE
179
180EventException::EventException(unsigned short _code)
181{
182 code = _code;
183}
184
185EventException::EventException(const EventException &other)
186{
187 code = other.code;
188}
189
190EventException & EventException::operator = (const EventException &other)
191{
192 code = other.code;
193 return *this;
194}
195
196#endif
197
198DOMString EventException::codeAsString() const
199{
200 return codeAsString(code);
201}
202
203bool EventException::isEventExceptionCode(int exceptioncode)
204{
205 return exceptioncode >= _EXCEPTION_OFFSET && exceptioncode < _EXCEPTION_MAX;
206}
207
208DOMString EventException::codeAsString(int code)
209{
210 switch ( code ) {
211 case UNSPECIFIED_EVENT_TYPE_ERR:
212 return DOMString( "UNSPECIFIED_EVENT_TYPE_ERR" );
213 default:
214 return DOMString( "(unknown exception code)" );
215 }
216}
217
218
219// -----------------------------------------------------------------------------
220
221UIEvent::UIEvent() : Event()
222{
223}
224
225UIEvent::UIEvent(const UIEvent &other) : Event(other)
226{
227}
228
229UIEvent::UIEvent(const Event &other) : Event()
230{
231 (*this)=other;
232}
233
234UIEvent::UIEvent(UIEventImpl *impl) : Event(impl)
235{
236}
237
238UIEvent &UIEvent::operator = (const UIEvent &other)
239{
240 Event::operator = (other);
241 return *this;
242}
243
244UIEvent &UIEvent::operator = (const Event &other)
245{
246 Event e;
247 e = other;
248 if (!e.isNull() && !e.handle()->isUIEvent()) {
249 if ( impl ) impl->deref();
250 impl = 0;
251 } else
252 Event::operator = (other);
253 return *this;
254}
255
256UIEvent::~UIEvent()
257{
258}
259
260AbstractView UIEvent::view() const
261{
262 if (!impl)
263 throw DOMException(DOMException::INVALID_STATE_ERR);
264
265 return static_cast<UIEventImpl*>(impl)->view();
266}
267
268long UIEvent::detail() const
269{
270 if (!impl)
271 throw DOMException(DOMException::INVALID_STATE_ERR);
272
273 return static_cast<UIEventImpl*>(impl)->detail();
274}
275
276int UIEvent::keyCode() const
277{
278 if ( !impl ) throw DOMException( DOMException::INVALID_STATE_ERR );
279
280 return static_cast<UIEventImpl*>(impl)->keyCode();
281}
282
283int UIEvent::charCode() const
284{
285 if (!impl)
286 throw DOMException(DOMException::INVALID_STATE_ERR);
287
288 return static_cast<UIEventImpl*>(impl)->charCode();
289}
290
291int UIEvent::pageX() const
292{
293 if (!impl)
294 throw DOMException(DOMException::INVALID_STATE_ERR);
295
296 return static_cast<UIEventImpl*>(impl)->pageX();
297}
298
299int UIEvent::pageY() const
300{
301 if (!impl)
302 throw DOMException(DOMException::INVALID_STATE_ERR);
303
304 return static_cast<UIEventImpl*>(impl)->pageY();
305}
306
307int UIEvent::layerX() const
308{
309 if( !impl )
310 throw DOMException( DOMException::INVALID_STATE_ERR );
311
312 return static_cast<UIEventImpl*>(impl)->layerX();
313}
314
315int UIEvent::layerY() const
316{
317 if( !impl )
318 throw DOMException( DOMException::INVALID_STATE_ERR );
319
320 return static_cast<UIEventImpl*>(impl)->layerY();
321}
322
323int UIEvent::which() const
324{
325 if( !impl ) throw DOMException( DOMException::INVALID_STATE_ERR );
326 return static_cast<UIEventImpl*>(impl)->which();
327}
328
329void UIEvent::initUIEvent(const DOMString &typeArg,
330 bool canBubbleArg,
331 bool cancelableArg,
332 const AbstractView &viewArg,
333 long detailArg)
334{
335 if (!impl)
336 throw DOMException(DOMException::INVALID_STATE_ERR);
337
338 static_cast<UIEventImpl*>(impl)->initUIEvent(typeArg,canBubbleArg,cancelableArg,
339 viewArg.handle(),detailArg);
340}
341
342// -----------------------------------------------------------------------------
343
344MouseEvent::MouseEvent() : UIEvent()
345{
346}
347
348MouseEvent::MouseEvent(const MouseEvent &other) : UIEvent(other)
349{
350}
351
352MouseEvent::MouseEvent(const Event &other) : UIEvent()
353{
354 (*this)=other;
355}
356
357MouseEvent::MouseEvent(MouseEventImpl *impl) : UIEvent(impl)
358{
359}
360
361MouseEvent &MouseEvent::operator = (const MouseEvent &other)
362{
363 UIEvent::operator = (other);
364 return *this;
365}
366
367MouseEvent &MouseEvent::operator = (const Event &other)
368{
369 Event e;
370 e = other;
371 if (!e.isNull() && !e.handle()->isMouseEvent()) {
372 if ( impl ) impl->deref();
373 impl = 0;
374 } else
375 UIEvent::operator = (other);
376 return *this;
377}
378
379MouseEvent::~MouseEvent()
380{
381}
382
383long MouseEvent::screenX() const
384{
385 if (!impl)
386 throw DOMException(DOMException::INVALID_STATE_ERR);
387
388 return static_cast<MouseEventImpl*>(impl)->screenX();
389}
390
391long MouseEvent::screenY() const
392{
393 if (!impl)
394 throw DOMException(DOMException::INVALID_STATE_ERR);
395
396 return static_cast<MouseEventImpl*>(impl)->screenY();
397}
398
399long MouseEvent::clientX() const
400{
401 if (!impl)
402 throw DOMException(DOMException::INVALID_STATE_ERR);
403
404 return static_cast<MouseEventImpl*>(impl)->clientX();
405}
406
407long MouseEvent::clientY() const
408{
409 if (!impl)
410 throw DOMException(DOMException::INVALID_STATE_ERR);
411
412 return static_cast<MouseEventImpl*>(impl)->clientY();
413}
414
415bool MouseEvent::ctrlKey() const
416{
417 if (!impl)
418 throw DOMException(DOMException::INVALID_STATE_ERR);
419
420 return static_cast<MouseEventImpl*>(impl)->ctrlKey();
421}
422
423bool MouseEvent::shiftKey() const
424{
425 if (!impl)
426 throw DOMException(DOMException::INVALID_STATE_ERR);
427
428 return static_cast<MouseEventImpl*>(impl)->shiftKey();
429}
430
431bool MouseEvent::altKey() const
432{
433 if (!impl)
434 throw DOMException(DOMException::INVALID_STATE_ERR);
435
436 return static_cast<MouseEventImpl*>(impl)->altKey();
437}
438
439bool MouseEvent::metaKey() const
440{
441 if (!impl)
442 throw DOMException(DOMException::INVALID_STATE_ERR);
443
444 return static_cast<MouseEventImpl*>(impl)->metaKey();
445}
446
447unsigned short MouseEvent::button() const
448{
449 if (!impl)
450 throw DOMException(DOMException::INVALID_STATE_ERR);
451
452 return static_cast<MouseEventImpl*>(impl)->button();
453}
454
455Node MouseEvent::relatedTarget() const
456{
457 if (!impl)
458 throw DOMException(DOMException::INVALID_STATE_ERR);
459
460 return static_cast<MouseEventImpl*>(impl)->relatedTarget();
461}
462
463void MouseEvent::initMouseEvent(const DOMString &typeArg,
464 bool canBubbleArg,
465 bool cancelableArg,
466 const AbstractView &viewArg,
467 long detailArg,
468 long screenXArg,
469 long screenYArg,
470 long clientXArg,
471 long clientYArg,
472 bool ctrlKeyArg,
473 bool altKeyArg,
474 bool shiftKeyArg,
475 bool metaKeyArg,
476 unsigned short buttonArg,
477 const Node &relatedTargetArg)
478{
479 if (!impl)
480 throw DOMException(DOMException::INVALID_STATE_ERR);
481
482 static_cast<MouseEventImpl*>(impl)->initMouseEvent(typeArg,canBubbleArg,
483 cancelableArg,viewArg.handle(),detailArg,screenXArg,screenYArg,clientXArg,
484 clientYArg,ctrlKeyArg,altKeyArg,shiftKeyArg,metaKeyArg,buttonArg,
485 relatedTargetArg);
486}
487
488// -----------------------------------------------------------------------------
489
490TextEvent::TextEvent() : UIEvent()
491{
492}
493
494TextEvent::TextEvent(const TextEvent &other) : UIEvent(other)
495{
496}
497
498TextEvent::TextEvent(const Event &other) : UIEvent()
499{
500 (*this)=other;
501}
502
503TextEvent &TextEvent::operator = (const TextEvent &other)
504{
505 UIEvent::operator = (other);
506 return *this;
507}
508
509TextEvent &TextEvent::operator = (const Event &other)
510{
511 Event e;
512 e = other;
513 if (!e.isNull() && !e.handle()->isTextInputEvent()) {
514 if ( impl ) impl->deref();
515 impl = 0;
516 } else
517 UIEvent::operator = (other);
518 return *this;
519}
520
521TextEvent::~TextEvent()
522{
523}
524
525void TextEvent::initTextEvent(const DOMString &typeArg,
526 bool canBubbleArg,
527 bool cancelableArg,
528 const AbstractView &viewArg,
529 const DOMString &dataArg)
530{
531 static_cast<TextEventImpl*>(impl)->initTextEvent(
532 typeArg, canBubbleArg, cancelableArg, viewArg.handle(), dataArg);
533}
534// -----------------------------------------------------------------------------
535
536KeyboardEvent::KeyboardEvent() : UIEvent()
537{
538}
539
540KeyboardEvent::KeyboardEvent(const KeyboardEvent &other) : UIEvent(other)
541{
542}
543
544KeyboardEvent::KeyboardEvent(const Event &other) : UIEvent()
545{
546 (*this)=other;
547}
548
549KeyboardEvent &KeyboardEvent::operator = (const KeyboardEvent &other)
550{
551 UIEvent::operator = (other);
552 return *this;
553}
554
555KeyboardEvent &KeyboardEvent::operator = (const Event &other)
556{
557 Event e;
558 e = other;
559 if (!e.isNull() && !e.handle()->isKeyboardEvent()) {
560 if ( impl ) impl->deref();
561 impl = 0;
562 } else
563 UIEvent::operator = (other);
564 return *this;
565}
566
567KeyboardEvent::~KeyboardEvent()
568{
569}
570
571DOMString KeyboardEvent::keyIdentifier() const
572{
573 return static_cast<const KeyboardEventImpl*>(impl)->keyIdentifier();
574}
575
576unsigned long KeyboardEvent::keyLocation() const
577{
578 return static_cast<const KeyboardEventImpl*>(impl)->keyLocation();
579}
580
581bool KeyboardEvent::ctrlKey() const
582{
583 return static_cast<const KeyboardEventImpl*>(impl)->ctrlKey();
584}
585
586bool KeyboardEvent::shiftKey() const
587{
588 return static_cast<const KeyboardEventImpl*>(impl)->shiftKey();
589}
590
591bool KeyboardEvent::altKey() const
592{
593 return static_cast<const KeyboardEventImpl*>(impl)->altKey();
594}
595
596bool KeyboardEvent::metaKey() const
597{
598 return static_cast<const KeyboardEventImpl*>(impl)->metaKey();
599}
600
601bool KeyboardEvent::getModifierState(DOMString keyIdentifierArg) const
602{
603 return static_cast<const KeyboardEventImpl*>(impl)->getModifierState(keyIdentifierArg);
604}
605
606void KeyboardEvent::initKeyboardEvent(DOMString typeArg,
607 bool canBubbleArg,
608 bool cancelableArg,
609 AbstractView viewArg,
610 DOMString keyIdentifierArg,
611 unsigned long keyLocationArg,
612 DOMString modifiersList)
613{
614 static_cast<KeyboardEventImpl*>(impl)->initKeyboardEvent(typeArg,
615 canBubbleArg, cancelableArg, viewArg.handle(), keyIdentifierArg, keyLocationArg, modifiersList);
616}
617
618
619// -----------------------------------------------------------------------------
620
621MutationEvent::MutationEvent() : Event()
622{
623}
624
625MutationEvent::MutationEvent(const MutationEvent &other) : Event(other)
626{
627}
628
629MutationEvent::MutationEvent(const Event &other) : Event()
630{
631 (*this)=other;
632}
633
634MutationEvent::MutationEvent(MutationEventImpl *impl) : Event(impl)
635{
636}
637
638MutationEvent &MutationEvent::operator = (const MutationEvent &other)
639{
640 Event::operator = (other);
641 return *this;
642}
643
644MutationEvent &MutationEvent::operator = (const Event &other)
645{
646 Event e;
647 e = other;
648 if (!e.isNull() && !e.handle()->isMutationEvent()) {
649 if ( impl ) impl->deref();
650 impl = 0;
651 } else
652 Event::operator = (other);
653 return *this;
654}
655
656MutationEvent::~MutationEvent()
657{
658}
659
660Node MutationEvent::relatedNode() const
661{
662 if (!impl)
663 throw DOMException(DOMException::INVALID_STATE_ERR);
664
665 return static_cast<MutationEventImpl*>(impl)->relatedNode();
666}
667
668DOMString MutationEvent::prevValue() const
669{
670 if (!impl)
671 throw DOMException(DOMException::INVALID_STATE_ERR);
672
673 return static_cast<MutationEventImpl*>(impl)->prevValue();
674}
675
676DOMString MutationEvent::newValue() const
677{
678 if (!impl)
679 throw DOMException(DOMException::INVALID_STATE_ERR);
680
681 return static_cast<MutationEventImpl*>(impl)->newValue();
682}
683
684DOMString MutationEvent::attrName() const
685{
686 if (!impl)
687 throw DOMException(DOMException::INVALID_STATE_ERR);
688
689 return static_cast<MutationEventImpl*>(impl)->attrName();
690}
691
692unsigned short MutationEvent::attrChange() const
693{
694 if (!impl)
695 throw DOMException(DOMException::INVALID_STATE_ERR);
696
697 return static_cast<MutationEventImpl*>(impl)->attrChange();
698}
699
700void MutationEvent::initMutationEvent(const DOMString &typeArg,
701 bool canBubbleArg,
702 bool cancelableArg,
703 const Node &relatedNodeArg,
704 const DOMString &prevValueArg,
705 const DOMString &newValueArg,
706 const DOMString &attrNameArg,
707 unsigned short attrChangeArg)
708{
709 if (!impl)
710 throw DOMException(DOMException::INVALID_STATE_ERR);
711
712 static_cast<MutationEventImpl*>(impl)->initMutationEvent(typeArg,
713 canBubbleArg,cancelableArg,relatedNodeArg,prevValueArg,
714 newValueArg,attrNameArg,attrChangeArg);
715}
716
717
DOM::AbstractView
Introduced in DOM Level 2.
Definition: dom2_views.h:41
DOM::AbstractView::handle
AbstractViewImpl * handle() const
Definition: dom2_views.cpp:84
DOM::DOMException
DOM operations only raise exceptions in "exceptional" circumstances, i.e., when an operation is impos...
Definition: dom_exception.h:59
DOM::DOMException::INVALID_STATE_ERR
@ INVALID_STATE_ERR
Definition: dom_exception.h:83
DOM::DOMString
This class implements the basic string we use in the DOM.
Definition: dom_string.h:44
DOM::EventException
Introduced in DOM Level 2:
Definition: dom2_events.h:269
DOM::EventException::operator=
EventException & operator=(const EventException &other)
Definition: dom2_events.cpp:190
DOM::EventException::EventException
EventException(unsigned short _code)
Definition: dom2_events.cpp:180
DOM::EventException::_EXCEPTION_OFFSET
@ _EXCEPTION_OFFSET
Definition: dom2_events.h:287
DOM::EventException::UNSPECIFIED_EVENT_TYPE_ERR
@ UNSPECIFIED_EVENT_TYPE_ERR
Definition: dom2_events.h:286
DOM::EventException::_EXCEPTION_MAX
@ _EXCEPTION_MAX
Definition: dom2_events.h:288
DOM::EventException::codeAsString
DOMString codeAsString() const
Returns the name of this error.
Definition: dom2_events.cpp:198
DOM::EventException::isEventExceptionCode
static bool isEventExceptionCode(int exceptioncode)
Definition: dom2_events.cpp:203
DOM::EventException::code
unsigned short code
Definition: dom2_events.h:291
DOM::EventListener::handleEvent
virtual void handleEvent(Event &evt)
This method is called whenever an event occurs of the type for which the EventListener interface was ...
Definition: dom2_events.cpp:38
DOM::EventListener::~EventListener
virtual ~EventListener()
Definition: dom2_events.cpp:34
DOM::EventListener::EventListener
EventListener()
Definition: dom2_events.cpp:30
DOM::EventListener::eventListenerType
virtual DOMString eventListenerType()
Definition: dom2_events.cpp:42
DOM::Event
Introduced in DOM Level 2.
Definition: dom2_events.h:117
DOM::Event::bubbles
bool bubbles() const
Used to indicate whether or not an event is a bubbling event.
Definition: dom2_events.cpp:118
DOM::Event::currentTarget
Node currentTarget() const
Used to indicate the EventTarget whose EventListeners are currently being processed.
Definition: dom2_events.cpp:100
DOM::Event::Event
Event()
Definition: dom2_events.cpp:49
DOM::Event::stopPropagation
void stopPropagation()
The stopPropagation method is used prevent further propagation of an event during event flow.
Definition: dom2_events.cpp:142
DOM::Event::type
DOMString type() const
The name of the event (case-insensitive).
Definition: dom2_events.cpp:82
DOM::Event::impl
EventImpl * impl
Definition: dom2_events.h:257
DOM::Event::~Event
virtual ~Event()
Definition: dom2_events.cpp:67
DOM::Event::isNull
bool isNull() const
Definition: dom2_events.cpp:171
DOM::Event::operator=
Event & operator=(const Event &other)
Definition: dom2_events.cpp:72
DOM::Event::handle
EventImpl * handle() const
Definition: dom2_events.cpp:166
DOM::Event::preventDefault
void preventDefault()
If an event is cancelable, the preventDefault method is used to signify that the event is to be cance...
Definition: dom2_events.cpp:150
DOM::Event::eventPhase
unsigned short eventPhase() const
Used to indicate which phase of event flow is currently being evaluated.
Definition: dom2_events.cpp:110
DOM::Event::timeStamp
DOMTimeStamp timeStamp() const
Used to specify the time (in milliseconds relative to the epoch) at which the event was created.
Definition: dom2_events.cpp:134
DOM::Event::cancelable
bool cancelable() const
Used to indicate whether or not an event can have its default action prevented.
Definition: dom2_events.cpp:126
DOM::Event::target
Node target() const
Used to indicate the EventTarget to which the event was originally dispatched.
Definition: dom2_events.cpp:90
DOM::Event::initEvent
void initEvent(const DOMString &eventTypeArg, bool canBubbleArg, bool cancelableArg)
The initEvent method is used to initialize the value of an Event created through the DocumentEvent in...
Definition: dom2_events.cpp:158
DOM::KeyboardEvent
Introduced in DOM Level 3.
Definition: dom2_events.h:630
DOM::KeyboardEvent::keyLocation
unsigned long keyLocation() const
keyLocation of type unsigned long, readonly
Definition: dom2_events.cpp:576
DOM::KeyboardEvent::shiftKey
bool shiftKey() const
shiftKey of type boolean, readonly
Definition: dom2_events.cpp:586
DOM::KeyboardEvent::keyIdentifier
DOMString keyIdentifier() const
keyIdentifier of type DOMString, readonly
Definition: dom2_events.cpp:571
DOM::KeyboardEvent::ctrlKey
bool ctrlKey() const
ctrlKey of type boolean, readonly
Definition: dom2_events.cpp:581
DOM::KeyboardEvent::operator=
KeyboardEvent & operator=(const KeyboardEvent &other)
Definition: dom2_events.cpp:549
DOM::KeyboardEvent::metaKey
bool metaKey() const
metaKey of type boolean, readonly
Definition: dom2_events.cpp:596
DOM::KeyboardEvent::altKey
bool altKey() const
altKey of type boolean, readonly
Definition: dom2_events.cpp:591
DOM::KeyboardEvent::~KeyboardEvent
virtual ~KeyboardEvent()
Definition: dom2_events.cpp:567
DOM::KeyboardEvent::initKeyboardEvent
void initKeyboardEvent(DOMString typeArg, bool canBubbleArg, bool cancelableArg, AbstractView viewArg, DOMString keyIdentifierArg, unsigned long keyLocationArg, DOMString modifiersList)
initKeyboardEvent
Definition: dom2_events.cpp:606
DOM::KeyboardEvent::getModifierState
bool getModifierState(DOMString keyIdentifierArg) const
getModifierState
Definition: dom2_events.cpp:601
DOM::KeyboardEvent::KeyboardEvent
KeyboardEvent()
Definition: dom2_events.cpp:536
DOM::MouseEvent
Introduced in DOM Level 2.
Definition: dom2_events.h:417
DOM::MouseEvent::clientX
long clientX() const
The horizontal coordinate at which the event occurred relative to the DOM implementation's client are...
Definition: dom2_events.cpp:399
DOM::MouseEvent::altKey
bool altKey() const
Used to indicate whether the 'alt' key was depressed during the firing of the event.
Definition: dom2_events.cpp:431
DOM::MouseEvent::clientY
long clientY() const
The vertical coordinate at which the event occurred relative to the DOM implementation's client area.
Definition: dom2_events.cpp:407
DOM::MouseEvent::screenX
long screenX() const
The horizontal coordinate at which the event occurred relative to the origin of the screen coordinate...
Definition: dom2_events.cpp:383
DOM::MouseEvent::relatedTarget
Node relatedTarget() const
Used to identify a secondary EventTarget related to a UI event.
Definition: dom2_events.cpp:455
DOM::MouseEvent::shiftKey
bool shiftKey() const
Used to indicate whether the 'shift' key was depressed during the firing of the event.
Definition: dom2_events.cpp:423
DOM::MouseEvent::~MouseEvent
virtual ~MouseEvent()
Definition: dom2_events.cpp:379
DOM::MouseEvent::MouseEvent
MouseEvent()
Definition: dom2_events.cpp:344
DOM::MouseEvent::metaKey
bool metaKey() const
Used to indicate whether the 'meta' key was depressed during the firing of the event.
Definition: dom2_events.cpp:439
DOM::MouseEvent::initMouseEvent
void initMouseEvent(const DOMString &typeArg, bool canBubbleArg, bool cancelableArg, const AbstractView &viewArg, long detailArg, long screenXArg, long screenYArg, long clientXArg, long clientYArg, bool ctrlKeyArg, bool altKeyArg, bool shiftKeyArg, bool metaKeyArg, unsigned short buttonArg, const Node &relatedTargetArg)
The initMouseEvent method is used to initialize the value of a MouseEvent created through the Documen...
Definition: dom2_events.cpp:463
DOM::MouseEvent::operator=
MouseEvent & operator=(const MouseEvent &other)
Definition: dom2_events.cpp:361
DOM::MouseEvent::button
unsigned short button() const
During mouse events caused by the depression or release of a mouse button, button is used to indicate...
Definition: dom2_events.cpp:447
DOM::MouseEvent::ctrlKey
bool ctrlKey() const
Used to indicate whether the 'ctrl' key was depressed during the firing of the event.
Definition: dom2_events.cpp:415
DOM::MouseEvent::screenY
long screenY() const
The vertical coordinate at which the event occurred relative to the origin of the screen coordinate s...
Definition: dom2_events.cpp:391
DOM::MutationEvent
Introduced in DOM Level 2.
Definition: dom2_events.h:778
DOM::MutationEvent::newValue
DOMString newValue() const
newValue indicates the new value of the Attr node in DOMAttrModified events, and of the CharacterData...
Definition: dom2_events.cpp:676
DOM::MutationEvent::relatedNode
Node relatedNode() const
relatedNode is used to identify a secondary node related to a mutation event.
Definition: dom2_events.cpp:660
DOM::MutationEvent::prevValue
DOMString prevValue() const
prevValue indicates the previous value of the Attr node in DOMAttrModified events,...
Definition: dom2_events.cpp:668
DOM::MutationEvent::attrName
DOMString attrName() const
attrName indicates the name of the changed Attr node in a DOMAttrModified event.
Definition: dom2_events.cpp:684
DOM::MutationEvent::operator=
MutationEvent & operator=(const MutationEvent &other)
Definition: dom2_events.cpp:638
DOM::MutationEvent::~MutationEvent
virtual ~MutationEvent()
Definition: dom2_events.cpp:656
DOM::MutationEvent::initMutationEvent
void initMutationEvent(const DOMString &typeArg, bool canBubbleArg, bool cancelableArg, const Node &relatedNodeArg, const DOMString &prevValueArg, const DOMString &newValueArg, const DOMString &attrNameArg, unsigned short attrChangeArg)
The initMutationEvent method is used to initialize the value of a MutationEvent created through the D...
Definition: dom2_events.cpp:700
DOM::MutationEvent::attrChange
unsigned short attrChange() const
attrChange indicates the type of change which triggered the DOMAttrModified event.
Definition: dom2_events.cpp:692
DOM::MutationEvent::MutationEvent
MutationEvent()
Definition: dom2_events.cpp:621
DOM::Node
The Node interface is the primary datatype for the entire Document Object Model.
Definition: dom_node.h:271
DOM::TextEvent
Introduced in DOM Level 3.
Definition: dom2_events.h:568
DOM::TextEvent::~TextEvent
virtual ~TextEvent()
Definition: dom2_events.cpp:521
DOM::TextEvent::TextEvent
TextEvent()
Definition: dom2_events.cpp:490
DOM::TextEvent::initTextEvent
void initTextEvent(const DOMString &typeArg, bool canBubbleArg, bool cancelableArg, const AbstractView &viewArg, const DOMString &dataArg)
initTextEvent The initTextEvent method is used to initialize the value of a TextEvent object and has ...
Definition: dom2_events.cpp:525
DOM::TextEvent::operator=
TextEvent & operator=(const TextEvent &other)
Definition: dom2_events.cpp:503
DOM::UIEvent
Introduced in DOM Level 2.
Definition: dom2_events.h:312
DOM::UIEvent::UIEvent
UIEvent()
Definition: dom2_events.cpp:221
DOM::UIEvent::view
AbstractView view() const
The view attribute identifies the AbstractView from which the event was generated.
Definition: dom2_events.cpp:260
DOM::UIEvent::pageY
int pageY() const
Definition: dom2_events.cpp:299
DOM::UIEvent::layerX
int layerX() const
Non-standard extensions to support Netscape-style layerX and layerY event properties.
Definition: dom2_events.cpp:307
DOM::UIEvent::detail
long detail() const
Specifies some detail information about the Event, depending on the type of event.
Definition: dom2_events.cpp:268
DOM::UIEvent::layerY
int layerY() const
Definition: dom2_events.cpp:315
DOM::UIEvent::operator=
UIEvent & operator=(const UIEvent &other)
Definition: dom2_events.cpp:238
DOM::UIEvent::charCode
int charCode() const
Non-standard extension to support IE-style charCode event property.
Definition: dom2_events.cpp:283
DOM::UIEvent::keyCode
int keyCode() const
Non-standard extension to support IE-style keyCode event property.
Definition: dom2_events.cpp:276
DOM::UIEvent::which
int which() const
Non-standard extension to support Netscape-style "which" event property.
Definition: dom2_events.cpp:323
DOM::UIEvent::initUIEvent
void initUIEvent(const DOMString &typeArg, bool canBubbleArg, bool cancelableArg, const AbstractView &viewArg, long detailArg)
The initUIEvent method is used to initialize the value of a UIEvent created through the DocumentEvent...
Definition: dom2_events.cpp:329
DOM::UIEvent::pageX
int pageX() const
Non-standard extensions to support Netscape-style pageX and pageY event properties.
Definition: dom2_events.cpp:291
DOM::UIEvent::~UIEvent
virtual ~UIEvent()
Definition: dom2_events.cpp:256
dom2_views.h
dom_exception.h
DOM
This library provides a full-featured HTML parser and widget.
Definition: design.h:55
DOM::DOMTimeStamp
unsigned long long DOMTimeStamp
A DOMTimeStamp represents a number of milliseconds.
Definition: dom_node.h:1020
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KHTML

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

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal