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

KHTML

  • sources
  • kde-4.12
  • kdelibs
  • 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 
28 using namespace DOM;
29 
30 EventListener::EventListener()
31 {
32 }
33 
34 EventListener::~EventListener()
35 {
36 }
37 
38 void EventListener::handleEvent(Event &/*evt*/)
39 {
40 }
41 
42 DOMString EventListener::eventListenerType()
43 {
44  return "";
45 }
46 
47 // -----------------------------------------------------------------------------
48 
49 Event::Event()
50 {
51  impl = 0;
52 }
53 
54 
55 Event::Event(const Event &other)
56 {
57  impl = other.impl;
58  if (impl) impl->ref();
59 }
60 
61 Event::Event(EventImpl *i)
62 {
63  impl = i;
64  if (impl) impl->ref();
65 }
66 
67 Event::~Event()
68 {
69  if (impl) impl->deref();
70 }
71 
72 Event &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 
82 DOMString Event::type() const
83 {
84  if (!impl)
85  throw DOMException(DOMException::INVALID_STATE_ERR);
86 
87  return impl->type();
88 }
89 
90 Node 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 
100 Node 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 
110 unsigned short Event::eventPhase() const
111 {
112  if (!impl)
113  throw DOMException(DOMException::INVALID_STATE_ERR);
114 
115  return impl->eventPhase();
116 }
117 
118 bool Event::bubbles() const
119 {
120  if (!impl)
121  throw DOMException(DOMException::INVALID_STATE_ERR);
122 
123  return impl->bubbles();
124 }
125 
126 bool Event::cancelable() const
127 {
128  if (!impl)
129  throw DOMException(DOMException::INVALID_STATE_ERR);
130 
131  return impl->cancelable();
132 }
133 
134 DOMTimeStamp Event::timeStamp() const
135 {
136  if (!impl)
137  throw DOMException(DOMException::INVALID_STATE_ERR);
138 
139  return impl->timeStamp();
140 }
141 
142 void Event::stopPropagation()
143 {
144  if (!impl)
145  throw DOMException(DOMException::INVALID_STATE_ERR);
146 
147  impl->stopPropagation(true);
148 }
149 
150 void Event::preventDefault()
151 {
152  if (!impl)
153  throw DOMException(DOMException::INVALID_STATE_ERR);
154 
155  impl->preventDefault(true);
156 }
157 
158 void 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 
166 EventImpl *Event::handle() const
167 {
168  return impl;
169 }
170 
171 bool Event::isNull() const
172 {
173  return (impl == 0);
174 }
175 
176 // -----------------------------------------------------------------------------
177 
178 #ifndef SAVE_SPACE
179 
180 EventException::EventException(unsigned short _code)
181 {
182  code = _code;
183 }
184 
185 EventException::EventException(const EventException &other)
186 {
187  code = other.code;
188 }
189 
190 EventException & EventException::operator = (const EventException &other)
191 {
192  code = other.code;
193  return *this;
194 }
195 
196 #endif
197 
198 DOMString EventException::codeAsString() const
199 {
200  return codeAsString(code);
201 }
202 
203 bool EventException::isEventExceptionCode(int exceptioncode)
204 {
205  return exceptioncode >= _EXCEPTION_OFFSET && exceptioncode < _EXCEPTION_MAX;
206 }
207 
208 DOMString 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 
221 UIEvent::UIEvent() : Event()
222 {
223 }
224 
225 UIEvent::UIEvent(const UIEvent &other) : Event(other)
226 {
227 }
228 
229 UIEvent::UIEvent(const Event &other) : Event()
230 {
231  (*this)=other;
232 }
233 
234 UIEvent::UIEvent(UIEventImpl *impl) : Event(impl)
235 {
236 }
237 
238 UIEvent &UIEvent::operator = (const UIEvent &other)
239 {
240  Event::operator = (other);
241  return *this;
242 }
243 
244 UIEvent &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 
256 UIEvent::~UIEvent()
257 {
258 }
259 
260 AbstractView UIEvent::view() const
261 {
262  if (!impl)
263  throw DOMException(DOMException::INVALID_STATE_ERR);
264 
265  return static_cast<UIEventImpl*>(impl)->view();
266 }
267 
268 long UIEvent::detail() const
269 {
270  if (!impl)
271  throw DOMException(DOMException::INVALID_STATE_ERR);
272 
273  return static_cast<UIEventImpl*>(impl)->detail();
274 }
275 
276 int UIEvent::keyCode() const
277 {
278  if ( !impl ) throw DOMException( DOMException::INVALID_STATE_ERR );
279 
280  return static_cast<UIEventImpl*>(impl)->keyCode();
281 }
282 
283 int UIEvent::charCode() const
284 {
285  if (!impl)
286  throw DOMException(DOMException::INVALID_STATE_ERR);
287 
288  return static_cast<UIEventImpl*>(impl)->charCode();
289 }
290 
291 int UIEvent::pageX() const
292 {
293  if (!impl)
294  throw DOMException(DOMException::INVALID_STATE_ERR);
295 
296  return static_cast<UIEventImpl*>(impl)->pageX();
297 }
298 
299 int UIEvent::pageY() const
300 {
301  if (!impl)
302  throw DOMException(DOMException::INVALID_STATE_ERR);
303 
304  return static_cast<UIEventImpl*>(impl)->pageY();
305 }
306 
307 int UIEvent::layerX() const
308 {
309  if( !impl )
310  throw DOMException( DOMException::INVALID_STATE_ERR );
311 
312  return static_cast<UIEventImpl*>(impl)->layerX();
313 }
314 
315 int UIEvent::layerY() const
316 {
317  if( !impl )
318  throw DOMException( DOMException::INVALID_STATE_ERR );
319 
320  return static_cast<UIEventImpl*>(impl)->layerY();
321 }
322 
323 int UIEvent::which() const
324 {
325  if( !impl ) throw DOMException( DOMException::INVALID_STATE_ERR );
326  return static_cast<UIEventImpl*>(impl)->which();
327 }
328 
329 void 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 
344 MouseEvent::MouseEvent() : UIEvent()
345 {
346 }
347 
348 MouseEvent::MouseEvent(const MouseEvent &other) : UIEvent(other)
349 {
350 }
351 
352 MouseEvent::MouseEvent(const Event &other) : UIEvent()
353 {
354  (*this)=other;
355 }
356 
357 MouseEvent::MouseEvent(MouseEventImpl *impl) : UIEvent(impl)
358 {
359 }
360 
361 MouseEvent &MouseEvent::operator = (const MouseEvent &other)
362 {
363  UIEvent::operator = (other);
364  return *this;
365 }
366 
367 MouseEvent &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 
379 MouseEvent::~MouseEvent()
380 {
381 }
382 
383 long MouseEvent::screenX() const
384 {
385  if (!impl)
386  throw DOMException(DOMException::INVALID_STATE_ERR);
387 
388  return static_cast<MouseEventImpl*>(impl)->screenX();
389 }
390 
391 long MouseEvent::screenY() const
392 {
393  if (!impl)
394  throw DOMException(DOMException::INVALID_STATE_ERR);
395 
396  return static_cast<MouseEventImpl*>(impl)->screenY();
397 }
398 
399 long MouseEvent::clientX() const
400 {
401  if (!impl)
402  throw DOMException(DOMException::INVALID_STATE_ERR);
403 
404  return static_cast<MouseEventImpl*>(impl)->clientX();
405 }
406 
407 long MouseEvent::clientY() const
408 {
409  if (!impl)
410  throw DOMException(DOMException::INVALID_STATE_ERR);
411 
412  return static_cast<MouseEventImpl*>(impl)->clientY();
413 }
414 
415 bool MouseEvent::ctrlKey() const
416 {
417  if (!impl)
418  throw DOMException(DOMException::INVALID_STATE_ERR);
419 
420  return static_cast<MouseEventImpl*>(impl)->ctrlKey();
421 }
422 
423 bool MouseEvent::shiftKey() const
424 {
425  if (!impl)
426  throw DOMException(DOMException::INVALID_STATE_ERR);
427 
428  return static_cast<MouseEventImpl*>(impl)->shiftKey();
429 }
430 
431 bool MouseEvent::altKey() const
432 {
433  if (!impl)
434  throw DOMException(DOMException::INVALID_STATE_ERR);
435 
436  return static_cast<MouseEventImpl*>(impl)->altKey();
437 }
438 
439 bool MouseEvent::metaKey() const
440 {
441  if (!impl)
442  throw DOMException(DOMException::INVALID_STATE_ERR);
443 
444  return static_cast<MouseEventImpl*>(impl)->metaKey();
445 }
446 
447 unsigned 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 
455 Node MouseEvent::relatedTarget() const
456 {
457  if (!impl)
458  throw DOMException(DOMException::INVALID_STATE_ERR);
459 
460  return static_cast<MouseEventImpl*>(impl)->relatedTarget();
461 }
462 
463 void 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 
490 TextEvent::TextEvent() : UIEvent()
491 {
492 }
493 
494 TextEvent::TextEvent(const TextEvent &other) : UIEvent(other)
495 {
496 }
497 
498 TextEvent::TextEvent(const Event &other) : UIEvent()
499 {
500  (*this)=other;
501 }
502 
503 TextEvent &TextEvent::operator = (const TextEvent &other)
504 {
505  UIEvent::operator = (other);
506  return *this;
507 }
508 
509 TextEvent &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 
521 TextEvent::~TextEvent()
522 {
523 }
524 
525 void 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 
536 KeyboardEvent::KeyboardEvent() : UIEvent()
537 {
538 }
539 
540 KeyboardEvent::KeyboardEvent(const KeyboardEvent &other) : UIEvent(other)
541 {
542 }
543 
544 KeyboardEvent::KeyboardEvent(const Event &other) : UIEvent()
545 {
546  (*this)=other;
547 }
548 
549 KeyboardEvent &KeyboardEvent::operator = (const KeyboardEvent &other)
550 {
551  UIEvent::operator = (other);
552  return *this;
553 }
554 
555 KeyboardEvent &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 
567 KeyboardEvent::~KeyboardEvent()
568 {
569 }
570 
571 DOMString KeyboardEvent::keyIdentifier() const
572 {
573  return static_cast<const KeyboardEventImpl*>(impl)->keyIdentifier();
574 }
575 
576 unsigned long KeyboardEvent::keyLocation() const
577 {
578  return static_cast<const KeyboardEventImpl*>(impl)->keyLocation();
579 }
580 
581 bool KeyboardEvent::ctrlKey() const
582 {
583  return static_cast<const KeyboardEventImpl*>(impl)->ctrlKey();
584 }
585 
586 bool KeyboardEvent::shiftKey() const
587 {
588  return static_cast<const KeyboardEventImpl*>(impl)->shiftKey();
589 }
590 
591 bool KeyboardEvent::altKey() const
592 {
593  return static_cast<const KeyboardEventImpl*>(impl)->altKey();
594 }
595 
596 bool KeyboardEvent::metaKey() const
597 {
598  return static_cast<const KeyboardEventImpl*>(impl)->metaKey();
599 }
600 
601 bool KeyboardEvent::getModifierState(DOMString keyIdentifierArg) const
602 {
603  return static_cast<const KeyboardEventImpl*>(impl)->getModifierState(keyIdentifierArg);
604 }
605 
606 void 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 
621 MutationEvent::MutationEvent() : Event()
622 {
623 }
624 
625 MutationEvent::MutationEvent(const MutationEvent &other) : Event(other)
626 {
627 }
628 
629 MutationEvent::MutationEvent(const Event &other) : Event()
630 {
631  (*this)=other;
632 }
633 
634 MutationEvent::MutationEvent(MutationEventImpl *impl) : Event(impl)
635 {
636 }
637 
638 MutationEvent &MutationEvent::operator = (const MutationEvent &other)
639 {
640  Event::operator = (other);
641  return *this;
642 }
643 
644 MutationEvent &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 
656 MutationEvent::~MutationEvent()
657 {
658 }
659 
660 Node MutationEvent::relatedNode() const
661 {
662  if (!impl)
663  throw DOMException(DOMException::INVALID_STATE_ERR);
664 
665  return static_cast<MutationEventImpl*>(impl)->relatedNode();
666 }
667 
668 DOMString MutationEvent::prevValue() const
669 {
670  if (!impl)
671  throw DOMException(DOMException::INVALID_STATE_ERR);
672 
673  return static_cast<MutationEventImpl*>(impl)->prevValue();
674 }
675 
676 DOMString MutationEvent::newValue() const
677 {
678  if (!impl)
679  throw DOMException(DOMException::INVALID_STATE_ERR);
680 
681  return static_cast<MutationEventImpl*>(impl)->newValue();
682 }
683 
684 DOMString MutationEvent::attrName() const
685 {
686  if (!impl)
687  throw DOMException(DOMException::INVALID_STATE_ERR);
688 
689  return static_cast<MutationEventImpl*>(impl)->attrName();
690 }
691 
692 unsigned 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 
700 void 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::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::UIEvent::layerX
int layerX() const
Non-standard extensions to support Netscape-style layerX and layerY event properties.
Definition: dom2_events.cpp:307
DOM::Event::impl
EventImpl * impl
Definition: dom2_events.h:257
DOM::MutationEvent::MutationEvent
MutationEvent()
Definition: dom2_events.cpp:621
DOM::Event::type
DOMString type() const
The name of the event (case-insensitive).
Definition: dom2_events.cpp:82
DOM::Node
The Node interface is the primary datatype for the entire Document Object Model.
Definition: dom_node.h:270
DOM::Event::isNull
bool isNull() const
Definition: dom2_events.cpp:171
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::Event::target
Node target() const
Used to indicate the EventTarget to which the event was originally dispatched.
Definition: dom2_events.cpp:90
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::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::Event::bubbles
bool bubbles() const
Used to indicate whether or not an event is a bubbling event.
Definition: dom2_events.cpp:118
DOM::AbstractView
Introduced in DOM Level 2.
Definition: dom2_views.h:41
DOM::UIEvent
Introduced in DOM Level 2.
Definition: dom2_events.h:312
DOM::KeyboardEvent::keyIdentifier
DOMString keyIdentifier() const
keyIdentifier of type DOMString, readonly
Definition: dom2_events.cpp:571
DOM::EventListener::~EventListener
virtual ~EventListener()
Definition: dom2_events.cpp:34
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::~MutationEvent
virtual ~MutationEvent()
Definition: dom2_events.cpp:656
DOM::MouseEvent
Introduced in DOM Level 2.
Definition: dom2_events.h:417
DOM::UIEvent::view
AbstractView view() const
The view attribute identifies the AbstractView from which the event was generated.
Definition: dom2_events.cpp:260
DOM::MouseEvent::operator=
MouseEvent & operator=(const MouseEvent &other)
Definition: dom2_events.cpp:361
DOM::KeyboardEvent::shiftKey
bool shiftKey() const
shiftKey of type boolean, readonly
Definition: dom2_events.cpp:586
DOM::UIEvent::charCode
int charCode() const
Non-standard extension to support IE-style charCode event property.
Definition: dom2_events.cpp:283
DOM::UIEvent::UIEvent
UIEvent()
Definition: dom2_events.cpp:221
DOM::KeyboardEvent::metaKey
bool metaKey() const
metaKey of type boolean, readonly
Definition: dom2_events.cpp:596
DOM::UIEvent::pageY
int pageY() const
Definition: dom2_events.cpp:299
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::EventException::operator=
EventException & operator=(const EventException &other)
Definition: dom2_events.cpp:190
DOM::DOMException
DOM operations only raise exceptions in "exceptional" circumstances, i.e., when an operation is impos...
Definition: dom_exception.h:58
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::TextEvent::~TextEvent
virtual ~TextEvent()
Definition: dom2_events.cpp:521
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::EventException
Introduced in DOM Level 2:
Definition: dom2_events.h:268
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::KeyboardEvent::operator=
KeyboardEvent & operator=(const KeyboardEvent &other)
Definition: dom2_events.cpp:549
DOM::Event::handle
EventImpl * handle() const
Definition: dom2_events.cpp:166
DOM::KeyboardEvent
Introduced in DOM Level 3.
Definition: dom2_events.h:630
DOM::MouseEvent::MouseEvent
MouseEvent()
Definition: dom2_events.cpp:344
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::EventException::_EXCEPTION_OFFSET
Definition: dom2_events.h:287
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::keyCode
int keyCode() const
Non-standard extension to support IE-style keyCode event property.
Definition: dom2_events.cpp:276
DOM::TextEvent
Introduced in DOM Level 3.
Definition: dom2_events.h:568
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::KeyboardEvent::getModifierState
bool getModifierState(DOMString keyIdentifierArg) const
getModifierState
Definition: dom2_events.cpp:601
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::DOMString
This class implements the basic string we use in the DOM.
Definition: dom_string.h:43
DOM::EventException::code
unsigned short code
Definition: dom2_events.h:291
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_exception.h
DOM::MutationEvent
Introduced in DOM Level 2.
Definition: dom2_events.h:778
DOM::TextEvent::TextEvent
TextEvent()
Definition: dom2_events.cpp:490
DOM::Event::Event
Event()
Definition: dom2_events.cpp:49
DOM::KeyboardEvent::ctrlKey
bool ctrlKey() const
ctrlKey of type boolean, readonly
Definition: dom2_events.cpp:581
DOM::KeyboardEvent::KeyboardEvent
KeyboardEvent()
Definition: dom2_events.cpp:536
DOM::EventListener::eventListenerType
virtual DOMString eventListenerType()
Definition: dom2_events.cpp:42
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::TextEvent::operator=
TextEvent & operator=(const TextEvent &other)
Definition: dom2_events.cpp:503
DOM::MutationEvent::attrChange
unsigned short attrChange() const
attrChange indicates the type of change which triggered the DOMAttrModified event.
Definition: dom2_events.cpp:692
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
dom2_views.h
DOM::EventException::codeAsString
DOMString codeAsString() const
Returns the name of this error.
Definition: dom2_events.cpp:198
DOM::KeyboardEvent::~KeyboardEvent
virtual ~KeyboardEvent()
Definition: dom2_events.cpp:567
DOM::MutationEvent::prevValue
DOMString prevValue() const
prevValue indicates the previous value of the Attr node in DOMAttrModified events, and of the CharacterData node in DOMCharDataModified events.
Definition: dom2_events.cpp:668
DOM::EventException::isEventExceptionCode
static bool isEventExceptionCode(int exceptioncode)
Definition: dom2_events.cpp:203
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::~MouseEvent
virtual ~MouseEvent()
Definition: dom2_events.cpp:379
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::EventException::_EXCEPTION_MAX
Definition: dom2_events.h:288
DOM::Event
Introduced in DOM Level 2.
Definition: dom2_events.h:117
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::UIEvent::which
int which() const
Non-standard extension to support Netscape-style "which" event property.
Definition: dom2_events.cpp:323
DOM::KeyboardEvent::keyLocation
unsigned long keyLocation() const
keyLocation of type unsigned long, readonly
Definition: dom2_events.cpp:576
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::EventListener::EventListener
EventListener()
Definition: dom2_events.cpp:30
DOM::UIEvent::layerY
int layerY() const
Definition: dom2_events.cpp:315
DOM::UIEvent::~UIEvent
virtual ~UIEvent()
Definition: dom2_events.cpp:256
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::Event::operator=
Event & operator=(const Event &other)
Definition: dom2_events.cpp:72
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::EventException::UNSPECIFIED_EVENT_TYPE_ERR
Definition: dom2_events.h:286
DOM::Event::~Event
virtual ~Event()
Definition: dom2_events.cpp:67
DOM::AbstractView::handle
AbstractViewImpl * handle() const
Definition: dom2_views.cpp:84
DOM::DOMTimeStamp
unsigned long long DOMTimeStamp
A DOMTimeStamp represents a number of milliseconds.
Definition: dom_node.h:1020
DOM::DOMException::INVALID_STATE_ERR
Definition: dom_exception.h:83
DOM::EventException::EventException
EventException(unsigned short _code)
Definition: dom2_events.cpp:180
DOM::UIEvent::operator=
UIEvent & operator=(const UIEvent &other)
Definition: dom2_events.cpp:238
DOM::Event::currentTarget
Node currentTarget() const
Used to indicate the EventTarget whose EventListeners are currently being processed.
Definition: dom2_events.cpp:100
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::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::UIEvent::pageX
int pageX() const
Non-standard extensions to support Netscape-style pageX and pageY event properties.
Definition: dom2_events.cpp:291
DOM::MutationEvent::operator=
MutationEvent & operator=(const MutationEvent &other)
Definition: dom2_events.cpp:638
DOM::KeyboardEvent::altKey
bool altKey() const
altKey of type boolean, readonly
Definition: dom2_events.cpp:591
DOM::Event::stopPropagation
void stopPropagation()
The stopPropagation method is used prevent further propagation of an event during event flow...
Definition: dom2_events.cpp:142
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:51:20 by doxygen 1.8.7 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 API Reference

Skip menu "kdelibs 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
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



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