Flush changes to get things compiling on Linux
authorMiguel de Icaza <miguel@gnome.org>
Sat, 2 Nov 2002 20:58:58 +0000 (20:58 -0000)
committerMiguel de Icaza <miguel@gnome.org>
Sat, 2 Nov 2002 20:58:58 +0000 (20:58 -0000)
svn path=/trunk/mcs/; revision=8769

mcs/class/System.Windows.Forms/System.Windows.Forms/ChangeLog
mcs/class/System.Windows.Forms/System.Windows.Forms/Menu.cs
mcs/class/System.Windows.Forms/System.Windows.Forms/StatusBarPanel.cs
mcs/class/System.Windows.Forms/System.Windows.Forms/Win32.cs
mcs/class/System.Windows.Forms/list.unix

index e666e9cf7079c88f8eb48905a4f001f0d528564f..5dc709783b5eed6e3012ea85ef6def99d76b3e99 100644 (file)
@@ -1,3 +1,8 @@
+2002-11-02  Miguel de Icaza  <miguel@ximian.com>\r
+\r
+       * Win32.cs: Added IsMenu, CreateMenu, AppendMenuA, DestroyMenu entry points.\r
+       \r
+\r
   2002-10-29  DennisHayes <dennish@raytek.com> \r
        * checkin for Alexandre Pigolkine (pigolkine@gmx.de)\r
        * Menu classes start on implmentation\r
index 9d78cfd0ffbb3925c94fd73e135d1ddb0a189cd2..9a2423cde9d5e9c798c4890c511ad53806a221b4 100644 (file)
@@ -100,7 +100,7 @@ namespace System.Windows.Forms  {
 \r
                ~Menu() {\r
                        // TODO: Check whats happening if Menu was already destroyed by Win32 Window\r
-                       if( Win32.IsMenu( menuHandle_) != 0)\r
+                       if (Win32.IsMenu( menuHandle_))\r
                                Win32.DestroyMenu( menuHandle_);\r
                }\r
 \r
@@ -197,6 +197,10 @@ namespace System.Windows.Forms  {
                        return null;\r
                }\r
 \r
+               //\r
+               // Btw, this function is funky, it is being used by routines that are supposed\r
+               // to be passing an IntPtr to the AppendMenu function\r
+               //\r
                internal virtual uint GetIDByMenuItem( MenuItem mi)\r
                {\r
                        // FIXME: Pay attention, do not assign an id to a "stranger"\r
@@ -275,7 +279,7 @@ namespace System.Windows.Forms  {
                                                }\r
                                                else {\r
                                                        Win32.AppendMenuA( parentMenu_.Handle, Win32.MF_ENABLED | Win32.MF_STRING,\r
-                                                                                                                               parentMenu_.GetIDByMenuItem(mi), mi.Text);\r
+                                                                          (IntPtr) parentMenu_.GetIDByMenuItem(mi), mi.Text);\r
                                                }\r
                                        }\r
                                }\r
index b5728b7744b6fcb413dae115fcf617203ed940b1..e67c1743de03f17bffe7bf0495cbca229d998493 100644 (file)
@@ -91,8 +91,9 @@ namespace System.Windows.Forms {
                        {\r
                                if  (value != StatusBarPanelAutoSize.None && value != StatusBarPanelAutoSize.Contents && value != StatusBarPanelAutoSize.Spring) {\r
 \r
-                                       throw new InvalidEnumArgumentException("System.Windows.Forms.StatusBarPanel::set_AutoSize(StatusBarPanelAutoSize) " +\r
-                                                                              "value is not a valid StatusBarPanelAutoSize value");\r
+                                       throw new InvalidEnumArgumentException(\r
+                                               "System.Windows.Forms.StatusBarPanel::set_AutoSize(StatusBarPanelAutoSize) " +\r
+                                               "value is not a valid StatusBarPanelAutoSize value");\r
                                }\r
                                autoSize = value;\r
                        }\r
index 1e2176e5bcc375ecd31e47a035b86458446f6a81..7152327e15d54c630408c6625f14c0cc9f3e5892 100644 (file)
@@ -104,6 +104,20 @@ namespace System.Windows.Forms {
                        IntPtr hWndParent, IntPtr hMenu, IntPtr hInstance,
                        ref object lpParam);
 
+               [DllImport ("user32.dll", 
+                           CallingConvention = CallingConvention.StdCall, 
+                           CharSet = CharSet.Auto)]
+               public static extern IntPtr CreateMenu ();
+
+               [DllImport ("user32.dll", 
+                           CallingConvention = CallingConvention.StdCall, 
+                           CharSet = CharSet.Ansi)]
+               public static extern bool AppendMenuA(IntPtr hMenu, uint uflags, IntPtr NewItem, string item);
+
+               [DllImport ("user32.dll", 
+                           CallingConvention = CallingConvention.StdCall)]
+               public static extern bool DestroyMenu (IntPtr hMenu);
+               
                [DllImport ("user32.dll", CallingConvention = 
                            CallingConvention.StdCall, CharSet = CharSet.Auto)]
                public extern static IntPtr DefWindowProcA (
@@ -222,6 +236,12 @@ namespace System.Windows.Forms {
                            CharSet = CharSet.Auto)]
                public static extern bool IsWindowEnabled (IntPtr hWnd);
 
+               [DllImport ("user32.dll", 
+                           CallingConvention = CallingConvention.StdCall, 
+                           CharSet = CharSet.Auto)]
+               public static extern bool IsMenu (IntPtr hWnd);
+
+               
                [DllImport ("user32.dll", 
                            CallingConvention = CallingConvention.StdCall, 
                            CharSet = CharSet.Auto)]
@@ -703,6 +723,10 @@ namespace System.Windows.Forms {
                public const int SS_RIGHTJUST        = 0x00000400;
                public const int SS_REALSIZEIMAGE    = 0x00000800;
                public const int SS_SUNKEN           = 0x00001000;
+
+               public const int MF_ENABLED          = 0;
+               public const int MF_STRING           = 0;
+               public const int MF_POPUP            = 0x10;
        }
 
 }
index d317d264496277038944ff0c8520b196506e6558..9732bb234a22cca1dcc86f2ea286d0aec36e938b 100644 (file)
@@ -280,7 +280,6 @@ System.Windows.Forms/TabControl.cs
 System.Windows.Forms/TabDrawMode.cs
 System.Windows.Forms/TabPage.cs
 System.Windows.Forms/TabSizeMode.cs
-System.Windows.Forms.Test/MenuTest.cs
 System.Windows.Forms/TextBoxBase.cs
 System.Windows.Forms/TextBox.cs
 System.Windows.Forms/ThreadExceptionDialog.cs