From: Dennis Hayes Date: Mon, 21 Oct 2002 03:02:52 +0000 (-0000) Subject: 2002-10-18 DennisHayes X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=e648a7e8dc5b802b795c3c8aca47f9f55dec518e;p=mono.git 2002-10-18 DennisHayes * Application.cs * Button.cs * ButtonBase.cs * changelog * ContainerControl.cs * Control.cs * DrawItemEventArgs.cs * DrawItemEventHandler.cs * Font.cs * Form.cs * IAccessible.cs * IContainerControl.cs * Label.cs * MenuItem.cs * MessageBox.cs * NativeWindow.cs * ScrollableControl.cs * Win32.cs * Added some implmentation. Uncommented some stuff. * About to add files to implment stuff uncommented. svn path=/trunk/mcs/; revision=8434 --- diff --git a/mcs/class/System.Windows.Forms/System.Windows.Forms/ochangelog b/mcs/class/System.Windows.Forms/System.Windows.Forms/ochangelog index 5dbbd3181df..38cf0dceda6 100644 --- a/mcs/class/System.Windows.Forms/System.Windows.Forms/ochangelog +++ b/mcs/class/System.Windows.Forms/System.Windows.Forms/ochangelog @@ -1,30 +1,3 @@ - 2002-10-18 DennisHayes - * Application.cs - * Button.cs - * ButtonBase.cs - * changelog - * ContainerControl.cs - * Control.cs - * DrawItemEventArgs.cs - * DrawItemEventHandler.cs - * Font.cs - * Form.cs - * IAccessible.cs - * IContainerControl.cs - * Label.cs - * MenuItem.cs - * MessageBox.cs - * NativeWindow.cs - * ScrollableControl.cs - * Win32.cs - - * Added some implmentation. Uncommented some stuff. - * About to add files to implment stuff uncommented. - - - 2002-10-19 John Sohn - * makefile: removed hard coded path to libmono - 2002-10-18 DennisHayes * Application.cs diff --git a/mcs/class/System.Windows.Forms/WINELib/AccessibleEvents.cs b/mcs/class/System.Windows.Forms/WINELib/AccessibleEvents.cs new file mode 100644 index 00000000000..d39f188ec1d --- /dev/null +++ b/mcs/class/System.Windows.Forms/WINELib/AccessibleEvents.cs @@ -0,0 +1,59 @@ +// +// System.Windows.Forms.AccessibleEvents.cs +// +// Author: +// Dennis Hayes (dennish@raytek.com) +// (C) 2002 Ximian = , Inc. http://www.ximian.com +// + +using System; + +namespace System.Windows.Forms { + + /// + /// + public enum AccessibleEvents{ + AcceleratorChange = 32786, + Create = 32768, + DefaultActionChange = 32765, + DescriptionChange = 32781, + Destroy = 32769, + Focus = 32773, + HelpChange = 32784, + Hide = 32771, + LocationChange = 32779, + NameChange = 32780, + ParentChange = 32783, + Reorder = 32772, + Selection = 32774, + SelectionAdd = 32775, + SelectionRemove = 32776, + SelectionWithin = 32777, + Show = 32770, + StateChange = 32778, + SystemAlert = 2, + SystemCaptureEnd = 9, + SystemCaptureStart = 8, + SystemContextHelpEnd = 13, + SystemContextHelpStart = 12, + SystemDialogEnd = 17, + SystemDialogStart = 16, + SystemDragDropEnd = 15, + SystemDragDropStart = 14, + SystemForeground = 3, + SystemMenuEnd = 5, + SystemMenuPopupEnd = 7, + SystemMenuPopupStart = 6, + SystemMenuStart = 4, + SystemMinimizeEnd = 23, + SystemMinimizeStart = 22, + SystemMoveSizeEnd = 11, + SystemMoveSizeStart = 10, + SystemScrollingEnd = 19, + SystemScrollingStart = 18, + SystemSound = 1, + SystemSwitchEnd = 21, + SystemSwitchStart = 20, + ValueChange = 32782 + } +} diff --git a/mcs/class/System.Windows.Forms/WINELib/AccessibleNavigation.cs b/mcs/class/System.Windows.Forms/WINELib/AccessibleNavigation.cs new file mode 100644 index 00000000000..c7d017728cf --- /dev/null +++ b/mcs/class/System.Windows.Forms/WINELib/AccessibleNavigation.cs @@ -0,0 +1,32 @@ +// +// System.Windows.Forms.AccessibleNavigation.cs +// +// Author: +// Jaak Simm (jaaksimm@firm.ee) +// Dennis Hayes (dennish@raytek.com) +// (C) 2002 Ximian, Inc. http://www.ximian.com +// + +using System; + +namespace System.Windows.Forms { + + + /// + /// Specifies a values for navigating among accessible objects. + /// + + //[Serializable] + public enum AccessibleNavigation { + + //Values were verified with enumcheck. + Down = 2, + FirstChild = 7, + LastChild = 8, + Left = 3, + Next = 5, + Previous = 6, + Right = 4, + Up = 1 + } +} diff --git a/mcs/class/System.Windows.Forms/WINELib/AccessibleObject.cs b/mcs/class/System.Windows.Forms/WINELib/AccessibleObject.cs new file mode 100644 index 00000000000..ea97e6cf1fa --- /dev/null +++ b/mcs/class/System.Windows.Forms/WINELib/AccessibleObject.cs @@ -0,0 +1,370 @@ +// +// System.Windows.Forms.AccessibleObject.cs +// +// Author: +// stubbed out by Jaak Simm (jaaksimm@firm.ee) +// Dennis Hayes (dennish@raytek.com) +// (C) 2002 Ximian, Inc +// + +using System; +using System.Reflection; +using System.Globalization; +//using System.Windows.Forms.AccessibleObject.IAccessible; +using System.Drawing; +using Accessibility; +using System.Runtime.InteropServices; +namespace System.Windows.Forms { + + /// + /// Provides information that accessibility applications use to adjust an application's UI for users with impairments. + /// + /// ToDo note: + /// - Nothing is implemented + /// - IAccessible members not stubbed out + /// - MarshalByRefObject members not stubbed out + /// MSDN gives little info on the members of IAccessible: "This member supports the .NET Framework infrastructure and is not intended to be used directly from your code." + /// + [MonoTODO] + [ComVisible(true)] + public class AccessibleObject : MarshalByRefObject, IReflect, IAccessible { + private string defaultAction; + private string description; + private string help; + private string keyboardShortcut; + private AccessibleObject parent; + private AccessibleRole role; + private AccessibleStates state; + private string name; + private string value; + // --- Constructor --- + [MonoTODO] + public AccessibleObject() { + name = null; + parent = null; + role = AccessibleRole.None; + state = AccessibleStates.None; + value = null; + + } + + [MonoTODO] + ~AccessibleObject(){ + } + + /// + /// Equals Method + /// + /// + /// + /// Checks equivalence of this AccessibleObject and another object. + /// + + public override bool Equals (object obj) { + if (!(obj is AccessibleObject)) + return false; + + return (this == (AccessibleObject) obj); + } + + /// + /// GetHashCode Method + /// + /// + /// + /// Calculates a hashing value. + /// + + public override int GetHashCode () { + //unchecked{//FIXME Add out proprities to the hash + return base.GetHashCode(); + //} + } + + /// + /// ToString Method + /// + /// + /// + /// Formats the AccessibleObject as a string. + /// + + //spec says inherited + //public override string ToString () { + // return "AccessibleObject".GetType();//per spec as I read it? + //} + + // --- Properties --- + + [ComVisible(true)] + public virtual Rectangle Bounds { + + get { return Rectangle.Empty; } // As per spec for default. Expect override. + } + + [ComVisible(true)] + public virtual string DefaultAction { + + get {return null; }// As per spec for default. Expect override. + } + + [ComVisible(true)] + public virtual string Description { + + get {return null; }// As per spec for default. Expect override. + } + + [ComVisible(true)] + public virtual string Help { + + get {return null; }// As per spec for default. Expect override. + } + + [ComVisible(true)] + public virtual string KeyboardShortcut { + + get {return null; }// As per spec for default. Expect override. + } + + [ComVisible(true)] + public virtual string Name { + get { return name; } + set { name = value; } + } + + [ComVisible(true)] + public virtual string Value { + get { return this.value; } + set { this.value = value; } + } + + [ComVisible(true)] + public virtual AccessibleObject Parent { + get { return parent; } + set { parent = value; } + } + + [ComVisible(true)] + public virtual AccessibleRole Role { + get { return role; } + set { role = value; } + } + + [ComVisible(true)] + public virtual AccessibleStates State { + get { return state; } + set { state = value; } + } + + // --- Methods --- + [ComVisible(true)] + public virtual void DoDefaultAction() { + return; //default action is "" and cannot be changed, must be overridden. + } + + [ComVisible(true)] + public virtual AccessibleObject GetChild(int index) { + return null; + } + + [ComVisible(true)] + public virtual int GetChildCount() { + return -1; //as per spec + } + + [MonoTODO] + [ComVisible(true)] + public virtual AccessibleObject GetFocused() { + return null;//FIXME: not quite to spec. + } + + [ComVisible(true)] + public virtual int GetHelpTopic(out string fileName) { + fileName = ""; + return -1;//no help + } + + [ComVisible(true)] + public virtual AccessibleObject GetSelected() { + return null; + } + + [MonoTODO] + [ComVisible(true)] + public virtual AccessibleObject HitTest(int x,int y) { + return null; } + + [MonoTODO] + [ComVisible(true)] + public virtual AccessibleObject Navigate(AccessibleNavigation navdir) { + //by default, navagate back to here. Does this work? + //not to spec, but better than execption FIXME: + return this; + } + + [MonoTODO] + [ComVisible(true)] + public virtual void Select(AccessibleSelection flags) { + return;//FIXME: Not to spec. should be over ridden anyway. + } + + //Not part of spec? + //[MonoTODO] + //[ComVisible(true)] + //protected void UseStdAccessibleObjects(IntPtr handle,int objid) + //{ + // throw new NotImplementedException (); + //} + + + // --- Methods: IReflect --- + [MonoTODO] + FieldInfo IReflect.GetField( string name,BindingFlags bindingAttr) { + // FIXME + throw new NotImplementedException (); + } + + [MonoTODO] + FieldInfo[] IReflect.GetFields (BindingFlags bindingAttr) { + // FIXME + throw new NotImplementedException (); + } + + [MonoTODO] + MemberInfo[] IReflect.GetMember( string name, BindingFlags bindingAttr) { + // FIXME + throw new NotImplementedException (); + } + + [MonoTODO] + MemberInfo[] IReflect.GetMembers( BindingFlags bindingAttr) { + // FIXME + throw new NotImplementedException (); + } + + [MonoTODO] + MethodInfo IReflect.GetMethod( string name, BindingFlags bindingAttr, Binder binder, Type[] types, ParameterModifier[] modifiers) { + // FIXME + throw new NotImplementedException (); + } + [MonoTODO] + MethodInfo IReflect.GetMethod( string name, BindingFlags bindingAttr) { + // FIXME + throw new NotImplementedException (); + } + + + + [MonoTODO] + MethodInfo[] IReflect.GetMethods( BindingFlags bindingAttr) { + // FIXME + throw new NotImplementedException (); + } + + [MonoTODO] + PropertyInfo[] IReflect.GetProperties( BindingFlags bindingAttr) { + // FIXME + throw new NotImplementedException (); + } + + [MonoTODO] + PropertyInfo IReflect.GetProperty( string name, BindingFlags bindingAttr) { + // FIXME + throw new NotImplementedException (); + } + + [MonoTODO] + PropertyInfo IReflect.GetProperty( string name, BindingFlags bindingAttr, Binder binder, Type returnType, Type[] types, ParameterModifier[] modifiers) { + // FIXME + throw new NotImplementedException (); + } + + [MonoTODO] + //[Guid("")] + object IReflect.InvokeMember( string name, BindingFlags invokeAttr, Binder binder, object target, object[] args, ParameterModifier[] modifiers, CultureInfo culture, string[] namedParameters) { + // FIXME + throw new NotImplementedException (); + } + + + Type IReflect.UnderlyingSystemType { + //private Type UnderlyingSystemType { + get { throw new NotImplementedException (); } + } + + void IAccessible.accDoDefaultAction(object childID) { + throw new NotImplementedException (); + } + int IAccessible.accChildCount{ + get{ + throw new NotImplementedException (); + } + } + + object IAccessible.accFocus{ + get{ + throw new NotImplementedException (); + } + } + object IAccessible.accHitTest(int xLeft, int yTop) { + throw new NotImplementedException (); + } + void IAccessible.accLocation(out int pxLeft, out int pyTop, out int pcxWidth, out int pcyHeight, object childID) { + throw new NotImplementedException (); + } + object IAccessible.accNavigate(int navDir, object childID) { + throw new NotImplementedException (); + } + object IAccessible.accParent { + get{ + throw new NotImplementedException (); + } + } + void IAccessible.accSelect(int flagsSelect, object childID) { + throw new NotImplementedException (); + } + object IAccessible.accSelection { + get{ + throw new NotImplementedException (); + } + } + object IAccessible.get_accChild(object childID) { + throw new NotImplementedException (); + } + string IAccessible.get_accDefaultAction(object childID) { + throw new NotImplementedException (); + } + string IAccessible.get_accDescription(object childID) { + throw new NotImplementedException (); + } + string IAccessible.get_accHelp(object childID) { + throw new NotImplementedException (); + } + int IAccessible.get_accHelpTopic(out string pszHelpFile,object childID) { + throw new NotImplementedException (); + } + string IAccessible.get_accKeyboardShortcut(object childID) { + throw new NotImplementedException (); + } + string IAccessible.get_accName(object childID) { + throw new NotImplementedException (); + } + object IAccessible.get_accRole(object childID) { + throw new NotImplementedException (); + } + object IAccessible.get_accState(object childID) { + throw new NotImplementedException (); + } + string IAccessible.get_accValue(object childID) { + throw new NotImplementedException (); + } + void IAccessible.set_accName(object childID, string newName) { + throw new NotImplementedException (); + } + void IAccessible.set_accValue(object childID, string newValue) { + throw new NotImplementedException (); + } + } + +} + diff --git a/mcs/class/System.Windows.Forms/WINELib/AccessibleRole.cs b/mcs/class/System.Windows.Forms/WINELib/AccessibleRole.cs new file mode 100644 index 00000000000..8a21d96e95c --- /dev/null +++ b/mcs/class/System.Windows.Forms/WINELib/AccessibleRole.cs @@ -0,0 +1,80 @@ +// +// System.Windows.Forms.AccessibleRole.cs +// +// Author: +// Dennis Hayes (dennish@raytek.com) +// (C) 2002 Ximian, Inc. http://www.ximian.com +// + +using System; + +namespace System.Windows.Forms { + + /// + /// + public enum AccessibleRole{ + Alert = 8, + Animation = 54, + Application = 14, + Border = 19, + ButtonDropDownGrid = 58, + ButtonMenu = 57, + Caret = 7, + Cell = 29, + Character = 32, + Chart = 17, + CheckButton = 44, + Client = 10, + Clock = 61, + Column = 27, + ColumnHeader = 25, + ComboBox = 46, + Cursor = 6, + Default = -1, + Diagram = 53, + Dial = 49, + Dialog = 18, + Document = 15, + DropList = 47, + Equation = 55, + Graphic = 40, + Grip = 4, + Grouping = 20, + HelpBalloon = 31, + HotkeyField = 50, + Indicator = 39, + Link = 30, + List = 33, + ListItem = 34, + MenuBar = 2, + MenuItem = 12, + MenuPopup = 11, + None = 0, + Outline = 35, + OutlineItem = 36, + PageTab = 37, + PageTabList = 60, + Pane = 16, + ProgressBar = 48, + PropertyPage = 38, + PushButton = 43, + RadioButton = 45, + Row = 28, + RowHeader = 26, + ScrollBar = 3, + Separator = 21, + Slider = 51, + Sound = 5, + SpinButton = 52, + StaticText = 41, + StatusBar = 23, + Table = 24, + Text = 42, + TitleBar = 1, + ToolBar = 22, + ToolTip = 13, + WhiteSpace = 59, + Window = 9 + } + +} diff --git a/mcs/class/System.Windows.Forms/WINELib/AccessibleSelection.cs b/mcs/class/System.Windows.Forms/WINELib/AccessibleSelection.cs new file mode 100644 index 00000000000..dce814a48bd --- /dev/null +++ b/mcs/class/System.Windows.Forms/WINELib/AccessibleSelection.cs @@ -0,0 +1,30 @@ +// +// System.Windows.Forms.AccessibleSelection.cs +// +// Author: +// Jaak Simm (jaaksimm@firm.ee) +// Dennis Hayes (dennish@raytek.com) +// (C) 2002 Ximian, Inc. http://www.ximian.com +// + +using System; + +namespace System.Windows.Forms { + + + /// + /// Specifies how an accessible object is selected or receives focus. + /// This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values. + /// + [Flags] + //[Serializable] + public enum AccessibleSelection { + + AddSelection = 1, + ExtendSelection = 2, + None = 0, + RemoveSelection = 4, + TakeFocus = 8, + TakeSelection = 16 + } +} diff --git a/mcs/class/System.Windows.Forms/WINELib/AccessibleStates.cs b/mcs/class/System.Windows.Forms/WINELib/AccessibleStates.cs new file mode 100644 index 00000000000..49eb44e63bc --- /dev/null +++ b/mcs/class/System.Windows.Forms/WINELib/AccessibleStates.cs @@ -0,0 +1,59 @@ +// +// System.Windows.Forms.AccessibleStates.cs +// +// Author: +// Dennis Hayes (dennish@raytek.com) +// (C) 2002 Ximian, Inc. http://www.ximian.com +// + +using System; + +namespace System.Windows.Forms { + + /// + /// + public enum AccessibleStates{ + AlertLow = 67108864, + AlertMedium = 134217728, + AlertHigh = 268435456, + Animated = 16384, + Busy = 2048, + Checked = 16, + Collapsed = 1024, + Default = 256, + Expanded = 512, + ExtSelectable = 33554432, + Floating = 4096, + Focusable = 1048576, + Focused = 4, + HotTracked = 128, + Indeterminate =32, + Mixed = 32, + Invisible = 32768, + Linked = 4194304, + Marqueed = 8192, + Moveable = 262144, + MultiSelectable = 16777216, + None = 0, + Pressed = 8, + Protected = 536870912, + ReadOnly = 64, + Offscreen = 65536, + Selectable = 2097152, + Selected = 2, + SelfVoicing = 524288, + Sizeable = 131072, + Traversed =8388608, + Unavailable = 1, + Valid = 1073741823, + + + //Where did these come from, are they missing from elsewhere? + //AddSelection = , + //ExtendSelection = , + //None = , + //RemoveSelection = , + //TakeFocus = , + //TakeSelection = + } +} diff --git a/mcs/class/System.Windows.Forms/WINELib/AnchorStyles.cs b/mcs/class/System.Windows.Forms/WINELib/AnchorStyles.cs new file mode 100644 index 00000000000..2b166e21061 --- /dev/null +++ b/mcs/class/System.Windows.Forms/WINELib/AnchorStyles.cs @@ -0,0 +1,22 @@ +// +// System.Windows.Forms.AnchorStyles.cs +// +// Author: +// Dennis Hayes (dennish@raytek.com) +// (C) 2002 Ximian, Inc. http://www.ximian.com +// + +using System; + +namespace System.Windows.Forms { + + /// + /// + public enum AnchorStyles{ + Bottom = 2, + Left = 4, + None = 0, + Right = 8, + Top = 1 + } +} diff --git a/mcs/class/System.Windows.Forms/WINELib/ApplicationContext.cs b/mcs/class/System.Windows.Forms/WINELib/ApplicationContext.cs new file mode 100644 index 00000000000..9fcf00f9a15 --- /dev/null +++ b/mcs/class/System.Windows.Forms/WINELib/ApplicationContext.cs @@ -0,0 +1,83 @@ +// +// System.Windows.Forms.ApplicationContext +// +// Author: +// stubbed out by Jaak Simm (jaaksimm@firm.ee) +// Dennis hayes (dennish@raytek.com) +// +// (C) Ximian, Inc 2002 +// + +namespace System.Windows.Forms { + + /// + /// Specifies the contextual information about an application thread. + /// + /// ToDo note: Needsa Core; eg,==,!=,Gethascode,ToString. + /// + + [MonoTODO] + public class ApplicationContext { + + Form mainForm; + + // --- (public) Properties --- + public Form MainForm { + get { return mainForm; } + set { mainForm = value; } + } + + // --- Constructor --- + public ApplicationContext() + { + mainForm=null; + } + + public ApplicationContext(Form mainForm) : this() + { + this.mainForm=mainForm; + } + + // --- Methods --- + [MonoTODO] + public void Dispose() + { + // see documentation on ApplicationContext.Dispose Method (Boolean) + this.Dispose(true); + } + + [MonoTODO] + protected virtual void Dispose(bool disposing) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public void ExitThread() + { + throw new NotImplementedException (); + } + + [MonoTODO] + protected virtual void ExitThreadCore() + { + throw new NotImplementedException (); + } + + [MonoTODO] + protected virtual void OnMainFormClosed(object sender,EventArgs e) + { + throw new NotImplementedException (); + } + + // --- Methods: object --- + [MonoTODO] + ~ApplicationContext() { + // see documentation on ApplicationContext.Dispose Method (Boolean) + this.Dispose(false); + } + + // --- Events --- + public event EventHandler ThreadExit; + } +} diff --git a/mcs/class/System.Windows.Forms/WINELib/AssemblyInfo.cs b/mcs/class/System.Windows.Forms/WINELib/AssemblyInfo.cs new file mode 100644 index 00000000000..177a4f0e70a --- /dev/null +++ b/mcs/class/System.Windows.Forms/WINELib/AssemblyInfo.cs @@ -0,0 +1,58 @@ +using System.Reflection; +using System.Runtime.CompilerServices; + +// +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +// +[assembly: AssemblyTitle("")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("")] +[assembly: AssemblyCopyright("")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Revision and Build Numbers +// by using the '*' as shown below: + +[assembly: AssemblyVersion("1.0.*")] + +// +// In order to sign your assembly you must specify a key to use. Refer to the +// Microsoft .NET Framework documentation for more information on assembly signing. +// +// Use the attributes below to control which key is used for signing. +// +// Notes: +// (*) If no key is specified, the assembly is not signed. +// (*) KeyName refers to a key that has been installed in the Crypto Service +// Provider (CSP) on your machine. KeyFile refers to a file which contains +// a key. +// (*) If the KeyFile and the KeyName values are both specified, the +// following processing occurs: +// (1) If the KeyName can be found in the CSP, that key is used. +// (2) If the KeyName does not exist and the KeyFile does exist, the key +// in the KeyFile is installed into the CSP and used. +// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. +// When specifying the KeyFile, the location of the KeyFile should be +// relative to the project output directory which is +// %Project Directory%\obj\. For example, if your KeyFile is +// located in the project directory, you would specify the AssemblyKeyFile +// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] +// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework +// documentation for more information on this. +// +[assembly: AssemblyDelaySign(false)] +[assembly: AssemblyKeyFile("")] +[assembly: AssemblyKeyName("")] diff --git a/mcs/class/System.Windows.Forms/WINELib/BaseCollection.cs b/mcs/class/System.Windows.Forms/WINELib/BaseCollection.cs new file mode 100644 index 00000000000..ef6934c1c2f --- /dev/null +++ b/mcs/class/System.Windows.Forms/WINELib/BaseCollection.cs @@ -0,0 +1,79 @@ +// +// System.Windows.Forms.BaseCollection +// +// Author: +// stubbed out by Jaak Simm (jaaksimm@firm.ee) +// Dennis hayes (dennish@raytek.com) +// +// (C) Ximian, Inc., 2002 +// + +using System; +using System.Collections; + +namespace System.Windows.Forms { + + /// + /// Provides the base functionality for creating data-related collections in the System.Windows.Forms namespace. + /// ToDo note: + /// - Synchronization is not implemented + /// - MarshalByRefObject members not stubbed out + /// + + [MonoTODO] + public class BaseCollection : MarshalByRefObject, ICollection, IEnumerable { + + ArrayList list; + + + // --- Constructor --- + public BaseCollection() + { + this.list = null; + } + + + + // --- public and protected Properties --- + //virtual + int ICollection.Count { + get { + return list.Count; + } + } + + public bool IsReadOnly { + //always false as per spec. + get { return false; } + } + + [MonoTODO] + public bool IsSynchronized { + //always false as per spec. + get { return false; } + } + + protected virtual ArrayList List { + get { + return list; + } + } + + [MonoTODO] + public object SyncRoot { + get { return this; } + } + + // --- public Methods --- + public void CopyTo (Array ar, int index) + { + list.CopyTo(ar, index); + } + + public IEnumerator GetEnumerator() + { + return list.GetEnumerator(); + } + + } +} diff --git a/mcs/class/System.Windows.Forms/WINELib/Binding.cs b/mcs/class/System.Windows.Forms/WINELib/Binding.cs new file mode 100644 index 00000000000..1ffad0d12e1 --- /dev/null +++ b/mcs/class/System.Windows.Forms/WINELib/Binding.cs @@ -0,0 +1,101 @@ +// +// System.Windows.Forms.Binding.cs +// +// Author: +// stubbed out by Jaak Simm (jaaksimm@firm.ee) +// Dennis hayes (dennish@raytek.com) +// +// (C) 2002 Ximian, Inc +// + +namespace System.Windows.Forms { + public class Binding { + + /// + /// Represents the simple binding between the property value of an object and the property value of a control. + /// + /// ToDo note: + /// - Nothing is implemented + /// - MarshalByRefObject members not stubbed out + /// + + // --- Constructor + // + public Binding(string propertyName,object dataSource,string dataMember) + { + throw new NotImplementedException (); + } + + + // + // --- Public Properties + // + [MonoTODO] + public BindingManagerBase BindingManagerBase { + + get { throw new NotImplementedException (); } + } + + [MonoTODO] + public BindingMemberInfo BindingMemberInfo { + + get { throw new NotImplementedException (); } + } + + [MonoTODO] + public Control Control { + + get { throw new NotImplementedException (); } + } + + [MonoTODO] + public object DataSource { + + get { throw new NotImplementedException (); } + } + + [MonoTODO] + public bool IsBinding { + + get { throw new NotImplementedException (); } + } + + [MonoTODO] + public string PropertyName { + + get { throw new NotImplementedException (); } + } + + // + // --- Public Methods + // + [MonoTODO] + protected virtual void OnFormat(ConvertEventArgs cevent) + { + throw new NotImplementedException (); + } + + [MonoTODO] + protected virtual void OnParse(ConvertEventArgs cevent) + { + throw new NotImplementedException (); + } + + // + // --- Public Events + // + [MonoTODO] + public event ConvertEventHandler Format { + + add { throw new NotImplementedException (); } + remove { throw new NotImplementedException (); } + } + + [MonoTODO] + public event ConvertEventHandler Parse { + + add { throw new NotImplementedException (); } + remove { throw new NotImplementedException (); } + } + } +} diff --git a/mcs/class/System.Windows.Forms/WINELib/BindingContext.cs b/mcs/class/System.Windows.Forms/WINELib/BindingContext.cs new file mode 100644 index 00000000000..f6eeb6bc4e3 --- /dev/null +++ b/mcs/class/System.Windows.Forms/WINELib/BindingContext.cs @@ -0,0 +1,88 @@ +// +// System.Windows.Forms.BindingContext.cs +// +// Author: +// stubbed out by Jaak Simm (jaaksimm@firm.ee) +// Dennis hayes (dennish@raytek.com) +// +// (C) 2002 Ximian, Inc +// +using System.ComponentModel; +namespace System.Windows.Forms { + + public class BindingContext { + + /// + /// Manages the collection of BindingManagerBase objects for any object that inherits from the Control class. + /// + + //private + // --- Constructor + [MonoTODO] + public BindingContext () + { + // + } + + + // + // --- Public Properties + // Following properties not stubbed out, because they are only supporting internal .NET Framework infrastructure. + // - bool IsReadOnly {get;} + [MonoTODO] + public BindingManagerBase this[object dataSource] { + + get { throw new NotImplementedException (); } + } + + [MonoTODO] + public BindingManagerBase this[object dataSource,string dataMember] { + + get { throw new NotImplementedException (); } + } + + // + // --- Methods + // Following methods not stubbed out, because they are only supporting internal .NET Framework infrastructure. + // - protected virtual void AddCore(object dataSource,BindingManagerBase listManager) + // - protected virtual void ClearCore() + // - void ICollection.CopyTo(Array ar,int index) + // - IEnumerator IEnumerable.GetEnumerator() + // - protected virtual void OnCollectionChanged(CollectionChangeEventArgs ccevent) + // - protected virtual void RemoveCore(object dataSource) + [MonoTODO] + protected internal void Add(object dataSource, BindingManagerBase listManager) + { + throw new NotImplementedException (); + } + + [MonoTODO] + protected internal void Clear() + { + throw new NotImplementedException (); + } + + [MonoTODO] + public bool Contains(object dataSource) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public bool Contains(object dataSource,string dataMember) + { + throw new NotImplementedException (); + } + + [MonoTODO] + protected internal void Remove(object dataSource) + { + throw new NotImplementedException (); + } + + // + // --- Public Events + // Following events not stubbed out, because they are only supporting internal .NET Framework infrastructure + public event CollectionChangeEventHandler CollectionChanged; + } +} diff --git a/mcs/class/System.Windows.Forms/WINELib/BindingManagerBase.cs b/mcs/class/System.Windows.Forms/WINELib/BindingManagerBase.cs new file mode 100644 index 00000000000..ec2c968e3a4 --- /dev/null +++ b/mcs/class/System.Windows.Forms/WINELib/BindingManagerBase.cs @@ -0,0 +1,112 @@ +// +// System.Windows.Forms.BindingManagerBase.cs +// +// Author: +// stubbed out by Jaak Simm (jaaksimm@firm.ee) +// Dennis hayes (dennish@raytek.com) +// (C) 2002 Ximian, Inc +// + +using System.ComponentModel; +using System.Collections; + +namespace System.Windows.Forms { + //Compact Framework. Everything execpt suspend and resume binding needed for CE. + [MonoTODO] + public abstract class BindingManagerBase { + + + /// + /// Manages all Binding objects that are bound to the same data source and data member. This class is abstract. + /// + + // --- Constructor + [MonoTODO] + public BindingManagerBase () + { + } + + // + // --- Fields + protected EventHandler onCurrentChangedHandler; + protected EventHandler onPositionChangedHandler; + + + // + // --- Public Properties + [MonoTODO] + public BindingsCollection Bindings { + + get { throw new NotImplementedException (); } + } + + public abstract int Count { + + get; + } + + public abstract object Current { + + get; + } + + public abstract int Position { + + get; + set; + } + + // + // --- Methods + public abstract void AddNew(); + + public abstract void CancelCurrentEdit(); + + public abstract void EndCurrentEdit(); + + public abstract PropertyDescriptorCollection GetItemProperties (); + + [MonoTODO] + protected internal virtual PropertyDescriptorCollection GetItemProperties (ArrayList dataSources,ArrayList listAccessors) + { + throw new NotImplementedException (); + } + + [MonoTODO] + protected virtual PropertyDescriptorCollection GetItemProperties (Type listType,int offset,ArrayList dataSources,ArrayList listAccessors) + { + throw new NotImplementedException (); + } + + //protected abstract string GetListName(ArrayList listAccessors); + protected internal abstract string GetListName(ArrayList listAccessors); + + protected internal abstract void OnCurrentChanged(EventArgs e); + + [MonoTODO] + protected void PullData() + { + throw new NotImplementedException (); + } + + [MonoTODO] + protected void PushData() + { + throw new NotImplementedException (); + } + + public abstract void RemoveAt(int index); + + public abstract void ResumeBinding(); + public abstract void SuspendBinding(); + + protected abstract void UpdateIsBinding(); + + + // + // --- Public Events + + public event EventHandler CurrentChanged; + public event EventHandler PositionChanged; + } +} diff --git a/mcs/class/System.Windows.Forms/WINELib/BindingMemberInfo.cs b/mcs/class/System.Windows.Forms/WINELib/BindingMemberInfo.cs new file mode 100644 index 00000000000..f4268a7319a --- /dev/null +++ b/mcs/class/System.Windows.Forms/WINELib/BindingMemberInfo.cs @@ -0,0 +1,149 @@ +// +// System.Drawing.BindingMemberInfo.cs +// +// Author: +// Dennis Hayes (dennish@raytek.com) +// +// (C) 2002 Ximian, Inc. http://www.ximian.com +// +//TODO: +// 1) Add real values in constructor. +// 2) Verify nocheck needed in GetHashCode. +// 3) Verify GetHashCode returns decent and valid hash. + + +using System; +using System.Windows.Forms; +namespace System.Windows.Forms { + + public struct BindingMemberInfo { + + private string bindingfield; + private string bindingpath; + private string bindingmember; + + // ----------------------- + // Public Constructor + // ----------------------- + + /// + /// + /// + /// + /// + /// + /// + + public BindingMemberInfo (string dataMember) + { + //TODO: Initilize with real values. + bindingmember = (""); + bindingfield = (""); + bindingpath = (""); + } + + // ----------------------- + // Public Shared Members + // ----------------------- + + /// + /// Equality Operator + /// + /// + /// + /// Compares two BindingMemberInfo objects. The return value is + /// based on the equivalence of the BindingMember, BindingPath, + /// and BindingMember properties of the two objects. + /// + + public static bool operator == (BindingMemberInfo bmi_a, + BindingMemberInfo bmi_b) { + + return ((bmi_a.bindingfield == bmi_b.bindingfield) && + (bmi_a.bindingpath == bmi_b.bindingpath)&& + (bmi_a.bindingmember == bmi_b.bindingmember)); + } + + /// + /// Inequality Operator + /// + /// + /// + /// Compares two BindingMemberInfo objects. The return value is + /// based on the equivalence of the BindingMember, BindingPath, + /// and BindingMember properties of the two objects. + /// + public static bool operator != (BindingMemberInfo bmi_a, + BindingMemberInfo bmi_b) { + return ((bmi_a.bindingfield != bmi_b.bindingfield) || + (bmi_a.bindingpath != bmi_b.bindingpath)|| + (bmi_a.bindingmember != bmi_b.bindingmember)); + } + + // ----------------------- + // Public Instance Members + // ----------------------- + + + public string BindingField { + get{ + return bindingfield; + } + } + + public string BindingPath { + get{ + return bindingpath; + } + } + + public string BindingMember { + get{ + return bindingmember; + } + } + /// + /// Equals Method + /// + /// + /// + /// Checks equivalence of this BindingMemberInfo and another object. + /// + + public override bool Equals (object obj) + { + if (!(obj is BindingMemberInfo)) + return false; + + return (this == (BindingMemberInfo) obj); + } + + /// + /// GetHashCode Method + /// + /// + /// + /// Calculates a hashing value. + /// + + public override int GetHashCode () + { + unchecked{// MONOTODO: This should not be checked, remove unchecked, if redundant. + return (int)( bindingfield.GetHashCode() ^ bindingmember.GetHashCode() ^ bindingpath.GetHashCode()); + } + } + + /// + /// ToString Method + /// + /// + /// + /// Formats the BindingMemberInfo as a string. + /// + + public override string ToString () + { + return String.Format ("[{0},{1},{2}]", bindingpath, bindingfield, bindingmember); + } + } +} diff --git a/mcs/class/System.Windows.Forms/WINELib/BindingsCollection.cs b/mcs/class/System.Windows.Forms/WINELib/BindingsCollection.cs new file mode 100644 index 00000000000..54dfcea2ee4 --- /dev/null +++ b/mcs/class/System.Windows.Forms/WINELib/BindingsCollection.cs @@ -0,0 +1,113 @@ +// +// System.Windows.Forms.BindingsCollection.cs +// +// Author: +// stubbed out by Jaak Simm (jaaksimm@firm.ee) +// Dennis Hayes (dennish@Raytek.com) +// +// (C) 2002 Ximian, Inc +// + +using System.Collections; +using System.ComponentModel; + +namespace System.Windows.Forms { + + /// + /// Represents a collection of Binding objects for a control. + /// + /// + + [MonoTODO] + public class BindingsCollection : BaseCollection { + + #region Constructors + protected internal BindingsCollection () + { + } + #endregion + + // --- public and protected Properties --- + public virtual int Count { + get { + return base.Count; + } + } + + public Binding this[int index] { + get { + return (Binding)(base.List[index]); + } + } + + [MonoTODO] + protected override ArrayList List { + get { + return base.List; + } + } + + // --- public Methods --- + // following internal methods are (will) not be stubbed out: + // - protected virtual void AddCore(Binding dataBinding); + // - protected virtual void ClearCore(); + // - protected virtual void RemoveCore(Binding dataBinding); + // + // CollectionChanged event: + // Though it was not documented, here methods Add and Remove + // cause the CollectionChanged event to occur, similarily as Clear. + // Would be nice if someone checked the exact event behavior of .NET implementation. + + protected internal void Add(Binding binding) + { + base.List.Add(binding); + OnCollectionChanged(new CollectionChangeEventArgs( + CollectionChangeAction.Add, + base.List + )); + } + + protected internal void Clear() + { + base.List.Clear(); + OnCollectionChanged(new CollectionChangeEventArgs( + CollectionChangeAction.Refresh, + base.List + )); + } + + protected virtual void OnCollectionChanged(CollectionChangeEventArgs ccevent) + { + if (CollectionChanged != null) + CollectionChanged(this, ccevent); + } + + protected internal void Remove(Binding binding) + { + base.List.Remove(binding); + OnCollectionChanged(new CollectionChangeEventArgs( + CollectionChangeAction.Remove, + base.List + )); + } + + protected internal void RemoveAt(int index) + { + base.List.RemoveAt(index); + OnCollectionChanged(new CollectionChangeEventArgs( + CollectionChangeAction.Remove, + base.List + )); + } + + protected internal bool ShouldSerializeMyAll() + { + throw new NotImplementedException (); + if (this.Count>0) return true; + else return false; + } + + // public events + public event CollectionChangeEventHandler CollectionChanged; + } +} diff --git a/mcs/class/System.Windows.Forms/WINELib/BorderStyle.cs b/mcs/class/System.Windows.Forms/WINELib/BorderStyle.cs new file mode 100644 index 00000000000..ae105c61d4c --- /dev/null +++ b/mcs/class/System.Windows.Forms/WINELib/BorderStyle.cs @@ -0,0 +1,20 @@ +// +// System.Windows.Forms.BorderStyle.cs +// +// Author: +// Dennis Hayes (dennish@raytek.com) +// (C) 2002 Ximian, Inc. http://www.ximian.com +// + +using System; + +namespace System.Windows.Forms { + + /// + /// + public enum BorderStyle { + Fixed3D = 2, + FixedSingle = 1, + None = 0 + } +} diff --git a/mcs/class/System.Windows.Forms/WINELib/BoundsSpecified.cs b/mcs/class/System.Windows.Forms/WINELib/BoundsSpecified.cs new file mode 100644 index 00000000000..797552920e0 --- /dev/null +++ b/mcs/class/System.Windows.Forms/WINELib/BoundsSpecified.cs @@ -0,0 +1,25 @@ +// +// System.Windows.Forms.BoundsSpecified.cs +// +// Author: +// Dennis Hayes (dennish@raytek.com) +// (C) 2002 Ximian, Inc. http://www.ximian.com +// + +using System; + +namespace System.Windows.Forms { + + /// + /// + public enum BoundsSpecified { + All = 15, + Height = 8, + Location = 3, + None = 0, + Size = 12, + Width = 4, + X = 1, + Y = 2 + } +} diff --git a/mcs/class/System.Windows.Forms/WINELib/CheckState.cs b/mcs/class/System.Windows.Forms/WINELib/CheckState.cs new file mode 100644 index 00000000000..94464793c81 --- /dev/null +++ b/mcs/class/System.Windows.Forms/WINELib/CheckState.cs @@ -0,0 +1,27 @@ +// +// System.Windows.Forms.CheckState.cs +// +// Author: +// Jaak Simm (jaaksimm@firm.ee) +// Dennis Hayes (dennish@raytek.com) +// (C) 2002 Ximian, Inc. http://www.ximian.com +// + +using System; + +namespace System.Windows.Forms { + + + /// + /// Specifies the state of a control, such as a check box, + /// that can be checked, unchecked, or set to an indeterminate state. + /// + //[Serializable] + public enum CheckState { + + //Values were verified with enumcheck. + Unchecked = 0, + Checked = 1, + Indeterminate = 2, + } +} diff --git a/mcs/class/System.Windows.Forms/WINELib/ColorDepth.cs b/mcs/class/System.Windows.Forms/WINELib/ColorDepth.cs new file mode 100644 index 00000000000..9ee4992bb42 --- /dev/null +++ b/mcs/class/System.Windows.Forms/WINELib/ColorDepth.cs @@ -0,0 +1,22 @@ +// +// System.Windows.Forms.ColorDepth.cs +// +// Author: +// Dennis Hayes (dennish@raytek.com) +// (C) 2002 Ximian, Inc. http://www.ximian.com +// + +using System; + +namespace System.Windows.Forms { + + /// + /// + public enum ColorDepth { + Depth16Bit = 16, + Depth24Bit = 24, + Depth32Bit = 32, + Depth4Bit = 4, + Depth8Bit = 8 + } +} diff --git a/mcs/class/System.Windows.Forms/WINELib/ColumnClickEventArgs.cs b/mcs/class/System.Windows.Forms/WINELib/ColumnClickEventArgs.cs new file mode 100644 index 00000000000..1adcdbdc6e1 --- /dev/null +++ b/mcs/class/System.Windows.Forms/WINELib/ColumnClickEventArgs.cs @@ -0,0 +1,103 @@ +// +// System.Windows.Forms.ColumnClickEventArgs.cs +// +// Author: +// stubbed out by Jaak Simm (jaaksimm@firm.ee) +// Implmented by Dennis Hayes +// +// (C) Ximian, Inc., 2002 +// + +namespace System.Windows.Forms { + + /// + /// Provides data for the ColumnClick event. + /// + public class ColumnClickEventArgs : EventArgs { + + private int column; + /// --- Constructor --- + public ColumnClickEventArgs(int Column) : base() + { + column = Column; + } + + + /// --- Properties --- + public int Column { + get { + return column; + } + } + + /// + /// Equality Operator + /// + /// + /// + /// Compares two ColumnClickEventArgs objects. The return value is + /// based on the equivalence of the Column properties + /// of the two ColumnClickEventArgs. + /// + + public static bool operator == (ColumnClickEventArgs ColumnClickEventArgsA , ColumnClickEventArgs ColumnClickEventArgsB) + { + return ColumnClickEventArgsA.column == ColumnClickEventArgsB.column; + } + + /// + /// Inequality Operator + /// + /// + /// + /// Compares two ColumnClickEventArgs objects. The return value is + /// based on the equivalence of the Column properties + /// of the two ColumnClickEventArgs. + /// + + public static bool operator != (ColumnClickEventArgs ColumnClickEventArgsA, ColumnClickEventArgs ColumnClickEventArgsB) + { + return ColumnClickEventArgsA.column != ColumnClickEventArgsB.column; + } + /// + /// Equals Method + /// + /// + /// + /// Checks equivalence of this ColumnClickEventArgs and another object. + /// + + public override bool Equals (object obj) + { + if (!(obj is ColumnClickEventArgs))return false; + return (this == (ColumnClickEventArgs) obj); + } + + + /// + /// GetHashCode Method + /// + /// + /// + /// Calculates a hashing value. + /// + // If class has only one proprity, just return the hash code of the proprity. + public override int GetHashCode () + { + return column.GetHashCode(); + } + + /// + /// ToString Method + /// + /// + /// + /// Formats the ColumnClickEventArgs as a string. + /// + + public override string ToString () + { + return String.Format ("[{0}]", column); + } + } +} diff --git a/mcs/class/System.Windows.Forms/WINELib/ColumnClickEventHandler.cs b/mcs/class/System.Windows.Forms/WINELib/ColumnClickEventHandler.cs new file mode 100644 index 00000000000..b3f15632067 --- /dev/null +++ b/mcs/class/System.Windows.Forms/WINELib/ColumnClickEventHandler.cs @@ -0,0 +1,15 @@ +// +// System.Windows.Forms.ColumnClickEventHandler.cs +// +// Author: +// Dennis hayes (dennish@raytek.com) +// +// (C) 2002 Ximian, Inc. http://www.ximian.com +// +namespace System.Windows.Forms { + //[Serializable] + public delegate void ColumnClickEventHandler( + object sender, + ColumnClickEventArgs e + ); +} diff --git a/mcs/class/System.Windows.Forms/WINELib/ComVisible.cs b/mcs/class/System.Windows.Forms/WINELib/ComVisible.cs new file mode 100644 index 00000000000..5b55ebf5ee9 --- /dev/null +++ b/mcs/class/System.Windows.Forms/WINELib/ComVisible.cs @@ -0,0 +1,25 @@ +// +// System.Runtime.InteropServices.ComVisible.cs +// +// Author: +// Nick Drochak (ndrochak@gol.com) +// +// (C) 2002 Nick Drochak +// + +using System; + +namespace System.Windows.Forms { + + [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class + | AttributeTargets.Struct | AttributeTargets.Enum | + AttributeTargets.Method | AttributeTargets.Property | + AttributeTargets.Field | AttributeTargets.Interface | + AttributeTargets.Delegate)] + public sealed class ComVisibleAttribute : Attribute { + + private bool Visible = false; + public ComVisibleAttribute(bool value) {Visible = value;} + public bool Value { get {return Visible;} } + } +} diff --git a/mcs/class/System.Windows.Forms/WINELib/ContentsResizedEventArgs.cs b/mcs/class/System.Windows.Forms/WINELib/ContentsResizedEventArgs.cs new file mode 100644 index 00000000000..c439f824ced --- /dev/null +++ b/mcs/class/System.Windows.Forms/WINELib/ContentsResizedEventArgs.cs @@ -0,0 +1,122 @@ +// +// System.Windows.Forms.ColumnClickEventArgs.cs +// +// Author: +// stubbed out by Jaak Simm (jaaksimm@firm.ee) +// Partially completed by Dennis Hayes (dennish@raytek.com) +// Gianandrea Terzi (gianandrea.terzi@lario.com) +// +// (C) Ximian, Inc., 2002 +// + +using System.Drawing; + +namespace System.Windows.Forms { + + /// + /// Provides data for the ContentsResized event. + /// + + public class ContentsResizedEventArgs : EventArgs { + + #region Fields + private Rectangle newrectangle; + #endregion + + /// --- Constructor --- + public ContentsResizedEventArgs(Rectangle newRectangle) : base() + { + newrectangle = newRectangle; + } + + #region Public Propeties + public Rectangle NewRectangle + { + get { + return newrectangle; + } + } + #endregion + + #region Public Methods + + /// + /// Equality Operator + /// + /// + /// + /// Compares two ContentsResizedEventArgs objects. + /// The return value is based on the equivalence of + /// newRectangle Property + /// of the two ContentsResizedEventArgs. + /// + public static bool operator == (ContentsResizedEventArgs ContentsResizedEventArgsA, ContentsResizedEventArgs ContentsResizedEventArgsB) + { + return (ContentsResizedEventArgsA.NewRectangle == ContentsResizedEventArgsB.NewRectangle); + + } + + /// + /// Inequality Operator + /// + /// + /// + /// Compares two ContentsResizedEventArgs objects. + /// The return value is based on the equivalence of + /// newRectangle Property + /// of the two ContentsResizedEventArgs. + /// + public static bool operator != (ContentsResizedEventArgs ContentsResizedEventArgsA, ContentsResizedEventArgs ContentsResizedEventArgsB) + { + return (ContentsResizedEventArgsA.NewRectangle != ContentsResizedEventArgsB.NewRectangle); + + } + + /// + /// Equals Method + /// + /// + /// + /// Checks equivalence of this + /// ContentsResizedEventArgs and another + /// object. + /// + public override bool Equals (object obj) + { + if (!(obj is ContentsResizedEventArgs))return false; + return (this == (ContentsResizedEventArgs) obj); + } + + /// + /// GetHashCode Method + /// + /// + /// + /// Calculates a hashing value. + /// + [MonoTODO] + public override int GetHashCode () + { + //FIXME: add class specific stuff; + return base.GetHashCode(); + } + + /// + /// ToString Method + /// + /// + /// + /// Formats the object as a string. + /// + [MonoTODO] + public override string ToString () + { + //FIXME: add class specific stuff; + return base.ToString() + " ContentsResizedEventArgs"; + } + + + #endregion + + } +} diff --git a/mcs/class/System.Windows.Forms/WINELib/ContentsResizedEventHandler.cs b/mcs/class/System.Windows.Forms/WINELib/ContentsResizedEventHandler.cs new file mode 100644 index 00000000000..ed43ff42eb9 --- /dev/null +++ b/mcs/class/System.Windows.Forms/WINELib/ContentsResizedEventHandler.cs @@ -0,0 +1,16 @@ +// +// System.Windows.Forms.ContentsResizedEventHandler.cs +// +// Author: +// Dennis hayes (dennish@raytek.com) +// +// (C) 2002 Ximian, Inc. http://www.ximian.com +// + +namespace System.Windows.Forms { + //[Serializable] + public delegate void ContentsResizedEventHandler( + object sender, + ContentsResizedEventArgs e + ); +} diff --git a/mcs/class/System.Windows.Forms/WINELib/ContextMenu.cs b/mcs/class/System.Windows.Forms/WINELib/ContextMenu.cs new file mode 100644 index 00000000000..ac06acc5e6d --- /dev/null +++ b/mcs/class/System.Windows.Forms/WINELib/ContextMenu.cs @@ -0,0 +1,82 @@ +// +// System.Windows.Forms.ContextMenu.cs +// +// Author: +// stubbed out by Jaak Simm (jaaksimm@firm.ee) +// Dennis Hayes (dennish@Raytek.com) +// +// (C) Ximian, Inc., 2002 +// + +//using System.ComponentModel; +//using System.Collections; +using System.Drawing; + +namespace System.Windows.Forms { + + /// + /// Represents a Windows combo box control. + /// ToDo note: + /// - nothing is implemented + /// + + [MonoTODO] + public class ContextMenu : Menu { + + // private fields + RightToLeft rightToLeft; + + // --- Constructor --- + [MonoTODO] + public ContextMenu() //: base(null) + { + rightToLeft = RightToLeft.Inherit; + } + + [MonoTODO] + public ContextMenu(MenuItem[] menuItems) //: base(menuItems)//menu does not have public constructor. Is this a gtk menu? + { + } + + + + + // --- Properties --- + public virtual RightToLeft RightToLeft { + get { return rightToLeft; } + set { rightToLeft=value; } + } + + [MonoTODO] + public Control SourceControl { + get { throw new NotImplementedException (); } + } + + + + + /// --- Methods --- + /// internal .NET framework supporting methods, not stubbed out: + /// - protected internal virtual void OnPopup(EventArgs e); + [MonoTODO] + public void Show(Control control,Point pos) + { + throw new NotImplementedException (); + } + + + + + /// events + [MonoTODO] + public event EventHandler Popup { + add { + throw new NotImplementedException (); + } + remove { + throw new NotImplementedException (); + } + } + + } +} diff --git a/mcs/class/System.Windows.Forms/WINELib/ControlBindingsCollection.cs b/mcs/class/System.Windows.Forms/WINELib/ControlBindingsCollection.cs new file mode 100644 index 00000000000..1e5c9623e31 --- /dev/null +++ b/mcs/class/System.Windows.Forms/WINELib/ControlBindingsCollection.cs @@ -0,0 +1,85 @@ +// +// System.Windows.Forms.ControlBindingsCollection.cs +// +// Author: +// stubbed out by Jaak Simm (jaaksimm@firm.ee) +// Dennis Hayes (dennish@Raytek.com) +// +// (C) 2002 Ximian, Inc +// + +using System.Collections; +using System.ComponentModel; + +namespace System.Windows.Forms { + + /// + /// Represents the collection of data bindings for a control. + /// + /// ToDo note: + /// - no methods are implemented + /// + + [MonoTODO] + public class ControlBindingsCollection : BindingsCollection { + + #region Constructors + protected internal ControlBindingsCollection() : base () + { + } + #endregion + + + #region Properties + [MonoTODO] + public Control Control { + get { throw new NotImplementedException (); } + } + + [MonoTODO] + public Binding this[string propertyName] { + get { throw new NotImplementedException (); } + } + #endregion + + + + + #region Methods + /// following methods were not stubbed out, because they only support .NET framework: + /// - protected override void AddCore(Binding dataBinding); + /// - protected override void ClearCore(); + /// - protected override void RemoveCore(Binding dataBinding); + [MonoTODO] + public new void Add(Binding binding) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public Binding Add(string propertyName,object dataSource,string dataMember) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public new void Clear() + { + throw new NotImplementedException (); + } + + [MonoTODO] + public new void Remove(Binding binding) + { + throw new NotImplementedException (); + } + + [MonoTODO] + public new void RemoveAt(int index) + { + throw new NotImplementedException (); + } + #endregion + + } +} diff --git a/mcs/class/System.Windows.Forms/WINELib/ControlEventArgs.cs b/mcs/class/System.Windows.Forms/WINELib/ControlEventArgs.cs new file mode 100644 index 00000000000..7c8804b109d --- /dev/null +++ b/mcs/class/System.Windows.Forms/WINELib/ControlEventArgs.cs @@ -0,0 +1,121 @@ +// +// System.Windows.Forms.ControlEventArgs.cs +// +// Author: +// stubbed out by Jaak Simm (jaaksimm@firm.ee) +// implemented for Gtk+ by Rachel Hestilow (hestilow@ximian.com) +// Dennis Hayes (dennish@Raytek.com) +// Gianandrea Terzi (gianandrea.terzi@lario.com) + +// (C) Ximian, Inc., 2002 + + +namespace System.Windows.Forms { + + /// + /// Complete. + /// + + public class ControlEventArgs : EventArgs { + + #region Fields + Control control; + #endregion + + public ControlEventArgs(Control control) + { + this.control = control; + } + + #region Public Properties + public Control Control + { + get + { + return control; + } + } + #endregion + + #region Public Methods + + /// + /// Equality Operator + /// + /// + /// + /// Compares two ControlEventArgs objects. + /// The return value is based on the equivalence of + /// control Property + /// of the two ControlEventArgs. + /// + public static bool operator == (ControlEventArgs ControlEventArgsA, ControlEventArgs ControlEventArgsB) + { + return (ControlEventArgsA.Control == ControlEventArgsB.Control); + + } + + /// + /// Inequality Operator + /// + /// + /// + /// Compares two ControlEventArgs objects. + /// The return value is based on the equivalence of + /// control Property + /// of the two ControlEventArgs. + /// + public static bool operator != (ControlEventArgs ControlEventArgsA, ControlEventArgs ControlEventArgsB) + { + return (ControlEventArgsA.Control != ControlEventArgsB.Control); + + } + + /// + /// Equals Method + /// + /// + /// + /// Checks equivalence of this + /// ControlEventArgs and another + /// object. + /// + public override bool Equals (object obj) + { + if (!(obj is ControlEventArgs))return false; + return (this == (ControlEventArgs) obj); + } + + /// + /// GetHashCode Method + /// + /// + /// + /// Calculates a hashing value. + /// + [MonoTODO] + public override int GetHashCode () + { + //FIXME: add class specific stuff; + return base.GetHashCode(); + } + + /// + /// ToString Method + /// + /// + /// + /// Formats the object as a string. + /// + [MonoTODO] + public override string ToString () + { + //FIXME: add class specific stuff; + return base.ToString() + " ControlEventArgs"; + } + + + #endregion + + } +} diff --git a/mcs/class/System.Windows.Forms/WINELib/ControlEventHandler.cs b/mcs/class/System.Windows.Forms/WINELib/ControlEventHandler.cs new file mode 100644 index 00000000000..e478b17c87e --- /dev/null +++ b/mcs/class/System.Windows.Forms/WINELib/ControlEventHandler.cs @@ -0,0 +1,16 @@ +// +// System.Windows.Forms.ControlEventHandler.cs +// +// Author: +// Dennis hayes (dennish@raytek.com) +// +// (C) 2002 Ximian, Inc. http://www.ximian.com +// + +namespace System.Windows.Forms { + //[Serializable] + public delegate void ControlEventHandler ( + object sender, + ControlEventArgs e + ); +} diff --git a/mcs/class/System.Windows.Forms/WINELib/ControlStyles.cs b/mcs/class/System.Windows.Forms/WINELib/ControlStyles.cs new file mode 100644 index 00000000000..bddb6c49752 --- /dev/null +++ b/mcs/class/System.Windows.Forms/WINELib/ControlStyles.cs @@ -0,0 +1,32 @@ +// +// System.Windows.Forms.ControlStyles.cs +// +// Author: +// Dennis Hayes (dennish@raytek.com) +// (C) 2002 Ximian, Inc. http://www.ximian.com +// + +using System; + +namespace System.Windows.Forms { + + /// + /// + public enum ControlStyles { + AllPaintingInWmPaint = 8192, + CacheText = 16384, + ContainerControl = 1, + DoubleBuffer = 65536, + EnableNotifyMessage = 32768, + FixedHeight = 64, + FixedWidth = 32, + Opaque = 4, + ResizeRedraw = 16, + Selectable = 512, + StandardClick = 256, + StandardDoubleClick = 4096, + SupportsTransparentBackColor = 2045, + UserMouse = 1024, + UserPaint = 2 + } +} diff --git a/mcs/class/System.Windows.Forms/WINELib/changelog b/mcs/class/System.Windows.Forms/WINELib/changelog index 5dbbd3181df..38cf0dceda6 100644 --- a/mcs/class/System.Windows.Forms/WINELib/changelog +++ b/mcs/class/System.Windows.Forms/WINELib/changelog @@ -1,30 +1,3 @@ - 2002-10-18 DennisHayes - * Application.cs - * Button.cs - * ButtonBase.cs - * changelog - * ContainerControl.cs - * Control.cs - * DrawItemEventArgs.cs - * DrawItemEventHandler.cs - * Font.cs - * Form.cs - * IAccessible.cs - * IContainerControl.cs - * Label.cs - * MenuItem.cs - * MessageBox.cs - * NativeWindow.cs - * ScrollableControl.cs - * Win32.cs - - * Added some implmentation. Uncommented some stuff. - * About to add files to implment stuff uncommented. - - - 2002-10-19 John Sohn - * makefile: removed hard coded path to libmono - 2002-10-18 DennisHayes * Application.cs