**** Merged from MCS ****
[mono-project.git] / mcs / class / System.Windows.Forms / WINELib / StatusBarPanelClickEventArgs.cs
blob3f8fc50e254cd45db538daacd33e93bb77aa2f7c
1 //
2 // System.Windows.Forms.StatusBarPanelClickEventArgs
3 //
4 // Author:
5 // stubbed out by Richard Baumann (biochem333@nyc.rr.com)
6 // Partially completed by Dennis Hayes (dennish@raytek.com)
7 // Gianandrea Terzi (gianandrea.terzi@lario.com)
8 //
9 // (C) Ximian, Inc., 2002
12 namespace System.Windows.Forms {
14 /// <summary>
15 /// Provides data for the PanelClick event.
16 /// </summary>
17 public class StatusBarPanelClickEventArgs : MouseEventArgs {
19 private StatusBarPanel panel;
21 /// --- Constructor ---
22 public StatusBarPanelClickEventArgs(StatusBarPanel panel, MouseButtons button, int clicks, int x, int y) : base(button, clicks, x, y, 0)
24 this.panel = panel;
27 #region Public Properties
29 /// <summary>
30 /// StatusBarPanel Property
31 /// </summary>
32 ///
33 /// <remarks>
34 /// Gets the StatusBarPanel to draw.
35 /// </remarks>
36 public StatusBarPanel StatusBarPanel
38 get
40 return panel;
45 #endregion
47 #region Public Methods
48 /// <summary>
49 /// Equality Operator
50 /// </summary>
51 ///
52 /// <remarks>
53 /// Compares two StatusBarPanelClickEventArgs objects.
54 /// The return value is based on the equivalence of
55 /// the StatusBarPanel, Button, Clicks, X, and Y
56 /// properties of the two StatusBarPanelClickEventArgs.
57 /// </remarks>
58 public static bool operator == (StatusBarPanelClickEventArgs objA, StatusBarPanelClickEventArgs objB)
60 return ((objA.panel == objB.panel) && (objA.Button == objB.Button) && (objA.Clicks == objB.Clicks) && (objA.X == objB.X) && (objA.Y == objB.Y));
63 /// <summary>
64 /// Inequality Operator
65 /// </summary>
66 ///
67 /// <remarks>
68 /// Compares two StatusBarPanelClickEventArgs objects.
69 /// The return value is based on the equivalence of
70 /// the StatusBarPanel, Button, Clicks, X, and Y
71 /// properties of the two StatusBarPanelClickEventArgs.
72 /// </remarks>
73 public static bool operator != (StatusBarPanelClickEventArgs objA, StatusBarPanelClickEventArgs objB)
75 return ((objA.panel != objB.panel) || (objA.Button != objB.Button) || (objA.Clicks != objB.Clicks) || (objA.X != objB.X) || (objA.Y != objB.Y));
78 /// <summary>
79 /// Equals Method
80 /// </summary>
81 ///
82 /// <remarks>
83 /// Checks equivalence of this
84 /// StatusBarPanelClickEventArgs and another
85 /// object.
86 /// </remarks>
87 public override bool Equals (object obj)
89 if (!(obj is StatusBarPanelClickEventArgs))return false;
90 return (this == (StatusBarPanelClickEventArgs) obj);
93 /// <summary>
94 /// GetHashCode Method
95 /// </summary>
96 ///
97 /// <remarks>
98 /// Calculates a hashing value.
99 /// </remarks>
100 public override int GetHashCode ()
102 return unchecked(panel.GetHashCode() * base.GetHashCode());
105 /// <summary>
106 /// ToString Method
107 /// </summary>
109 /// <remarks>
110 /// Formats the StatusBarPanelClickEventArgs as a string.
111 /// </remarks>
112 [MonoTODO]
113 public override string ToString ()
115 //FIXME: add class specific stuff;
116 return base.ToString();
118 #endregion