(DISTFILES): Comment out a few missing files.
[mono-project.git] / mcs / class / System.Windows.Forms / WINELib / StatusBarDrawItemEventArgs.cs
blobb2b317408ccb6c4878433ec91ec647ee08388bae
1 //
2 // System.Windows.Forms.StatusBarDrawItemEventArgs
3 //
4 // Author:
5 // stubbed out by Richard Baumann (biochem333@nyc.rr.com)
6 // Partially completed by Dennis Hayes (dennish@raytek.com)
7 //
8 // (C) Ximian, Inc., 2002
9 //
10 using System.Drawing;
11 namespace System.Windows.Forms {
13 /// <summary>
14 /// Provides data for the DrawItem event.
15 /// </summary>
16 public class StatusBarDrawItemEventArgs : DrawItemEventArgs {
18 private StatusBarPanel panel;
20 /// --- Constructor ---
21 public StatusBarDrawItemEventArgs(Graphics g, Font font,
22 Rectangle r, int itemId, DrawItemState itemState,
23 StatusBarPanel panel, Color foreColor, Color backColor)
24 : base(g, font, r, itemId, itemState, foreColor, backColor) {
25 this.panel = panel;
28 public StatusBarDrawItemEventArgs(Graphics g, Font font,
29 Rectangle r, int itemId, DrawItemState itemState, StatusBarPanel panel)
30 : base(g, font, r, itemId, itemState) {
31 this.panel = panel;
34 #region Public Properties
35 public StatusBarPanel Panel
37 get {
38 return panel;
41 #endregion
43 #region Public Methods
44 /// <summary>
45 /// Equality Operator
46 /// </summary>
47 ///
48 /// <remarks>
49 /// Compares two StatusBarDrawItemEventArgs objects.
50 /// The return value is based on the equivalence of
51 /// the BackColor, Bounds, Font, ForeColor, Graphics,
52 /// Index, Panel, and State properties of the two
53 /// StatusBarDrawItemEventArgs.
54 /// </remarks>
55 public static bool operator == (StatusBarDrawItemEventArgs objA, StatusBarDrawItemEventArgs objB)
57 return ((objA.panel == objB.panel) && ((DrawItemEventArgs) objA == (DrawItemEventArgs) objB));
60 /// <summary>
61 /// Inequality Operator
62 /// </summary>
63 ///
64 /// <remarks>
65 /// Compares two StatusBarDrawItemEventArgs objects.
66 /// The return value is based on the equivalence of
67 /// the BackColor, Bounds, Font, ForeColor, Graphics,
68 /// Index, Panel, and State properties of the two
69 /// StatusBarDrawItemEventArgs.
70 /// </remarks>
71 public static bool operator != (StatusBarDrawItemEventArgs objA, StatusBarDrawItemEventArgs objB)
73 return ((objA.panel != objB.panel) || ((DrawItemEventArgs) objA != (DrawItemEventArgs) objB));
76 /// <summary>
77 /// Equals Method
78 /// </summary>
79 ///
80 /// <remarks>
81 /// Checks equivalence of this
82 /// StatusBarDrawItemEventArgs and another object.
83 /// </remarks>
84 public override bool Equals (object obj)
86 if (!(obj is StatusBarDrawItemEventArgs))return false;
87 return (this == (StatusBarDrawItemEventArgs) obj);
90 /// <summary>
91 /// GetHashCode Method
92 /// </summary>
93 ///
94 /// <remarks>
95 /// Calculates a hashing value.
96 /// Returns DrawItemEventArgs.GetHashCode().
97 /// </remarks>
98 public override int GetHashCode ()
100 // FIXME: In a perfect world, get hashcode would include
101 // Panel, but this shouldbe good enough.
102 return base.GetHashCode();
105 /// <summary>
106 /// ToString Method
107 /// </summary>
109 /// <remarks>
110 /// Formats the StatusBarDrawItemEventArgs as a string.
111 /// </remarks>
112 public override string ToString ()
114 return base.ToString() + panel.ToString();
116 #endregion