[12762] | 1 | using System;
|
---|
| 2 | using System.Xml;
|
---|
| 3 |
|
---|
| 4 | using SharpVectors.Dom.Events;
|
---|
| 5 |
|
---|
| 6 | namespace SharpVectors.Dom
|
---|
| 7 | {
|
---|
| 8 | /// <summary>
|
---|
| 9 | /// Summary description for EntityReference.
|
---|
| 10 | /// </summary>
|
---|
| 11 | public class EntityReference
|
---|
| 12 | : XmlEntityReference
|
---|
| 13 | , INode
|
---|
| 14 | , IEventTargetSupport
|
---|
| 15 | {
|
---|
| 16 | #region Private Fields
|
---|
| 17 |
|
---|
| 18 | private EventTarget eventTarget;
|
---|
| 19 |
|
---|
| 20 | #endregion
|
---|
| 21 |
|
---|
| 22 | #region Constructors
|
---|
| 23 |
|
---|
| 24 | protected internal EntityReference(
|
---|
| 25 | string name,
|
---|
| 26 | Document document)
|
---|
| 27 | : base(name, document)
|
---|
| 28 | {
|
---|
| 29 | eventTarget = new EventTarget(this);
|
---|
| 30 | }
|
---|
| 31 |
|
---|
| 32 | #endregion
|
---|
| 33 |
|
---|
| 34 | #region IEventTarget interface
|
---|
| 35 |
|
---|
| 36 | #region Methods
|
---|
| 37 |
|
---|
| 38 | #region DOM Level 2
|
---|
| 39 |
|
---|
| 40 | void IEventTarget.AddEventListener(
|
---|
| 41 | string type,
|
---|
| 42 | EventListener listener,
|
---|
| 43 | bool useCapture)
|
---|
| 44 | {
|
---|
| 45 | eventTarget.AddEventListener(type, listener, useCapture);
|
---|
| 46 | }
|
---|
| 47 |
|
---|
| 48 | void IEventTarget.RemoveEventListener(
|
---|
| 49 | string type,
|
---|
| 50 | EventListener listener,
|
---|
| 51 | bool useCapture)
|
---|
| 52 | {
|
---|
| 53 | eventTarget.RemoveEventListener(type, listener, useCapture);
|
---|
| 54 | }
|
---|
| 55 |
|
---|
| 56 | bool IEventTarget.DispatchEvent(
|
---|
| 57 | IEvent @event)
|
---|
| 58 | {
|
---|
| 59 | return eventTarget.DispatchEvent(@event);
|
---|
| 60 | }
|
---|
| 61 |
|
---|
| 62 | #endregion
|
---|
| 63 |
|
---|
| 64 | #region DOM Level 3 Experimental
|
---|
| 65 |
|
---|
| 66 | void IEventTarget.AddEventListenerNs(
|
---|
| 67 | string namespaceUri,
|
---|
| 68 | string type,
|
---|
| 69 | EventListener listener,
|
---|
| 70 | bool useCapture,
|
---|
| 71 | object eventGroup)
|
---|
| 72 | {
|
---|
| 73 | eventTarget.AddEventListenerNs(namespaceUri, type, listener, useCapture, eventGroup);
|
---|
| 74 | }
|
---|
| 75 |
|
---|
| 76 | void IEventTarget.RemoveEventListenerNs(
|
---|
| 77 | string namespaceUri,
|
---|
| 78 | string type,
|
---|
| 79 | EventListener listener,
|
---|
| 80 | bool useCapture)
|
---|
| 81 | {
|
---|
| 82 | eventTarget.RemoveEventListenerNs(namespaceUri, type, listener, useCapture);
|
---|
| 83 | }
|
---|
| 84 |
|
---|
| 85 | bool IEventTarget.WillTriggerNs(
|
---|
| 86 | string namespaceUri,
|
---|
| 87 | string type)
|
---|
| 88 | {
|
---|
| 89 | return eventTarget.WillTriggerNs(namespaceUri, type);
|
---|
| 90 | }
|
---|
| 91 |
|
---|
| 92 | bool IEventTarget.HasEventListenerNs(
|
---|
| 93 | string namespaceUri,
|
---|
| 94 | string type)
|
---|
| 95 | {
|
---|
| 96 | return eventTarget.HasEventListenerNs(namespaceUri, type);
|
---|
| 97 | }
|
---|
| 98 |
|
---|
| 99 | #endregion
|
---|
| 100 |
|
---|
| 101 | #endregion
|
---|
| 102 |
|
---|
| 103 | #endregion
|
---|
| 104 |
|
---|
| 105 | #region NON-DOM
|
---|
| 106 |
|
---|
| 107 | void IEventTargetSupport.FireEvent(
|
---|
| 108 | IEvent @event)
|
---|
| 109 | {
|
---|
| 110 | eventTarget.FireEvent(@event);
|
---|
| 111 | }
|
---|
| 112 |
|
---|
| 113 | #endregion
|
---|
| 114 | }
|
---|
| 115 | }
|
---|