Author: pbartok
Date: 2005-05-05 23:28:11 -0400 (Thu, 05 May 2005)
New Revision: 44103

Added:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/AxHost.cs
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ErrorProvider.cs
Modified:
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ButtonBase.cs
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/GroupBox.cs
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Label.cs
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/LinkLabel.cs
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/PictureBox.cs
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/SizeGrip.cs
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Theme.cs
   
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolTip.cs
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/UpDownBase.cs
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUI.cs
   trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
Log:
2005-05-05  Peter Bartok  <[EMAIL PROTECTED]>
        * XplatUI.cs: Updated revision
        * Form.cs: Removed enless loop
        * GroupBox.cs (OnPaint): Added call to base.OnPaint()
        * Label.cs (OnPaint): Added call to base.OnPaint()
        * ToolTip.cs: Made ToolTipWindow reusable for other controls
        * LinkLabel.cs (OnPaint): Added call to base.OnPaint()
        * UpDownBase.cs (OnPaint): Moved base.OnPaint() call to end of method
        * AxHost.cs: Added
        * ButtonBase.cs: Moved base.OnPaint() call to end of method
        * ThemeWin32Classic.cs: Replaced references to ToolTip with references
          to ToolTip.ToolTipWindow for drawing and size methods; this allows
          reuse of ToolTipWindow by other controls
        * SizeGrip.cs: Moved base.OnPaint() call to end of method
        * XplatUIX11.cs: Now clipping drawing area (experimental)
        * PictureBox.cs: Moved base.OnPaint() call to end of method
        * Theme.cs: Fixed ToolTip abstracts to match new format
        * ErrorProvider.cs: Implemented

2005-05-05  Jordi Mas i Hernandez <[EMAIL PROTECTED]>



Added: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/AxHost.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/AxHost.cs        
2005-05-06 03:05:50 UTC (rev 44102)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/AxHost.cs        
2005-05-06 03:28:11 UTC (rev 44103)
@@ -0,0 +1,922 @@
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// Copyright (c) 2005 Novell, Inc. (http://www.novell.com)
+//
+// Authors:
+//     Peter Bartok    <[EMAIL PROTECTED]>
+//
+//
+
+// NOT COMPLETE
+
+using System;
+using System.ComponentModel;
+using System.Drawing;
+using System.IO;
+using System.Runtime.InteropServices;
+using System.Runtime.Serialization;
+
+
+namespace System.Windows.Forms {
+       [DefaultEvent("Enter")]
+       [Designer("System.Windows.Forms.Design.AxHostDesigner, " + 
Consts.AssemblySystem_Design)]
+       [DesignTimeVisible(false)]
+       [ToolboxItem(false)]
+       public abstract class AxHost : Control, ISupportInitialize, 
ICustomTypeDescriptor {
+               #region AxHost Subclasses
+                       #region AxHost.ActiveXInvokeKind Enum
+                       public enum ActiveXInvokeKind {
+                               MethodInvoke    = 0,
+                               PropertyGet     = 1,
+                               PropertySet     = 2
+                       }
+                       #endregion      // AxHost.ActiveXInvokeKind Enum
+
+                       #region AxHost.AxComponentEditor Class
+                       public class AxComponentEditor : 
System.Windows.Forms.Design.WindowsFormsComponentEditor {
+                               [MonoTODO]
+                               public AxComponentEditor() {
+                                       throw new 
NotImplementedException("COM/ActiveX support is not implemented");
+                               }
+
+                               [MonoTODO]
+                               public override bool 
EditComponent(ITypeDescriptorContext context, object obj, IWin32Window parent) {
+                                       throw new 
NotImplementedException("COM/ActiveX support is not implemented");
+                               }
+                       }
+                       #endregion      // AxHost.AxComponentEditor Class
+
+                       #region AxHost.ClsidAttribute
+                       [AttributeUsage(AttributeTargets.Class,Inherited=false)]
+                       public sealed class ClsidAttribute : Attribute {
+                               string clsid;
+
+                               public ClsidAttribute (string clsid) {
+                                       this.clsid = clsid;
+                               }
+
+                               public string Value {
+                                       get {
+                                               return clsid;
+                                       }
+                               }
+                       }
+                       #endregion AxHost.ClsidAttribute
+
+                       #region AxHost.ConnectionPointCookie
+                       [ComVisible(false)]
+                       public class ConnectionPointCookie {
+                               [MonoTODO]
+                               public ConnectionPointCookie(object source, 
object sink, Type eventInterface) {
+                                       throw new 
NotImplementedException("COM/ActiveX support is not implemented");
+                               }
+
+                               [MonoTODO]
+                               public void Disconnect() {
+                                       throw new 
NotImplementedException("COM/ActiveX support is not implemented");
+                               }
+
+                               [MonoTODO]
+                               ~ConnectionPointCookie() {
+                                       throw new 
NotImplementedException("COM/ActiveX support is not implemented");
+                               }
+                       }
+                       #endregion      // AxHost.ConnectionPointCookie
+               
+                       #region AxHost.InvalidActiveXStateException  Class
+                       public class InvalidActiveXStateException : Exception {
+                               [MonoTODO]
+                               public InvalidActiveXStateException(string 
name, ActiveXInvokeKind kind) {
+                                       throw new 
NotImplementedException("COM/ActiveX support is not implemented");
+                               }
+
+                               [MonoTODO]
+                               public override string ToString() {
+                                       throw new 
NotImplementedException("COM/ActiveX support is not implemented");
+                               }
+                       }
+                       #endregion      // AxHost.InvalidActiveXStateException  
Class
+                       
+                       #region AxHost.State Class
+                       [Serializable]
+                       [TypeConverter("System.ComponentModel.TypeConverter, 
System, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
+                       public class State : ISerializable {
+                               [MonoTODO]
+                               public State(Stream ms, int storageType, bool 
manualUpdate, string licKey) {
+                                       throw new 
NotImplementedException("COM/ActiveX support is not implemented");
+                               }
+
+                               [MonoTODO]
+                               void 
ISerializable.GetObjectData(SerializationInfo si,StreamingContext context) {
+                                       throw new 
NotImplementedException("COM/ActiveX support is not implemented");
+                               }
+                       }
+                       #endregion      // AxHost.State Class
+
+                       #region AxHost.TypeLibraryTimeStampAttribute Class
+                       [AttributeUsage(AttributeTargets.Assembly, 
Inherited=false)]
+                       public sealed class TypeLibraryTimeStampAttribute : 
Attribute {
+                               [MonoTODO]
+                               public TypeLibraryTimeStampAttribute(string 
timestamp) {
+                                       throw new 
NotImplementedException("COM/ActiveX support is not implemented");
+                               }
+
+                               [MonoTODO]
+                               public DateTime Value {
+                                       get {
+                                               throw new 
NotImplementedException("COM/ActiveX support is not implemented");
+                                       }
+                               }
+                       }
+                       #endregion      // AxHost.TypeLibraryTimeStampAttribute 
Class
+
+                       #region AxHost.StateConverter Class
+                       public class StateConverter : 
System.ComponentModel.TypeConverter {
+                               [MonoTODO]
+                               public StateConverter() {
+                                       throw new 
NotImplementedException("COM/ActiveX support is not implemented");
+                               }
+
+                               [MonoTODO]
+                               public override bool 
CanConvertFrom(ITypeDescriptorContext context, Type sourceType) {
+                                       throw new 
NotImplementedException("COM/ActiveX support is not implemented");
+                               }
+
+                               [MonoTODO]
+                               public override bool 
CanConvertTo(ITypeDescriptorContext context, Type destinationType) {
+                                       throw new 
NotImplementedException("COM/ActiveX support is not implemented");
+                               }
+
+                               [MonoTODO]
+                               public override object 
ConvertFrom(ITypeDescriptorContext context, System.Globalization.CultureInfo 
culture, object value) {
+                                       throw new 
NotImplementedException("COM/ActiveX support is not implemented");
+                               }
+
+                               [MonoTODO]
+                               public override object 
ConvertTo(ITypeDescriptorContext context, System.Globalization.CultureInfo 
culture, object value, Type destinationType) {
+                                       throw new 
NotImplementedException("COM/ActiveX support is not implemented");
+                               }
+                       }
+                       #endregion      // AxHost.StateConverter Class
+               #endregion      // AxHost Subclasses
+
+               #region Protected Constructors
+               protected AxHost(string clsid) {
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented");
+               }
+
+               protected AxHost(string clsid, int flags) {
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented");
+               }
+               #endregion      // Public Instance Properties
+
+               #region Public Instance Properties
+               [Browsable(false)]
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               [MonoTODO]
+               public override Color BackColor {
+                       get {
+                               throw new NotImplementedException("COM/ActiveX 
support is not implemented");
+                       }
+
+                       set {
+                               throw new NotImplementedException("COM/ActiveX 
support is not implemented");
+                       }
+               }
+               
+               [Browsable(false)]
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               [MonoTODO]
+               public override Image BackgroundImage {
+                       get {
+                               throw new NotImplementedException("COM/ActiveX 
support is not implemented");
+                       }
+
+                       set {
+                               throw new NotImplementedException("COM/ActiveX 
support is not implemented");
+                       }
+               }
+               
+               [Browsable(false)]
+               [EditorBrowsable(EditorBrowsableState.Advanced)]
+               [MonoTODO]
+               public ContainerControl ContainingControl {
+                       get {
+                               throw new NotImplementedException("COM/ActiveX 
support is not implemented");
+                       }
+
+                       set {
+                               throw new NotImplementedException("COM/ActiveX 
support is not implemented");
+                       }
+               }
+               
+               [Browsable(false)]
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               [MonoTODO]
+               public override ContextMenu ContextMenu {
+                       get {
+                               throw new NotImplementedException("COM/ActiveX 
support is not implemented");
+                       }
+
+                       set {
+                               throw new NotImplementedException("COM/ActiveX 
support is not implemented");
+                       }
+               }
+               
+               [Browsable(false)]
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               [MonoTODO]
+               public override Cursor Cursor {
+                       get {
+                               throw new NotImplementedException("COM/ActiveX 
support is not implemented");
+                       }
+
+                       set {
+                               throw new NotImplementedException("COM/ActiveX 
support is not implemented");
+                       }
+               }
+               
+               [Browsable(false)]
+               
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
+               [EditorBrowsable(EditorBrowsableState.Advanced)]
+               [MonoTODO]
+               public bool EditMode {
+                       get {
+                               throw new NotImplementedException("COM/ActiveX 
support is not implemented");
+                       }
+               }
+
+               [Browsable(false)]
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               [MonoTODO]
+               public new virtual bool Enabled {
+                       get {
+                               throw new NotImplementedException("COM/ActiveX 
support is not implemented");
+                       }
+
+                       set {
+                               throw new NotImplementedException("COM/ActiveX 
support is not implemented");
+                       }
+               }
+               
+               [Browsable(false)]
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               [MonoTODO]
+               public override Font Font {
+                       get {
+                               throw new NotImplementedException("COM/ActiveX 
support is not implemented");
+                       }
+
+                       set {
+                               throw new NotImplementedException("COM/ActiveX 
support is not implemented");
+                       }
+               }
+               
+               [Browsable(false)]
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               [MonoTODO]
+               public override Color ForeColor {
+                       get { 
+                               throw new NotImplementedException("COM/ActiveX 
support is not implemented");
+                       }
+
+                       set {
+                               throw new NotImplementedException("COM/ActiveX 
support is not implemented");
+                       }
+               }
+               
+               [Browsable(false)]
+               
[DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
+               [EditorBrowsable(EditorBrowsableState.Advanced)]
+               [MonoTODO]
+               public bool HasAboutBox {
+                       get { 
+                               throw new NotImplementedException("COM/ActiveX 
support is not implemented");
+                       }
+               }
+               
+               [Browsable(false)]
+               [DefaultValue(null)]
+               [EditorBrowsable(EditorBrowsableState.Advanced)]
+               [MonoTODO]
+               [RefreshProperties(RefreshProperties.All)]
+               public AxHost.State OcxState {
+                       get {
+                               throw new NotImplementedException("COM/ActiveX 
support is not implemented");
+                       }
+
+                       set {
+                               throw new NotImplementedException("COM/ActiveX 
support is not implemented");
+                       }
+               }
+               
+               [Browsable(false)]
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               [MonoTODO]
+               [Localizable(true)]
+               public new virtual bool RightToLeft {
+                       get {
+                               throw new NotImplementedException("COM/ActiveX 
support is not implemented");
+                       }
+
+                       set {
+                               throw new NotImplementedException("COM/ActiveX 
support is not implemented");
+                       }
+               }
+               
+               [MonoTODO]
+               public override ISite Site {
+                       set {
+                               throw new NotImplementedException("COM/ActiveX 
support is not implemented");
+                       }
+               }
+               
+               [Browsable(false)]
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               [MonoTODO]
+               public override string Text {
+                       get {
+                               throw new NotImplementedException("COM/ActiveX 
support is not implemented");
+                       }
+
+                       set {
+                               throw new NotImplementedException("COM/ActiveX 
support is not implemented");
+                       }
+               }
+               #endregion      // Protected Constructors
+               
+               #region Protected Instance Properties
+               [MonoTODO]
+               protected override CreateParams CreateParams {
+                       get {
+                               throw new NotImplementedException("COM/ActiveX 
support is not implemented");
+                       }
+               }
+               
+               [MonoTODO]
+               protected override Size DefaultSize {
+                       get {
+                               throw new NotImplementedException("COM/ActiveX 
support is not implemented");
+                       }
+               }
+               #endregion      // Protected Instance Properties
+
+               #region Protected Static Methods
+               [MonoTODO]
+               [CLSCompliant(false)]
+               [EditorBrowsable(EditorBrowsableState.Advanced)]
+               protected static Color GetColorFromOleColor(uint color){
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented"); 
+               }
+
+               [MonoTODO]
+               [EditorBrowsable(EditorBrowsableState.Advanced)]
+               protected static Font GetFontFromIFont(object font){
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented"); 
+               }
+
+               [MonoTODO]
+               [EditorBrowsable(EditorBrowsableState.Advanced)]
+               protected static Font GetFontFromIFontDisp(object font){
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented"); 
+               }
+
+               [MonoTODO]
+               [EditorBrowsable(EditorBrowsableState.Advanced)]
+               protected static object GetIFontDispFromFont(Font font){
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented"); 
+               }
+
+               [MonoTODO]
+               [EditorBrowsable(EditorBrowsableState.Advanced)]
+               protected static object GetIFontFromFont(Font font){
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented"); 
+               }
+
+               [MonoTODO]
+               [EditorBrowsable(EditorBrowsableState.Advanced)]
+               protected static object GetIPictureDispFromPicture(Image image){
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented"); 
+               }
+
+               [MonoTODO]
+               [EditorBrowsable(EditorBrowsableState.Advanced)]
+               protected static object GetIPictureFromCursor(Cursor cursor){
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented"); 
+               }
+
+               [MonoTODO]
+               [EditorBrowsable(EditorBrowsableState.Advanced)]
+               protected static object GetIPictureFromPicture(Image image){
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented"); 
+               }
+
+               [MonoTODO]
+               [EditorBrowsable(EditorBrowsableState.Advanced)]
+               protected static double GetOADateFromTime(DateTime time){
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented"); 
+               }
+
+               [MonoTODO]
+               [CLSCompliant(false)]
+               [EditorBrowsable(EditorBrowsableState.Advanced)]
+               protected static uint GetOleColorFromColor(Color color){
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented"); 
+               }
+
+               [MonoTODO]
+               [EditorBrowsable(EditorBrowsableState.Advanced)]
+               protected static Image GetPictureFromIPicture(object picture){
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented"); 
+               }
+
+               [MonoTODO]
+               [EditorBrowsable(EditorBrowsableState.Advanced)]
+               protected static Image GetPictureFromIPictureDisp(object 
picture){
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented"); 
+               }
+
+               [MonoTODO]
+               [EditorBrowsable(EditorBrowsableState.Advanced)]
+               protected static DateTime GetTimeFromOADate(double date){
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented"); 
+               }
+               #endregion      // Protected Static Methods
+
+               #region Public Instance Methods
+               [EditorBrowsable(EditorBrowsableState.Advanced)]
+               [MonoTODO]
+               public void BeginInit() {
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented");
+               }
+               
+               [MonoTODO]
+               public void DoVerb(int verb){
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented");
+               }
+
+               [EditorBrowsable(EditorBrowsableState.Advanced)]
+               [MonoTODO]
+               public virtual void EndInit() {
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented");
+               }
+
+               [EditorBrowsable(EditorBrowsableState.Advanced)]
+               [MonoTODO]
+               public object GetOcx() {
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented");
+               }
+               
+               [MonoTODO]
+               public bool HasPropertyPages() {
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented");
+               }
+               
+               [EditorBrowsable(EditorBrowsableState.Advanced)]
+               [MonoTODO]
+               public void InvokeEditMode(){
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented");
+               }
+
+               [EditorBrowsable(EditorBrowsableState.Advanced)]
+               [MonoTODO]
+               public void MakeDirty(){
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented");
+               }
+
+               [MonoTODO]
+               public override bool PreProcessMessage(ref Message msg) {
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented");
+               }
+
+               [MonoTODO]
+               public void ShowAboutBox() {
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented");
+               }
+               
+               [MonoTODO]
+               public void ShowPropertyPages() {
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented");
+               }
+               
+               [MonoTODO]
+               public void ShowPropertyPages(Control control) {
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented");
+               }
+               #endregion      // Public Instance Methods
+
+               #region Protected Instance Methods
+               [MonoTODO]
+               protected virtual void AttachInterfaces() {
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented");
+               }
+               
+               [MonoTODO]
+               protected override void CreateHandle() {
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented");
+               }
+               
+               [EditorBrowsable(EditorBrowsableState.Advanced)]
+               [MonoTODO]
+               protected virtual void CreateSink(){
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented");
+               }
+               
+               [MonoTODO]
+               protected override void DestroyHandle() {
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented");
+               }
+
+               [EditorBrowsable(EditorBrowsableState.Advanced)]
+               [MonoTODO]
+               protected virtual void DetachSink(){
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented");
+               }
+
+               [MonoTODO]
+               protected override void Dispose(bool disposing) {
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented");
+               }
+               
+               [MonoTODO]
+               protected override bool IsInputChar(char charCode) {
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented");
+               }
+               
+               [MonoTODO]
+               protected override void OnBackColorChanged(EventArgs e) {
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented");
+               }
+               
+               [MonoTODO]
+               protected override void OnFontChanged(EventArgs e) {
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented");
+               }
+               
+               [MonoTODO]
+               protected override void OnForeColorChanged(EventArgs e) {
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented");
+               }
+               
+               [MonoTODO]
+               protected override void OnHandleCreated(EventArgs e) {
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented");
+               }
+
+               [MonoTODO]
+               protected virtual void OnInPlaceActive() {
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented");
+               }
+               
+               [EditorBrowsable(EditorBrowsableState.Advanced)]
+               [MonoTODO]
+               protected override void OnLostFocus(EventArgs e) {
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented");
+               }
+               
+               [MonoTODO]
+               protected override bool ProcessDialogKey(Keys keyData) {
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented");
+               }
+
+               [MonoTODO]
+               protected override bool ProcessMnemonic(char charCode) {
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented");
+               }
+
+               [EditorBrowsable(EditorBrowsableState.Advanced)]
+               [MonoTODO]
+               protected bool PropsValid(){
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented"); 
+               }
+
+               [EditorBrowsable(EditorBrowsableState.Advanced)]
+               [MonoTODO]
+               protected void RaiseOnMouseDown(short button, short shift, int 
x, int y){
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented");
+               }
+
+               [EditorBrowsable(EditorBrowsableState.Advanced)]
+               [MonoTODO]
+               protected void RaiseOnMouseDown(short button, short shift, 
float x, float y){
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented");
+               }
+
+               [EditorBrowsable(EditorBrowsableState.Advanced)]
+               [MonoTODO]
+               protected void RaiseOnMouseDown(object o1, object o2, object 
o3, object o4){
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented");
+               }
+
+               [EditorBrowsable(EditorBrowsableState.Advanced)]
+               [MonoTODO]
+               protected void RaiseOnMouseMove(short button, short shift, int 
x, int y){
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented");
+               }
+
+               [EditorBrowsable(EditorBrowsableState.Advanced)]
+               [MonoTODO]
+               protected void RaiseOnMouseMove(short button, short shift, 
float x, float y){
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented");
+               }
+
+               [EditorBrowsable(EditorBrowsableState.Advanced)]
+               [MonoTODO]
+               protected void RaiseOnMouseMove(object o1, object o2, object 
o3, object o4){
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented");
+               }
+
+               [EditorBrowsable(EditorBrowsableState.Advanced)]
+               [MonoTODO]
+               protected void RaiseOnMouseUp(short button, short shift, int x, 
int y){
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented");
+               }
+
+               [EditorBrowsable(EditorBrowsableState.Advanced)]
+               [MonoTODO]
+               protected void RaiseOnMouseUp(short button, short shift, float 
x, float y){
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented");
+               }
+
+               [EditorBrowsable(EditorBrowsableState.Advanced)]
+               [MonoTODO]
+               protected void RaiseOnMouseUp(object o1, object o2, object o3, 
object o4){
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented");
+               }
+
+               [MonoTODO]
+               protected void SetAboutBoxDelegate(AxHost.AboutBoxDelegate d) {
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented");
+               }
+               
+               [MonoTODO]
+               protected override void SetBoundsCore(int x, int y, int width, 
int height, BoundsSpecified specified) {
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented");
+               }
+               
+               [MonoTODO]
+               protected override void SetVisibleCore(bool value) {
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented");
+               }
+               
+               [MonoTODO]
+               protected override void WndProc(ref Message m) {
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented");
+               }
+               #endregion      // Protected Instance Methods
+
+               #region Private Instance Methods
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               [MonoTODO]
+               private bool ShouldSerializeContainingControl() {
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented");
+               }
+               #endregion      // Protected Instance Methods
+
+               #region Events
+               [Browsable(false)]
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public event EventHandler               BackColorChanged;
+
+               [Browsable(false)]
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public event EventHandler               BackgroundImageChanged;
+
+               [Browsable(false)]
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public event EventHandler               BindingContextChanged;
+
+               [Browsable(false)]
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public event UICuesEventHandler         ChangeUICues;
+
+               [Browsable(false)]
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public event EventHandler               Click;
+
+               [Browsable(false)]
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public event EventHandler               ContextMenuChanged;
+
+               [Browsable(false)]
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public event EventHandler               CursorChanged;
+
+               [Browsable(false)]
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public event EventHandler               DoubleClick;
+
+               [Browsable(false)]
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public event DragEventHandler           DragDrop;
+
+               [Browsable(false)]
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public event DragEventHandler           DragEnter;
+
+               [Browsable(false)]
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public event EventHandler               DragLeave;
+
+               [Browsable(false)]
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public event DragEventHandler           DragOver;
+
+               [Browsable(false)]
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public event EventHandler               EnabledChanged;
+
+               [Browsable(false)]
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public event EventHandler               FontChanged;
+
+               [Browsable(false)]
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public event EventHandler               ForeColorChanged;
+
+               [Browsable(false)]
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public event GiveFeedbackEventHandler   GiveFeedback;
+
+               [Browsable(false)]
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public event HelpEventHandler           HelpRequested;
+
+               [Browsable(false)]
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public event EventHandler               ImeModeChanged;
+
+               [Browsable(false)]
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public event KeyEventHandler            KeyDown;
+
+               [Browsable(false)]
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public event KeyPressEventHandler       KeyPress;
+
+               [Browsable(false)]
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public event KeyEventHandler            KeyUp;
+
+               [Browsable(false)]
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public event LayoutEventHandler         Layout;
+
+               [Browsable(false)]
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public event MouseEventHandler          MouseDown;
+
+               [Browsable(false)]
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public event EventHandler               MouseEnter;
+
+               [Browsable(false)]
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public event EventHandler               MouseHover;
+
+               [Browsable(false)]
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public event EventHandler               MouseLeave;
+
+               [Browsable(false)]
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public event MouseEventHandler          MouseMove;
+
+               [Browsable(false)]
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public event MouseEventHandler          MouseUp;
+
+               [Browsable(false)]
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public event MouseEventHandler          MouseWheel;
+
+               [Browsable(false)]
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public event PaintEventHandler          Paint;
+
+               [Browsable(false)]
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public event QueryAccessibilityHelpEventHandler 
QueryAccessibilityHelp;
+
+               [Browsable(false)]
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public event QueryContinueDragEventHandler      
QueryContinueDrag;
+
+               [Browsable(false)]
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public event EventHandler               RightToLeftChanged;
+
+               [Browsable(false)]
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public event EventHandler               StyleChanged;
+
+               [Browsable(false)]
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public event EventHandler               TabIndexChanged;
+
+               [Browsable(false)]
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public event EventHandler               TabStopChanged;
+
+               [Browsable(false)]
+               [EditorBrowsable(EditorBrowsableState.Never)]
+               public event EventHandler               TextChanged;
+               #endregion      // Events
+
+               #region Delegates
+               [Serializable]
+               protected delegate void AboutBoxDelegate();
+               #endregion      // Delegates
+
+               #region Interfaces
+               [EditorBrowsable(EditorBrowsableState.Advanced)]
+               [MonoTODO]
+               AttributeCollection ICustomTypeDescriptor.GetAttributes() {
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented");
+               }
+               
+               [EditorBrowsable(EditorBrowsableState.Advanced)]
+               [MonoTODO]
+               string ICustomTypeDescriptor.GetClassName() {
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented");
+               }
+               
+               [EditorBrowsable(EditorBrowsableState.Advanced)]
+               [MonoTODO]
+               string ICustomTypeDescriptor.GetComponentName() {
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented");
+               }
+               
+               [EditorBrowsable(EditorBrowsableState.Advanced)]
+               [MonoTODO]
+               TypeConverter ICustomTypeDescriptor.GetConverter() {
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented");
+               }
+               
+               [EditorBrowsable(EditorBrowsableState.Advanced)]
+               [MonoTODO]
+               EventDescriptor ICustomTypeDescriptor.GetDefaultEvent() {
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented");
+               }
+               
+               [EditorBrowsable(EditorBrowsableState.Advanced)]
+               [MonoTODO]
+               PropertyDescriptor ICustomTypeDescriptor.GetDefaultProperty() {
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented");
+               }
+               
+               [EditorBrowsable(EditorBrowsableState.Advanced)]
+               [MonoTODO]
+               object ICustomTypeDescriptor.GetEditor(Type editorBaseType) {
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented");
+               }
+               
+               [EditorBrowsable(EditorBrowsableState.Advanced)]
+               [MonoTODO]
+               EventDescriptorCollection ICustomTypeDescriptor.GetEvents() {
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented");
+               }
+               
+               [EditorBrowsable(EditorBrowsableState.Advanced)]
+               [MonoTODO]
+               EventDescriptorCollection 
ICustomTypeDescriptor.GetEvents(Attribute[] attributes) {
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented");
+               }
+               
+               [EditorBrowsable(EditorBrowsableState.Advanced)]
+               [MonoTODO]
+               PropertyDescriptorCollection 
ICustomTypeDescriptor.GetProperties() {
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented");
+               }
+               
+               [EditorBrowsable(EditorBrowsableState.Advanced)]
+               [MonoTODO]
+               PropertyDescriptorCollection 
ICustomTypeDescriptor.GetProperties(Attribute[] attributes) {
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented");
+               }
+               
+               [EditorBrowsable(EditorBrowsableState.Advanced)]
+               [MonoTODO]
+               object 
ICustomTypeDescriptor.GetPropertyOwner(PropertyDescriptor pd) {
+                       throw new NotImplementedException("COM/ActiveX support 
is not implemented");
+               }
+               #endregion      // Interfaces
+       }
+}

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ButtonBase.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ButtonBase.cs    
2005-05-06 03:05:50 UTC (rev 44102)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ButtonBase.cs    
2005-05-06 03:28:11 UTC (rev 44103)
@@ -457,8 +457,8 @@
                }
 
                protected override void OnPaint(PaintEventArgs pevent) {
+                       Draw (pevent);
                        base.OnPaint (pevent);
-                       Draw (pevent);
                }
 
                protected override void OnParentChanged(EventArgs e) {

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2005-05-06 03:05:50 UTC (rev 44102)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ChangeLog        
2005-05-06 03:28:11 UTC (rev 44103)
@@ -1,5 +1,25 @@
-2005-05-5  Jordi Mas i Hernandez <[EMAIL PROTECTED]>
+2005-05-05  Peter Bartok  <[EMAIL PROTECTED]>
 
+       * XplatUI.cs: Updated revision
+       * Form.cs: Removed enless loop
+       * GroupBox.cs (OnPaint): Added call to base.OnPaint()
+       * Label.cs (OnPaint): Added call to base.OnPaint()
+       * ToolTip.cs: Made ToolTipWindow reusable for other controls
+       * LinkLabel.cs (OnPaint): Added call to base.OnPaint()
+       * UpDownBase.cs (OnPaint): Moved base.OnPaint() call to end of method
+       * AxHost.cs: Added
+       * ButtonBase.cs: Moved base.OnPaint() call to end of method
+       * ThemeWin32Classic.cs: Replaced references to ToolTip with references
+         to ToolTip.ToolTipWindow for drawing and size methods; this allows
+         reuse of ToolTipWindow by other controls
+       * SizeGrip.cs: Moved base.OnPaint() call to end of method
+       * XplatUIX11.cs: Now clipping drawing area (experimental)
+       * PictureBox.cs: Moved base.OnPaint() call to end of method
+       * Theme.cs: Fixed ToolTip abstracts to match new format
+       * ErrorProvider.cs: Implemented
+
+2005-05-05  Jordi Mas i Hernandez <[EMAIL PROTECTED]>
+
        * Label.cs: fire events using OnAutoSizeChanged and OnTextAlignChanged
        * LinkLabel.cs:
                - Adds cursors

Added: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ErrorProvider.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ErrorProvider.cs 
2005-05-06 03:05:50 UTC (rev 44102)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ErrorProvider.cs 
2005-05-06 03:28:11 UTC (rev 44103)
@@ -0,0 +1,440 @@
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+// 
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+// 
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+// Copyright (c) 2005 Novell, Inc. (http://www.novell.com)
+//
+// Authors:
+//     Peter Bartok    ([EMAIL PROTECTED])
+//
+//
+
+// COMPLETE
+
+using System;
+using System.Collections;
+using System.ComponentModel;
+using System.Drawing;
+
+namespace System.Windows.Forms {
+       [ToolboxItemFilter("System.Windows.Forms")]
+       [ProvideProperty("Error", "System.Windows.Forms.Control, 
System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, 
PublicKeyToken=b77a5c561934e089")]
+       [ProvideProperty("IconPadding", "System.Windows.Forms.Control, 
System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, 
PublicKeyToken=b77a5c561934e089")]
+       [ProvideProperty("IconAlignment", "System.Windows.Forms.Control, 
System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, 
PublicKeyToken=b77a5c561934e089")]
+       public class ErrorProvider : Component, IExtenderProvider {
+               #region Private Classes
+               private class ErrorProperty {
+                       public ErrorIconAlignment       alignment;
+                       public int                      padding;
+                       public string                   text;
+                       public Control                  control;
+                       public ErrorProvider            ep;
+                       private UserControl             window;
+                       private bool                    visible;
+                       private int                     blink_count;
+                       private EventHandler            tick;
+                       private System.Windows.Forms.Timer      timer;
+
+                       public ErrorProperty(ErrorProvider ep, Control control) 
{
+                               this.ep = ep;
+                               this.control = control;
+
+                               alignment = ErrorIconAlignment.MiddleRight;
+                               padding = 0;
+                               text = string.Empty;
+                               blink_count = 0;
+
+                               tick = new EventHandler(window_Tick);
+
+                               window = new UserControl();
+                               window.Visible = false;
+                               window.Width = ep.icon.Width;
+                               window.Height = ep.icon.Height;
+
+                               if (ep.container != null) {
+                                       ep.container.Controls.Add(window);
+                                       
ep.container.Controls.SetChildIndex(window, 0);
+                               } else {
+                                       control.parent.Controls.Add(window);
+                                       
control.parent.Controls.SetChildIndex(window, 0);
+                               }
+
+                               window.Paint += new 
PaintEventHandler(window_Paint);
+                               window.MouseEnter += new 
EventHandler(window_MouseEnter);
+                               window.MouseLeave += new 
EventHandler(window_MouseLeave);
+                               control.SizeChanged += new 
EventHandler(control_SizeLocationChanged);
+                               control.LocationChanged += new 
EventHandler(control_SizeLocationChanged);
+                               // Do we want to block mouse clicks? if so we 
need a few more events handled
+
+                               CalculateAlignment();
+                       }
+
+                       public string Text {
+                               get {
+                                       return text;
+                               }
+
+                               set {
+                                       text = value;
+                                       if (text != String.Empty) {
+                                               window.Visible = true;
+                                       } else {
+                                               window.Visible = false;
+                                       }
+
+                                       if (ep.blinkstyle != 
ErrorBlinkStyle.NeverBlink) {
+                                               if (timer == null) {
+                                                       timer = new 
System.Windows.Forms.Timer();
+                                               }
+                                               timer.Interval = ep.blinkrate;
+                                               timer.Tick += tick;
+                                               blink_count = 0;
+                                               timer.Enabled = true;
+                                       }
+                               }
+                       }
+
+                       public ErrorIconAlignment Alignment {
+                               get {
+                                       return alignment;
+                               }
+
+                               set {
+                                       if (alignment != value) {
+                                               alignment = value;
+                                               CalculateAlignment();
+                                       }
+                               }
+                       }
+
+                       public int Padding {
+                               get {
+                                       return padding;
+                               }
+
+                               set {
+                                       if (padding != value) {
+                                               padding = value;
+                                               CalculateAlignment();
+                                       }
+                               }
+                       }
+
+                       private void CalculateAlignment() {
+                               if (visible) {
+                                       visible = false;
+                                       ep.tooltip.Visible = false;
+                               }
+
+                               switch (alignment) {
+                                       case ErrorIconAlignment.TopLeft: {
+                                               window.Left = control.Left - 
ep.icon.Width - padding;
+                                               window.Top = control.Top;
+                                               break;
+                                       }
+
+                                       case ErrorIconAlignment.TopRight: {
+                                               window.Left = control.Left + 
control.Width + padding;
+                                               window.Top = control.Top;
+                                               break;
+                                       }
+
+                                       case ErrorIconAlignment.MiddleLeft: {
+                                               window.Left = control.Left - 
ep.icon.Width - padding;
+                                               window.Top = control.Top + 
(control.Height - ep.icon.Height) / 2;
+                                               break;
+                                       }
+
+                                       case ErrorIconAlignment.MiddleRight: {
+                                               window.Left = control.Left + 
control.Width + padding;
+                                               window.Top = control.Top + 
(control.Height - ep.icon.Height) / 2;
+                                               break;
+                                       }
+
+                                       case ErrorIconAlignment.BottomLeft: {
+                                               window.Left = control.Left - 
ep.icon.Width - padding;
+                                               window.Top = control.Top + 
control.Height - ep.icon.Height;
+                                               break;
+                                       }
+
+                                       case ErrorIconAlignment.BottomRight: {
+                                               window.Left = control.Left + 
control.Width + padding;
+                                               window.Top = control.Top + 
control.Height - ep.icon.Height;
+                                               break;
+                                       }
+                               }
+                       }
+
+                       private void window_Paint(object sender, PaintEventArgs 
e) {
+                               if (text != string.Empty) {
+                                       e.Graphics.DrawIcon(this.ep.icon, 0, 0);
+                               }
+                       }
+
+                       private void window_MouseEnter(object sender, EventArgs 
e) {
+                               if (!visible) {
+                                       Size    size;
+                                       Point   pt;
+
+                                       visible = true;
+
+                                       pt = Control.MousePosition;
+
+                                       size = 
ThemeEngine.Current.ToolTipSize(ep.tooltip, text);
+                                       ep.tooltip.Width = size.Width;
+                                       ep.tooltip.Height = size.Height;
+                                       ep.tooltip.Text = text;
+
+                                       if ((pt.X + size.Width) < 
SystemInformation.WorkingArea.Width) {
+                                               ep.tooltip.Left = pt.X;
+                                       } else {
+                                               ep.tooltip.Left = pt.X - 
size.Width;
+                                       }
+
+                                       if ((pt.Y + size.Height) < 
(SystemInformation.WorkingArea.Height - 16)) {
+                                               ep.tooltip.Top = pt.Y + 16;
+                                       } else {
+                                               ep.tooltip.Top = pt.Y - 
size.Height;
+                                       }
+                                       ep.tooltip.Visible = true;
+                               }
+                       }
+
+                       private void window_MouseLeave(object sender, EventArgs 
e) {
+                               if (visible) {
+                                       visible = false;
+                                       ep.tooltip.Visible = false;
+                               }
+                       }
+
+                       private void control_SizeLocationChanged(object sender, 
EventArgs e) {
+                               if (visible) {
+                                       visible = false;
+                                       ep.tooltip.Visible = false;
+                               }
+                               CalculateAlignment();
+                       }
+
+                       private void window_Tick(object sender, EventArgs e) {
+                               if (timer.Enabled) {
+                                       Graphics g;
+
+                                       blink_count++;
+
+                                       // Dunno why this POS doesn't reliably 
blink
+                                       g = window.CreateGraphics();
+                                       if ((blink_count % 2) == 0) {
+                                               g.FillRectangle(new 
SolidBrush(window.parent.BackColor), window.ClientRectangle);
+                                       } else {
+                                               g.DrawIcon(this.ep.icon, 0, 0);
+                                       }
+                                       g.Dispose();
+
+                                       if ((blink_count > 6) && (ep.blinkstyle 
== ErrorBlinkStyle.BlinkIfDifferentError)) {
+                                               timer.Stop();
+                                               blink_count = 0;
+                                       }
+                               }
+                       }
+               }
+               #endregion
+
+               #region Local Variables
+               private int                     blinkrate;
+               private ErrorBlinkStyle         blinkstyle;
+               private string                  datamember;
+               private object                  datasource;
+               private ContainerControl        container;
+               private Icon                    icon;
+               private Hashtable               controls;
+               private ToolTip.ToolTipWindow   tooltip;
+               #endregion      // Local Variables
+
+               #region Public Constructors
+               public ErrorProvider() {
+                       controls = new Hashtable();
+
+                       blinkrate = 250;
+                       blinkstyle = ErrorBlinkStyle.BlinkIfDifferentError;
+
+                       icon = (Icon)Locale.GetResource("errorProvider.ico");
+                       tooltip = new ToolTip.ToolTipWindow(null);
+               }
+
+               public ErrorProvider(ContainerControl parentControl) : this() {
+                       container = parentControl;
+               }
+               #endregion      // Public Constructors
+
+               #region Public Instance Properties
+               [DefaultValue(250)]
+               [RefreshProperties(RefreshProperties.Repaint)]
+               public int BlinkRate {
+                       get {
+                               return blinkrate;
+                       }
+
+                       set {
+                               blinkrate = value;
+                       }
+               }
+
+               [DefaultValue(ErrorBlinkStyle.BlinkIfDifferentError)]
+               public ErrorBlinkStyle BlinkStyle {
+                       get {
+                               return blinkstyle;
+                       }
+
+                       set {
+                               blinkstyle = value;
+                       }
+               }
+
+               [DefaultValue(null)]
+               public ContainerControl ContainerControl {
+                       get {
+                               return container;
+                       }
+
+                       set {
+                               container = value;
+                       }
+               }
+
+               [MonoTODO]
+               [DefaultValue(null)]
+               [Editor ("System.Windows.Forms.Design.DataMemberListEditor, 
System.Design, Version=1.0.5000.0, Culture=neutral, 
PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, 
System.Drawing, Version=1.0.5000.0, Culture=neutral, 
PublicKeyToken=b03f5f7f11d50a3a")]
+               public string DataMember {
+                       get {
+                               return datamember;
+                       }
+
+                       set {
+                               datamember = value;
+                               // FIXME - add binding magic and also update 
BindToDataAndErrors with it
+                       }
+               }
+
+               [MonoTODO]
+               [DefaultValue(null)]
+               
[TypeConverter("System.Windows.Forms.Design.DataSourceConverter, System.Design, 
Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
+               public object DataSource {
+                       get {
+                               return datasource;
+                       }
+
+                       set {
+                               datasource = value;
+                               // FIXME - add binding magic and also update 
BindToDataAndErrors with it
+                       }
+               }
+
+               [Localizable(true)]
+               public Icon Icon {
+                       get {
+                               return icon;
+                       }
+
+                       set {
+                               icon = value;
+                       }
+               }
+
+               public override ISite Site {
+                       set {
+                               base.Site = value;
+                       }
+               }
+               #endregion      // Public Instance Properties
+
+               #region Public Instance Methods
+               [MonoTODO]
+               public void BindToDataAndErrors(object newDataSource, string 
newDataMember) {
+                       datasource = newDataSource;
+                       datamember = newDataMember;
+                       // FIXME - finish
+               }
+
+               public bool CanExtend(object extendee) {
+                       if (!(extendee is Control)) {
+                               return false;
+                       }
+
+                       if ((extendee is Form) || (extendee is ToolBar)) {
+                               return false;
+                       }
+
+                       return true;
+               }
+
+               [Localizable(true)]
+               [DefaultValue("")]
+               public string GetError(Control control) {
+                       return GetErrorProperty(control).Text;
+               }
+
+               [Localizable(true)]
+               [DefaultValue(ErrorIconAlignment.MiddleRight)]
+               public ErrorIconAlignment GetIconAlignment(Control control) {
+                       return GetErrorProperty(control).Alignment;
+               }
+
+               [Localizable(true)]
+               [DefaultValue(0)]
+               public int GetIconPadding(Control control) {
+                       return GetErrorProperty(control).padding;
+               }
+
+               public void SetError(Control control, string value) {
+                       GetErrorProperty(control).Text = value;
+               }
+
+               public void SetIconAlignment(Control control, 
ErrorIconAlignment value) {
+                       GetErrorProperty(control).Alignment = value;
+               }
+
+               public void SetIconPadding(Control control, int padding) {
+                       GetErrorProperty(control).Padding = padding;
+               }
+
+               [MonoTODO]
+               public void UpdateBinding() {
+               }
+               #endregion      // Public Instance Methods
+
+               #region Protected Instance Methods
+               protected override void Dispose(bool disposing) {
+                       base.Dispose (disposing);
+               }
+               #endregion      // Protected Instance Methods
+
+               #region Private Methods
+               private ErrorProperty GetErrorProperty(Control control) {
+                       ErrorProperty ep;
+
+                       ep = (ErrorProperty)controls[control];
+                       if (ep == null) {
+                               ep = new ErrorProperty(this, control);
+                               controls[control] = ep;
+                       }
+
+                       return ep;
+               }
+               #endregion      // Private Methods
+       }
+}

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs  
2005-05-06 03:05:50 UTC (rev 44102)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Form.cs  
2005-05-06 03:28:11 UTC (rev 44103)
@@ -574,7 +574,7 @@
                [Localizable(false)]
                public Size Size {
                        get {
-                               return Size;
+                               return base.Size;
                        }
 
                        set {

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/GroupBox.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/GroupBox.cs      
2005-05-06 03:05:50 UTC (rev 44102)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/GroupBox.cs      
2005-05-06 03:28:11 UTC (rev 44103)
@@ -173,6 +173,7 @@
                protected override void OnPaint (PaintEventArgs pevent)
                {
                        ThemeEngine.Current.DrawGroupBox (pevent.Graphics, 
ClientRectangle, this);
+                       base.OnPaint(pevent);
                }
 
                protected override bool ProcessMnemonic (char charCode)

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Label.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Label.cs 
2005-05-06 03:05:50 UTC (rev 44102)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Label.cs 
2005-05-06 03:28:11 UTC (rev 44103)
@@ -495,6 +495,7 @@
                {
                        ThemeEngine.Current.DrawLabel (pevent.Graphics, 
ClientRectangle, this);
                        DrawImage (pevent.Graphics, Image, ClientRectangle, 
image_align);
+                       base.OnPaint(pevent);
                }
 
                protected override void OnParentChanged (EventArgs e)

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/LinkLabel.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/LinkLabel.cs     
2005-05-06 03:05:50 UTC (rev 44102)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/LinkLabel.cs     
2005-05-06 03:28:11 UTC (rev 44103)
@@ -402,6 +402,7 @@
                {
                        ThemeEngine.Current.DrawLinkLabel (pevent.Graphics, 
pevent.ClipRectangle, this);
                        DrawImage (pevent.Graphics, Image, ClientRectangle, 
image_align);
+                       base.OnPaint(pevent);
                }
 
                protected override void OnPaintBackground (PaintEventArgs e)

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/PictureBox.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/PictureBox.cs    
2005-05-06 03:05:50 UTC (rev 44102)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/PictureBox.cs    
2005-05-06 03:28:11 UTC (rev 44103)
@@ -194,8 +194,8 @@
 
                protected override void OnPaint (PaintEventArgs pe)
                {
+                        ThemeEngine.Current.DrawPictureBox (pe.Graphics, 
pe.ClipRectangle, this);
                        base.OnPaint (pe);
-                        ThemeEngine.Current.DrawPictureBox (pe.Graphics, 
pe.ClipRectangle, this);
                }
 
                protected override void OnVisibleChanged (EventArgs e)

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/SizeGrip.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/SizeGrip.cs      
2005-05-06 03:05:50 UTC (rev 44102)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/SizeGrip.cs      
2005-05-06 03:28:11 UTC (rev 44103)
@@ -64,11 +64,10 @@
 
                #region Methods
                protected override void OnPaint (PaintEventArgs pe) {
-                       base.OnPaint (pe);
-
                        if (redraw && show_grip) {
                                 ControlPaint.DrawSizeGrip (pe.Graphics, 
BackColor, ClientRectangle);
                        }
+                       base.OnPaint (pe);
                }
 
                protected override void OnSizeChanged (EventArgs e) {

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Theme.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Theme.cs 
2005-05-06 03:05:50 UTC (rev 44102)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/Theme.cs 
2005-05-06 03:28:11 UTC (rev 44103)
@@ -574,8 +574,8 @@
                #endregion      // ToolBar
 
                #region ToolTip
-               public abstract void DrawToolTip(Graphics dc, Rectangle 
clip_rectangle, ToolTip tt);
-               public abstract Size ToolTipSize(ToolTip tt, string text);
+               public abstract void DrawToolTip(Graphics dc, Rectangle 
clip_rectangle, ToolTip.ToolTipWindow control);
+               public abstract Size ToolTipSize(ToolTip.ToolTipWindow tt, 
string text);
                #endregion      // ToolTip              
                
 

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs
===================================================================
--- 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs 
    2005-05-06 03:05:50 UTC (rev 44102)
+++ 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ThemeWin32Classic.cs 
    2005-05-06 03:28:11 UTC (rev 44103)
@@ -3415,19 +3415,16 @@
                #endregion      // ToolBar
 
                #region ToolTip
-               public override void DrawToolTip(Graphics dc, Rectangle 
clip_rectangle, ToolTip tt) {
-                       Control control;
-
-                       control = tt.tooltip_window;
+               public override void DrawToolTip(Graphics dc, Rectangle 
clip_rectangle, ToolTip.ToolTipWindow control) {
                        
dc.FillRectangle(ResPool.GetSolidBrush(this.ColorInfoWindow), 
control.client_rect);
                        dc.DrawRectangle(ResPool.GetPen(this.ColorWindowFrame), 
0, 0, control.Width-1, control.Height-1);
-                       dc.DrawString(control.text, control.Font, 
ResPool.GetSolidBrush(this.ColorInfoText), control.client_rect, 
tt.tooltip_window.string_format);
+                       dc.DrawString(control.text, control.Font, 
ResPool.GetSolidBrush(this.ColorInfoText), control.client_rect, 
control.string_format);
                }
 
-               public override Size ToolTipSize(ToolTip tt, string text) {
+               public override Size ToolTipSize(ToolTip.ToolTipWindow tt, 
string text) {
                        SizeF   sizef;
 
-                       sizef = 
tt.tooltip_window.DeviceContext.MeasureString(text, tt.tooltip_window.Font);
+                       sizef = tt.DeviceContext.MeasureString(text, tt.Font);
                        return new Size((int)sizef.Width+2, 
(int)sizef.Height+3);               // Need space for the border
                }
                #endregion      // ToolTip

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolTip.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolTip.cs       
2005-05-06 03:05:50 UTC (rev 44102)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/ToolTip.cs       
2005-05-06 03:28:11 UTC (rev 44103)
@@ -105,7 +105,9 @@
                                // We don't do double-buffering on purpose:
                                // 1) we'd have to meddle with is_visible, it 
destroys the buffers if !visible
                                // 2) We don't draw much, no need to double 
buffer
-                               
ThemeEngine.Current.DrawToolTip(pevent.Graphics, ClientRectangle, owner);
+                               
ThemeEngine.Current.DrawToolTip(pevent.Graphics, ClientRectangle, this);
+
+                               base.OnPaint(pevent);
                        }
 
                        protected override void Dispose(bool disposing) {
@@ -316,7 +318,6 @@
                                return;
                        }
 
-                       // As of this writing, our MWF implementation had no 
clue what an active control was :-(
                        if (!show_always) {
                                if 
(((Control)sender).GetContainerControl().ActiveControl == null) {
                                        return;
@@ -327,7 +328,7 @@
                        if (text != null) {
                                Size size;
 
-                               size = ThemeEngine.Current.ToolTipSize(this, 
text);
+                               size = 
ThemeEngine.Current.ToolTipSize(tooltip_window, text);
                                tooltip_window.Width = size.Width;
                                tooltip_window.Height = size.Height;
                                tooltip_window.Text = text;

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/UpDownBase.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/UpDownBase.cs    
2005-05-06 03:05:50 UTC (rev 44102)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/UpDownBase.cs    
2005-05-06 03:28:11 UTC (rev 44103)
@@ -73,12 +73,12 @@
 
                        protected override void OnPaint (PaintEventArgs pe)
                        {
-                               base.OnPaint (pe);
-
                                if (pe.ClipRectangle.Contains (up))
                                        DrawUp (pe.Graphics);
                                if (pe.ClipRectangle.Contains (down))
                                        DrawDown (pe.Graphics);
+
+                               base.OnPaint (pe);
                        }
 
                        protected override void OnLayout (LayoutEventArgs args)
@@ -337,12 +337,12 @@
 #if false
                protected override void OnPaint (PaintEventArgs pe)
                {
-                       base.OnPaint (pe);
-
                         if (pe.ClipRectangle.Contains (up))
                                 DrawUp (pe.Graphics);
                         if (pe.ClipRectangle.Contains (down))
                                 DrawDown (pe.Graphics);
+
+                       base.OnPaint (pe);
                }
 
                protected override void SetVisibleCore (bool state)

Modified: trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUI.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUI.cs       
2005-05-06 03:05:50 UTC (rev 44102)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUI.cs       
2005-05-06 03:28:11 UTC (rev 44103)
@@ -77,7 +77,7 @@
 
                #region Constructor & Destructor
                static XplatUI() {
-                       Console.WriteLine("Mono System.Windows.Forms Assembly 
[Revision: 41731; built: 2005/2/15 5:56:12]");
+                       Console.WriteLine("Mono System.Windows.Forms Assembly 
[Revision: 44101; built: 2005/5/5 21:38:0]");
 
                        // Don't forget to throw the mac in here somewhere, too
                        default_class_name="SWFClass";

Modified: 
trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs
===================================================================
--- trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs    
2005-05-06 03:05:50 UTC (rev 44102)
+++ trunk/mcs/class/Managed.Windows.Forms/System.Windows.Forms/XplatUIX11.cs    
2005-05-06 03:28:11 UTC (rev 44103)
@@ -47,6 +47,7 @@
 using System.Collections;
 using System.Diagnostics;
 using System.Drawing;
+using System.Drawing.Drawing2D;
 using System.Drawing.Imaging;
 using System.IO;
 using System.Net;
@@ -2527,8 +2528,8 @@
                                hwnd.erase_pending = false;
                        }
 
-
-                       hwnd.client_dc  = Graphics.FromHwnd 
(hwnd.client_window);
+                       hwnd.client_dc = Graphics.FromHwnd (hwnd.client_window);
+                       hwnd.client_dc.SetClip(hwnd.invalid);
                        paint_event = new PaintEventArgs(hwnd.client_dc, 
hwnd.invalid);
 
                        return paint_event;

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to