**** Merged from MCS ****
[mono-project.git] / mcs / class / System.Windows.Forms / WINELib / PaintEventArgs.cs
blob773c2abe0084f0b0139f22e7809c2c5a6652307b
1 //
2 // System.Windows.Forms.PaintEventArgs.cs
3 //
4 // Author:
5 // stubbed out by Paul Osman (paul.osman@sympatico.ca)
6 // 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 // This is only a template. Nothing is implemented yet.
18 // </summary>
20 public class PaintEventArgs : EventArgs, IDisposable {
22 #region Fields
24 private Graphics mgraphics;
25 private Rectangle mclipRect;
27 #endregion
30 public PaintEventArgs(Graphics graphics, Rectangle clipRect )
32 this.mgraphics = graphics;
33 this.mclipRect = clipRect;
37 #region Public Properties
38 public Rectangle ClipRectangle
40 get {
41 return mclipRect;
45 public Graphics Graphics {
46 get {
47 return mgraphics;
50 #endregion
52 #region Public Methods
54 [MonoTODO]
55 public void Dispose()
57 throw new NotImplementedException ();
60 /// <summary>
61 /// Equality Operator
62 /// </summary>
63 ///
64 /// <remarks>
65 /// Compares two PaintEventArgs objects.
66 /// The return value is based on the equivalence of
67 /// Graphics and ClipRectangle Property
68 /// of the two PaintEventArgs.
69 /// </remarks>
70 public static bool operator == (PaintEventArgs PaintEventArgsA, PaintEventArgs PaintEventArgsB)
72 return (PaintEventArgsA.Graphics == PaintEventArgsB.Graphics) && (PaintEventArgsA.ClipRectangle == PaintEventArgsB.ClipRectangle);
75 /// <summary>
76 /// Inequality Operator
77 /// </summary>
78 ///
79 /// <remarks>
80 /// Compares two PaintEventArgs objects.
81 /// The return value is based on the equivalence of
82 /// Graphics and ClipRectangle Property
83 /// of the two PaintEventArgs.
84 /// </remarks>
85 public static bool operator != (PaintEventArgs PaintEventArgsA, PaintEventArgs PaintEventArgsB)
87 return (PaintEventArgsA.Graphics != PaintEventArgsB.Graphics) || (PaintEventArgsA.ClipRectangle != PaintEventArgsB.ClipRectangle);
90 /// <summary>
91 /// Equals Method
92 /// </summary>
93 ///
94 /// <remarks>
95 /// Checks equivalence of this
96 /// PaintEventArgs and another
97 /// object.
98 /// </remarks>
99 public override bool Equals (object obj)
101 if (!(obj is PaintEventArgs))return false;
102 return (this == (PaintEventArgs) obj);
105 /// <summary>
106 /// GetHashCode Method
107 /// </summary>
109 /// <remarks>
110 /// Calculates a hashing value.
111 /// </remarks>
112 [MonoTODO]
113 public override int GetHashCode ()
115 //FIXME: add class specific stuff;
116 return base.GetHashCode();
119 /// <summary>
120 /// ToString Method
121 /// </summary>
123 /// <remarks>
124 /// Formats the object as a string.
125 /// </remarks>
126 [MonoTODO]
127 public override string ToString ()
129 //FIXME: add class specific stuff;
130 return base.ToString();
133 #endregion
135 #region Protected Methods
137 [MonoTODO]
138 protected virtual void Dispose(bool disposing)
140 throw new NotImplementedException ();
143 #endregion