Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.Problems.GrammaticalOptimization/SharpVectorCore/Events/ICustomEvent.cs @ 13777

Last change on this file since 13777 was 12762, checked in by aballeit, 9 years ago

#2283 GUI updates, Tree-chart, MCTS Version 2 (prune leaves)

File size: 3.4 KB
Line 
1using System;
2
3namespace SharpVectors.Dom.Events
4{
5  /// <summary>
6  /// The <see cref="ICustomEvent">ICustomEvent</see> interface gives access
7  /// to the attributes
8  /// <see cref="IEvent.CurrentTarget">IEvent.CurrentTarget</see> and
9  /// <see cref="IEvent.EventPhase">IEvent.EventPhase</see>.
10  /// </summary>
11  /// <remarks>
12  /// <para>
13  /// It is intended
14  /// to be used by the DOM Events implementation to access the underlying
15  /// current target and event phase while dispatching a custom
16  /// <see cref="IEvent">IEvent</see> in the tree; it is also intended to be
17  /// implemented, and not used, by DOM applications.
18  /// </para>
19  /// <para>
20  /// The methods contained in this interface are not intended to be used by
21  /// a DOM application, especially during the dispatch on the Event object.
22  /// Changing the current target or the current phase may conduct into
23  /// unpredictable results of the event flow. The DOM Events implementation
24  /// should ensure that both methods return the appropriate current target
25  /// and phase before invoking each event listener on the current target to
26  /// protect DOM applications from malicious event listeners.
27  /// </para>
28  /// <para>
29  /// Note: If this interface is supported by the event object,
30  /// <see cref="IEvent.IsCustom">IEvent.IsCustom</see> must return
31  /// <c>true</c>.
32  /// </para>
33  /// </remarks>
34  public interface ICustomEvent
35    : IEvent
36  {
37    #region Properties
38   
39    #region DOM Level 3 Experimental
40   
41    /// <summary>
42    /// This method will return <c>true</c> if the method
43    /// <see cref="IEvent.StopPropagation">IEvent.StopPropagation</see> has been called
44    /// for this event, <c>false</c> in any other cases.
45    /// </summary>
46    /// <value>
47    /// <c>true</c> if the event propagation has been stopped in the
48    /// current group.
49    /// </value>
50    bool IsPropagationStopped
51    {
52      get;
53    }
54   
55    /// <summary>
56    /// The
57    /// <see cref="IsImmediatePropagationStopped">IsImmediatePropagationStopped</see>
58    /// method is used by the DOM Events implementation to know if the
59    /// method
60    /// <see cref="IEvent.StopImmediatePropagation">IEvent.StopImmediatePropagation</see>
61    /// has been called for this event. It returns <c>true</c> if the
62    /// method has been called, <c>false</c> otherwise.
63    /// </summary>
64    bool IsImmediatePropagationStopped
65    {
66      get;
67    }
68   
69    #endregion
70   
71    #endregion
72   
73    #region Methods
74   
75    #region DOM Level 3 Experimental
76   
77    /// <summary>
78    /// The <see cref="SetDispatchState">SetDispatchState</see> method is
79    /// used by the DOM Events implementation to set the values of
80    /// <see cref="IEvent.CurrentTarget">IEvent.CurrentTarget</see> and
81    /// <see cref="IEvent.EventPhase">IEvent.EventPhase</see>.
82    /// </summary>
83    /// <remarks>
84    /// It also reset the states of
85    /// <see cref="IsPropagationStopped">IsPropagationStopped</see> and
86    /// <see cref="IsImmediatePropagationStopped">IsImmediatePropagationStopped</see>.
87    /// </remarks>
88    /// <param name="target">
89    /// Specifies the new value for the
90    /// <see cref="IEvent.CurrentTarget">IEvent.CurrentTarget</see>
91    /// attribute.
92    /// </param>
93    /// <param name="phase">
94    /// Specifies the new value for the
95    /// <see cref="IEvent.EventPhase">IEvent.EventPhase</see> attribute.
96    /// </param>
97    void SetDispatchState(
98      IEventTarget target,
99      ushort phase);
100   
101    #endregion
102   
103    #endregion
104  }
105}
Note: See TracBrowser for help on using the repository browser.