rollback
authorDennis Hayes <dennis@mono-cvs.ximian.com>
Sun, 5 Jan 2003 02:40:25 +0000 (02:40 -0000)
committerDennis Hayes <dennis@mono-cvs.ximian.com>
Sun, 5 Jan 2003 02:40:25 +0000 (02:40 -0000)
svn path=/trunk/mcs/; revision=10162

mcs/class/System.Windows.Forms/System.Windows.Forms/AccessibleObject.cs
mcs/class/System.Windows.Forms/System.Windows.Forms/AmbientProperties.cs
mcs/class/System.Windows.Forms/System.Windows.Forms/ChangeLog
mcs/class/System.Windows.Forms/System.Windows.Forms/Form.cs
mcs/class/System.Windows.Forms/System.Windows.Forms/LinkLabel.cs
mcs/class/System.Windows.Forms/System.Windows.Forms/ListView.cs
mcs/class/System.Windows.Forms/System.Windows.Forms/Menu.cs
mcs/class/System.Windows.Forms/System.Windows.Forms/MenuItem.cs
mcs/class/System.Windows.Forms/System.Windows.Forms/win32functions.cs

index 5b6b4670a0aa6f3e6bdf022a286c90de7885a594..319cbb78f0e74a05c60ec025e9bfd2a64b266267 100644 (file)
@@ -81,17 +81,17 @@ namespace System.Windows.Forms {
        
                public virtual AccessibleObject Parent {
                        get { return parent; }
-                       //set { parent = value; } //get only
+                       set { parent = value; }
                }
                
                public virtual AccessibleRole Role {
                        get { return role; }
-                       //set { role = value; } //get only
+                       set { role = value; }
                }
        
                public virtual AccessibleStates State {
                        get { return state; }
-                       //set { state = value; } //get only
+                       set { state = value; }
                }
 
                // --- Methods ---
index 460a9249a86e612539be967457d8c0b222122053..5ef36c02f9132faa2bc83f7886277dbec543663a 100644 (file)
@@ -50,7 +50,7 @@ namespace System.Windows.Forms {
                        }
                }
        
-               public System.Windows.Forms.Font Font {
+               public Font Font {
                        get {
                                if(font != null){
                                        return  font;
index 64e938b05041984b4a38fa777a0c578ace619cff..83fe68ed0bb391ddb69b4ff152f45deb6de26d11 100644 (file)
@@ -1,11 +1,3 @@
-  2002-12-17  DennisHayes <dennish@raytek.com> \r
-       * checkin for Alexandre Pigolkine (pigolkine@gmx.de)\r
-       * Menu.cs\r
-       * MenuItems.cs\r
-       * More implmentation\r
-       * win32functions.cs\r
-       * added new menu api\r
-\r
   2002-12-9  DennisHayes <dennish@raytek.com>  \r
 \r
        * Form.cs\r
index 14e5e44ef44b261be525c91af3f8aa5f1f7b2bf9..daa6c3e2cb6210ca07e6cd0bd7d75706ed80e82a 100644 (file)
     
                
                //  --- Protected Properties
-                       private static bool classRegistered = false;
                
                protected override CreateParams CreateParams {
-                               get {
-                                       if (!classRegistered) {
-                                               WNDCLASS wndClass = new WNDCLASS();
-                                               wndClass.style = (int) (CS_.CS_OWNDC | CS_.CS_VREDRAW | CS_.CS_HREDRAW);
-                                               wndClass.lpfnWndProc = NativeWindow.GetWindowProc();
-                                               wndClass.cbClsExtra = 0;
-                                               wndClass.cbWndExtra = 0;
-                                               wndClass.hInstance = (IntPtr)0;
-                                               wndClass.hIcon = (IntPtr)0;
-                                               wndClass.hCursor = (IntPtr)0;
-                                               wndClass.hbrBackground = (IntPtr)6;  // ???
-                                               wndClass.lpszMenuName = "";
-                                               wndClass.lpszClassName = "MONOFORM";
-    
-                                               if (Win32.RegisterClass(ref wndClass) != 0) 
-                                                       classRegistered = true; 
-                                       }               
-
-                                       CreateParams createParams = new CreateParams ();
-                                       createParams.Caption = "Hello World";
-                                       createParams.ClassName = "MONOFORM";
-                                       createParams.X = Left;
-                                       createParams.Y = Top;
-                                       createParams.Width = Width;
-                                       createParams.Height = Height;
-                                       createParams.ClassStyle = 0;
-                                       createParams.ExStyle = 0;
-                                       createParams.Param = 0;
-                               
-                                       //if (parent != null)
-                                       //      createParams.Parent = parent.Handle;
-                                       //else 
-                                       //createParams.Style = (int) WindowStyles.WS_OVERLAPPEDWINDOW;
-                                       //test version with scroll bars.
-                                       createParams.Style = (int) (WindowStyles.WS_OVERLAPPEDWINDOW | WindowStyles.WS_HSCROLL | WindowStyles.WS_VSCROLL);
-         
-                                       return createParams;                    
-                               }
-                       }
+                       get {
+                               return base.CreateParams;
+                       }
+               }
     
                protected override ImeMode DefaultImeMode {
                        get {
index cd0428502b352004414d4138b69da4d8806cbfcc..7cafa305b0e20bb00edbd83ff2a0f3f96994a058 100644 (file)
@@ -420,25 +420,19 @@ namespace System.Windows.Forms {
                        }
                        
                        object IList.this[int index] {
-                               [MonoTODO]
-                               get {
-                                       throw new NotImplementedException ();
-                               }
-                               [MonoTODO]
-                               set {
-                                       //FIXME:
-                               }
+                               [MonoTODO] get { throw new NotImplementedException (); }
+                               [MonoTODO] set { throw new NotImplementedException (); }
                        }
+                       
+
                        object ICollection.SyncRoot {
-                               [MonoTODO] 
-                               get {
+                               [MonoTODO] get {
                                        throw new NotImplementedException ();
                                }
                        }
        
                        bool ICollection.IsSynchronized {
-                               [MonoTODO]
-                               get {
+                               [MonoTODO] get {
                                        throw new NotImplementedException ();
                                }
                        }
index 2607c90e1c03b4b59dc71496fe5ff76e083bdec0..444fe355c624c1210a1590e38007a935db2772bd 100644 (file)
@@ -240,12 +240,11 @@ namespace System.Windows.Forms {
                                throw new NotImplementedException ();
                        }
                }
+               [MonoTODO]
                public ImageList SmallImageList {
-                       [MonoTODO]
                        get {
                                throw new NotImplementedException ();
                        }
-                       [MonoTODO]
                        set {
                                //FIXME:
                        }
@@ -897,14 +896,8 @@ namespace System.Windows.Forms {
                        }
 
                        object IList.this[int index]{
-                               [MonoTODO]
-                               get{
-                                       throw new NotImplementedException ();
-                               }
-                               [MonoTODO]
-                               set{
-                                       //FIXME:
-                               }
+                               [MonoTODO] get { throw new NotImplementedException (); }
+                               [MonoTODO] set { throw new NotImplementedException (); }
                        }
                
                        [MonoTODO]
@@ -1243,14 +1236,8 @@ namespace System.Windows.Forms {
                        }
 
                        object IList.this[int index]{
-                               [MonoTODO]
-                               get{
-                                       throw new NotImplementedException ();
-                               }
-                               [MonoTODO]
-                               set{
-                                       //FIXME:
-                               }
+                               [MonoTODO] get { throw new NotImplementedException (); }
+                               [MonoTODO] set { throw new NotImplementedException (); }
                        }
                
                        [MonoTODO]
index b0ac683b1ee447da13c6ff76f3e0a832e186046a..58e6a3dd73517abffe8eae437ab36e233a64363e 100644 (file)
@@ -23,7 +23,7 @@ namespace System.Windows.Forms  {
        /// <summary>
        /// </summary>
        using System.ComponentModel;
-       public abstract class Menu : Component  {
+       public abstract class Menu : Component {
 
                //
                // -- Public Methods
@@ -41,7 +41,7 @@ namespace System.Windows.Forms  {
 
                [MonoTODO]
                public virtual void MergeMenu(Menu menuSrc) {
-                       // FIXME:
+                       //FIXME:
                }
                
                [MonoTODO]
@@ -56,7 +56,7 @@ namespace System.Windows.Forms  {
                //
 
                protected void CloneMenu(Menu menuSrc) {
-                       // FIXME:
+                       //FIXME:
                }
 
                protected Menu( MenuItem[] items) {
@@ -67,31 +67,21 @@ namespace System.Windows.Forms  {
                // -- Public Properties
                //
 
-               private bool menuStructureModified_ = true;
-
-               internal bool MenuStructureModified {
-                       set {
-                               menuStructureModified_ = value;
-                       }
-               }
-
+               protected internal bool menuStructureModified_ = true;
                
-               internal void BuildMenuStructure () {
+               internal void BuildMenuStructure ()
+               {
                        if( menuStructureModified_) {
-                               Win32.SetMenuDefaultItem(menuHandle_, -1, 0);
                                while( Win32.RemoveMenu( menuHandle_, 0, (uint)MF_.MF_BYPOSITION) != 0);
                                foreach(MenuItem mi in MenuItems) {
-                                       //System.Console.WriteLine("MenuItem {0} Parent {1}", mi.Text, mi.IsParent);
+                                       System.Console.WriteLine("MenuItem {0} Parent {1}", mi.Text, mi.IsParent);
                                        if( mi.IsParent){
                                                Win32.AppendMenuA( menuHandle_, (int)MF_.MF_ENABLED | (int)MF_.MF_STRING | (int)MF_.MF_POPUP,
                                                                                                                        mi.Handle, mi.Text);
                                        }
                                        else {
-                                               Win32.AppendMenuA( menuHandle_, mi.MenuItemFlags,
+                                               Win32.AppendMenuA( menuHandle_, (int)MF_.MF_ENABLED | (int)MF_.MF_STRING,
                                                                   (IntPtr) mi.GetID(), mi.Text);
-                                               if(mi.DefaultItem) {
-                                                       Win32.SetMenuDefaultItem(menuHandle_, mi.GetID(), 0);
-                                               }
                                        }
                                }
                                menuStructureModified_ = false;
@@ -101,7 +91,8 @@ namespace System.Windows.Forms  {
         protected Menu parent_ = null;
         
                protected IntPtr menuHandle_ = IntPtr.Zero;
-               internal void CreateMenuHandle() {
+               internal void CreateMenuHandle()
+               {
                        if( menuHandle_ == IntPtr.Zero) {
                                menuHandle_ = Win32.CreateMenu();
                                //System.Console.WriteLine("Create menu {0}", menuHandle_);
@@ -142,12 +133,12 @@ namespace System.Windows.Forms  {
                        }
                }
 
-
                // Library interface
 
                // Recursively searches for specified item in menu.
                // Goes immediately into child, when mets one.
-               internal MenuItem GetMenuItemByID (uint id) {
+               internal MenuItem GetMenuItemByID (uint id)
+               {
                        foreach( MenuItem mi in MenuItems) {
                                if( mi.IsParent) {
                                        MenuItem submi = mi.GetMenuItemByID(id);
@@ -164,7 +155,8 @@ namespace System.Windows.Forms  {
                
                private static Hashtable allMenus_ = new Hashtable();
                
-               internal static Menu GetMenuByHandle (IntPtr hMenu) {
+               internal static Menu GetMenuByHandle (IntPtr hMenu)
+               {
                        Menu result = null;
                        try {
                                result = allMenus_[hMenu] as Menu;
@@ -176,7 +168,8 @@ namespace System.Windows.Forms  {
                        return result;
                }
                
-               internal void OnNewMenuItemAdd (MenuItem mi){
+               internal void OnNewMenuItemAdd (MenuItem mi)
+               {
                        menuStructureModified_ = true;
                        mi.SetParent( this);
                }
@@ -198,7 +191,7 @@ namespace System.Windows.Forms  {
                                menuHandle_ = IntPtr.Zero;
                                
                                if( parent_ != null) {
-                                       parent_.MenuStructureModified = true;
+                                       parent_.menuStructureModified_ = true;
                                }
                        }
                }
@@ -212,6 +205,10 @@ namespace System.Windows.Forms  {
                        BuildMenuStructure();
                }
 
+               //
+               // -- Protected Properties
+               //
+
                //
                // System.Windows.Forms.Menu.MenuItemCollection.cs
                //
@@ -234,7 +231,8 @@ namespace System.Windows.Forms  {
                                parentMenu_ = m;
                        }
 
-                       internal void MoveItemToIndex( int index, MenuItem mi) {
+                       internal void MoveItemToIndex( int index, MenuItem mi)
+                       {
                                if( index >= items_.Count){
                                        // FIXME: Set exception parameters
                                        throw new ArgumentException();
@@ -257,6 +255,17 @@ namespace System.Windows.Forms  {
                                        items_.Add(mi);
                                        result = items_.Count - 1;
                                        mi.SetIndex(result);
+                                       //System.Console.WriteLine("Adding menuItem {0}, parent {1}", mi.Text, mi.IsParent);
+/*                                     
+                                       if( mi.IsParent){
+                                               Win32.AppendMenuA( parentMenu_.Handle, (int)MF_.MF_ENABLED | (int)MF_.MF_STRING | (int)MF_.MF_POPUP,
+                                                                                                                       mi.Handle, mi.Text);
+                                       }
+                                       else {
+                                               Win32.AppendMenuA( parentMenu_.Handle, (int)MF_.MF_ENABLED | (int)MF_.MF_STRING,
+                                                                  (IntPtr) mi.GetID(), mi.Text);
+                                       }
+*/                                     
                                }
                                return result;
                        }
@@ -280,6 +289,18 @@ namespace System.Windows.Forms  {
                                        items_.Insert(i, mi);
                                        result = i;
                                        mi.SetIndex(result);
+/*                                     
+                                       if( mi.IsParent){
+                                               Win32.InsertMenuA( parentMenu_.Handle, (uint)i,
+                                                                                       (int)MF_.MF_ENABLED | (int)MF_.MF_STRING | (int)MF_.MF_POPUP | (int)MF_.MF_BYPOSITION,
+                                                                                       mi.Handle, mi.Text);
+                                       }
+                                       else {
+                                               Win32.InsertMenuA( parentMenu_.Handle, (uint)i,
+                                                                                       (int)MF_.MF_ENABLED | (int)MF_.MF_STRING | (int)MF_.MF_BYPOSITION,
+                                                                                       (IntPtr) mi.GetID(), mi.Text);
+                                       }
+*/                                     
                                }
                                return result;
                        }
@@ -300,22 +321,18 @@ namespace System.Windows.Forms  {
                                }
                        }
 
-                       private void DoClear() {
-                               if( parentMenu_ != null) {
+                       public virtual void Clear() {
+                               if( parentMenu_ != null){
                                        foreach( MenuItem mi in items_) {
                                                parentMenu_.OnRemoveMenuItem( mi);
                                        }
                                }
                                items_.Clear();
-                               if( parentMenu_ != null) {
+                               if( parentMenu_ != null){
                                        parentMenu_.OnLastSubItemRemoved();
                                }                               
                        }
 
-                       public virtual void Clear() {
-                               DoClear();
-                       }
-
                        public bool Contains(MenuItem m) {
                                return items_.Contains(m);
                        }
@@ -328,16 +345,6 @@ namespace System.Windows.Forms  {
                                }
                        }
 
-                       public override bool Equals(object o) {
-                               return base.Equals(o);
-                       }
-
-                       [MonoTODO]
-                       public override int GetHashCode() {
-                               //FIXME add our proprities
-                               return base.GetHashCode();
-                       }
-
                        public IEnumerator GetEnumerator() {
                                return items_.GetEnumerator();
                        }
@@ -362,23 +369,6 @@ namespace System.Windows.Forms  {
                                Remove(items_[i] as MenuItem);
                        }
 
-                       public override string ToString() {
-                               throw new NotImplementedException ();
-                       }
-
-                       //
-                       // -- Protected Methods
-                       //
-
-                       ~MenuItemCollection() {
-                               Clear();
-                       }
-
-                       //inherited
-                       //protected object MemberwiseClone() {
-                       //      throw new NotImplementedException ();
-                       //}
-
                        //
                        // -- Public Properties
                        //
@@ -400,102 +390,79 @@ namespace System.Windows.Forms  {
                        /// <summary>
                        /// IList Interface implmentation.
                        /// </summary>
-                       bool IList.IsReadOnly {
-                               get {
+                       bool IList.IsReadOnly{
+                               get{
                                        // We allow addition, removeal, and editing of items after creation of the list.
                                        return false;
                                }
                        }
-
-                       bool IList.IsFixedSize {
-                               get {
+                       bool IList.IsFixedSize{
+                               get{
                                        // We allow addition and removeal of items after creation of the list.
                                        return false;
                                }
                        }
 
-                       public MenuItem this[int index] {
-                               get {
-                                       return items_[index] as MenuItem;
-                               }
-                       }
-
-                       //[MonoTODO]
-                       object IList.this[int index] {
-                               get {
-                                       return items_[index];
-                               }
-                               set {
-                                       // FIXME: Set exception members
-                                       throw new System.NotSupportedException();
-                               }
+                       object IList.this[int index]{
+                               [MonoTODO] get { throw new NotImplementedException (); }
+                               [MonoTODO] set { throw new NotImplementedException (); }
                        }
                
                        [MonoTODO]
-                       void IList.Clear() {
-                               DoClear();
+                       void IList.Clear(){
+                               //FIXME:
                        }
-
-                       private MenuItem Object2MenuItem( object value) {
-                               MenuItem result = value as MenuItem;
-                               if( result == null) {
-                                       // FIXME: Set exception parameters
-                                       throw new System.ArgumentException();
-                               }
-                               return result;
-                       }
-
+               
                        [MonoTODO]
-                       int IList.Add( object value) {
-                               return Add( Object2MenuItem(value));
+                       int IList.Add( object value){
+                               throw new NotImplementedException ();
                        }
 
                        [MonoTODO]
-                       bool IList.Contains( object value) {
-                               return Contains(Object2MenuItem(value));
+                       bool IList.Contains( object value){
+                               throw new NotImplementedException ();
                        }
 
                        [MonoTODO]
-                       int IList.IndexOf( object value) {
-                               return IndexOf(Object2MenuItem(value));
+                       int IList.IndexOf( object value){
+                               throw new NotImplementedException ();
                        }
 
                        [MonoTODO]
-                       void IList.Insert(int index, object value) {
-                               Add( index, Object2MenuItem(value));
+                       void IList.Insert(int index, object value){
+                               //FIXME:
                        }
 
                        [MonoTODO]
-                       void IList.Remove( object value) {
-                               Remove( Object2MenuItem(value));
+                       void IList.Remove( object value){
+                               //FIXME:
                        }
 
                        [MonoTODO]
                        void IList.RemoveAt( int index){
-                               RemoveAt(index);
+                               //FIXME:
                        }
                        // End of IList interface
-
                        /// <summary>
                        /// ICollection Interface implmentation.
                        /// </summary>
-                       int ICollection.Count {
-                               get {
-                                       return Count;
+                       int ICollection.Count{
+                               get{
+                                       throw new NotImplementedException ();
                                }
                        }
-                       bool ICollection.IsSynchronized {
-                               get {
+                       bool ICollection.IsSynchronized{
+                               get{
                                        throw new NotImplementedException ();
                                }
                        }
-                       object ICollection.SyncRoot {
-                               get {
+                       object ICollection.SyncRoot{
+                               get{
                                        throw new NotImplementedException ();
                                }
                        }
                        void ICollection.CopyTo(Array array, int index){
-                               CopyTo(array, index);
+                               throw new NotImplementedException ();
                        }
                        // End Of ICollection
                }
index b7e839fce1409353025b5018a79adae2abce900f..3468336935b70ba3ce553e8ce29d7f47b2801e0f 100644 (file)
@@ -21,7 +21,6 @@ using System.Text;
 namespace System.Windows.Forms {
 
        /// <summary>
-       /// ToDo note:
        /// </summary>
 
        public class MenuItem : Menu {
@@ -32,16 +31,16 @@ namespace System.Windows.Forms {
                }
 
                public MenuItem(string s) : this(){
-                       Text = s;
+                       text_ = s;
                }
 
                public MenuItem(string s, EventHandler e) : this() {
-                       Text = s;
+                       text_ = s;
                        Click += e;
                }
 
                public MenuItem(string s, MenuItem[] items) : base(items) {
-                       Text = s;
+                       text_ = s;
                }
 
                public MenuItem(string s, EventHandler e, Shortcut sc) : this() {
@@ -142,71 +141,34 @@ namespace System.Windows.Forms {
                //
                // -- Public Properties
                //
-               private void ModifyParent() 
-               {
-                       if( Parent != null) 
-                       {
-                               Parent.MenuStructureModified = true;
-                       }
-               }
-
-               private uint MenuItemFlags_ = (uint)MF_.MF_ENABLED | (uint)MF_.MF_STRING;
-               internal uint MenuItemFlags 
-               {
-                       get
-                       {
-                               return MenuItemFlags_;
-                       }
-               }
-
-               private bool GetPropertyByFlag( MF_ flag)
-               {
-                       return (MenuItemFlags_ & (uint)flag) != 0 ? true : false;
-               }
-
-               private void SetPropertyByFlag( MF_ flag, bool SetOrClear)
-               {
-                       uint PrevState = MenuItemFlags_;
-                       if( SetOrClear)
-                       {
-                               MenuItemFlags_ |= (uint)flag;
-                       }
-                       else 
-                       {
-                               MenuItemFlags_ &= ~(uint)flag;
-                       }
-                       if( PrevState != MenuItemFlags_)
-                               ModifyParent();
-               }
 
                public bool BarBreak {
+
                        get {
-                               return GetPropertyByFlag(MF_.MF_MENUBARBREAK);
+                               throw new NotImplementedException ();
                        }
                        set {
-                               SetPropertyByFlag(MF_.MF_MENUBARBREAK, value);
+                               throw new NotImplementedException ();
                        }
                }
 
-               public bool Break 
-               {
+               public bool Break {
+
                        get {
-                               return GetPropertyByFlag(MF_.MF_MENUBREAK);
+                               throw new NotImplementedException ();
                        }
                        set {
-                               SetPropertyByFlag(MF_.MF_MENUBREAK, value);
+                               throw new NotImplementedException ();
                        }
                }
 
-               public bool Checked 
-               {
-                       get 
-                       {
-                               return GetPropertyByFlag(MF_.MF_CHECKED);
+               public bool Checked {
+
+                       get {
+                               throw new NotImplementedException ();
                        }
-                       set 
-                       {
-                               SetPropertyByFlag(MF_.MF_CHECKED, value);
+                       set {
+                               throw new NotImplementedException ();
                        }
                }
 
@@ -217,24 +179,22 @@ namespace System.Windows.Forms {
                //}
 
                public bool DefaultItem {
-                       get 
-                       {
-                               return GetPropertyByFlag(MF_.MF_DEFAULT);
+
+                       get {
+                               throw new NotImplementedException ();
                        }
-                       set 
-                       {
-                               SetPropertyByFlag(MF_.MF_DEFAULT, value);
+                       set {
+                               throw new NotImplementedException ();
                        }
                }
 
                public bool Enabled {
-                       get 
-                       {
-                               return !GetPropertyByFlag(MF_.MF_DISABLED | MF_.MF_GRAYED);
+
+                       get {
+                               throw new NotImplementedException ();
                        }
-                       set 
-                       {
-                               SetPropertyByFlag(MF_.MF_DISABLED | MF_.MF_GRAYED, !value);
+                       set {
+                               throw new NotImplementedException ();
                        }
                }
 /*
@@ -259,9 +219,9 @@ namespace System.Windows.Forms {
                        }
                        set {
                                if( index_ != value){
-                                       if(Parent != null) {
+                                       if(Parent != null){
                                                Parent.MenuItems.MoveItemToIndex(value, this);
-                                               Parent.MenuStructureModified = true;
+                                               Parent.menuStructureModified_ = true;
                                        }
                                }
                        }
@@ -312,11 +272,12 @@ namespace System.Windows.Forms {
                }
 
                public bool OwnerDraw {
+
                        get {
-                               return GetPropertyByFlag(MF_.MF_OWNERDRAW);
+                               throw new NotImplementedException ();
                        }
                        set {
-                               SetPropertyByFlag(MF_.MF_OWNERDRAW, value);
+                               throw new NotImplementedException ();
                        }
                }
 
@@ -334,15 +295,13 @@ namespace System.Windows.Forms {
                        }
                }
 
-               private bool RadioCheck_ = false;
                public bool RadioCheck {
 
                        get {
-                               return RadioCheck_;
+                               throw new NotImplementedException ();
                        }
                        set {
-                               RadioCheck_ = value;
-                               ModifyParent();
+                               throw new NotImplementedException ();
                        }
                }
 
@@ -364,27 +323,16 @@ namespace System.Windows.Forms {
                        }
                        set {
                                text_ = value;
-                               if( text_ == "-") {
-                                       SetPropertyByFlag(MF_.MF_SEPARATOR, true);
-                               }
-                               else {
-                                       SetPropertyByFlag(MF_.MF_SEPARATOR, false);
-                                       //SetPropertyByFlag(MF_.MF_STRING, true);
-                               }
-
-                               ModifyParent();
                        }
                }
 
-               private bool Visible_ = true;
                public bool Visible {
 
                        get {
-                               return Visible_;
+                               throw new NotImplementedException ();
                        }
                        set {
-                               Visible_ = value;
-                               ModifyParent();
+                               throw new NotImplementedException ();
                        }
                }
 
@@ -393,6 +341,7 @@ namespace System.Windows.Forms {
                //
 
                internal const int INVALID_MENU_ID = -1; //0xffffffff;
+               // Variables are stored here to provide access for the base functions
                protected int MenuID_ = INVALID_MENU_ID;
 
                // Provides unique id to all items in all menus, hopefully space is enougth.
@@ -400,7 +349,8 @@ namespace System.Windows.Forms {
                // and reuse them.
                protected static int MenuIDs_ = 1;
 
-               protected int GetNewMenuID() {
+               protected int GetNewMenuID()
+               {
                        return MenuIDs_++;
                }
 
@@ -418,7 +368,8 @@ namespace System.Windows.Forms {
                // Btw, this function is funky, it is being used by routines that are supposed
                // to be passing an IntPtr to the AppendMenu function
                //
-               internal int GetID() {
+               internal int GetID()
+               {
                        return MenuID;
                }
 
index 56c7b0112c8664e21d6982f14476523c1397257f..a6343bccd973141131fc8442073fa0b48036d801 100644 (file)
@@ -802,9 +802,6 @@ namespace System.Windows.Forms{
                         CallingConvention = CallingConvention.StdCall)]
                internal static extern int DrawMenuBar (IntPtr hWnd);
                
-               [DllImport ("user32.dll", 
-                        CallingConvention = CallingConvention.StdCall)]
-               internal static extern int SetMenuDefaultItem(IntPtr hMenu, int uItem, int fByPos );
 
 
                [DllImport ("user32.dll", CallingConvention =