**** Merged from MCS ****
[mono-project.git] / mcs / class / System.Windows.Forms / WINELib / HelpEventArgs.cs
blob87fa70888396a29abafdf7bdfbb123220f708782
1 //
2 // System.Windows.Forms.HelpEventArgs.cs
3 //
4 // Author:
5 // stubbed out by Daniel Carrera (dcarrera@math.toronto.edu)
6 // Partially completed by Dennis Hayes (dennish@raytek.com)
7 // Gianandrea Terzi (gianandrea.terzi@lario.com)
8 //
9 // (C) 2002 Ximian, Inc
11 using System.Drawing;
13 namespace System.Windows.Forms {
15 // <summary>
16 // Complete.
17 // </summary>
19 public class HelpEventArgs : EventArgs {
21 #region Fields
22 private Point mousePos;
23 private bool handled;
24 #endregion
27 // --- Constructor
29 public HelpEventArgs(Point mousePos)
31 this.mousePos = mousePos;
32 handled = false; // Gian : hadled is false, otherwise all events are managed by user by default.
35 #region Public Properties
36 public bool Handled
38 get {
39 return handled;
41 set {
42 handled = value;
45 public Point MousePos {
46 get {
47 return mousePos;
50 #endregion
52 #region Public Methods
54 /// <summary>
55 /// Equality Operator
56 /// </summary>
57 ///
58 /// <remarks>
59 /// Compares two HelpEventArgs objects.
60 /// The return value is based on the equivalence of
61 /// Handled and MousePos Property
62 /// of the two HelpEventArgs.
63 /// </remarks>
64 public static bool operator == (HelpEventArgs HelpEventArgsA, HelpEventArgs HelpEventArgsB)
66 return (HelpEventArgsA.Handled == HelpEventArgsB.Handled) &&
67 (HelpEventArgsA.MousePos == HelpEventArgsB.MousePos);
71 /// <summary>
72 /// Inequality Operator
73 /// </summary>
74 ///
75 /// <remarks>
76 /// Compares two HelpEventArgs objects.
77 /// The return value is based on the equivalence of
78 /// Handled and MousePos Property
79 /// of the two HelpEventArgs.
80 /// </remarks>
81 public static bool operator != (HelpEventArgs HelpEventArgsA, HelpEventArgs HelpEventArgsB)
83 return (HelpEventArgsA.Handled != HelpEventArgsB.Handled) ||
84 (HelpEventArgsA.MousePos != HelpEventArgsB.MousePos);
88 /// <summary>
89 /// Equals Method
90 /// </summary>
91 ///
92 /// <remarks>
93 /// Checks equivalence of this
94 /// HelpEventArgs and another
95 /// object.
96 /// </remarks>
97 public override bool Equals (object obj)
99 if (!(obj is HelpEventArgs))return false;
100 return (this == (HelpEventArgs) obj);
103 /// <summary>
104 /// GetHashCode Method
105 /// </summary>
107 /// <remarks>
108 /// Calculates a hashing value.
109 /// </remarks>
110 [MonoTODO]
111 public override int GetHashCode ()
113 //FIXME: add class specific stuff;
114 return base.GetHashCode();
117 /// <summary>
118 /// ToString Method
119 /// </summary>
121 /// <remarks>
122 /// Formats the object as a string.
123 /// </remarks>
124 [MonoTODO]
125 public override string ToString ()
127 //FIXME: add class specific stuff;
128 return base.ToString() + " HelpEventArgs";
132 #endregion