dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dotgnu-pnet-commits] pnetlib/System.Drawing.Win32 DrawingToolkit.cs, 1.


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] pnetlib/System.Drawing.Win32 DrawingToolkit.cs, 1.23, 1.24 DrawingTopLevelWindow.cs, 1.7, 1.8 DrawingWindow.cs, 1.22, 1.23
Date: Mon, 01 Dec 2003 00:23:29 +0000

Update of /cvsroot/dotgnu-pnet/pnetlib/System.Drawing.Win32
In directory subversions:/tmp/cvs-serv6883/System.Drawing.Win32

Modified Files:
        DrawingToolkit.cs DrawingTopLevelWindow.cs DrawingWindow.cs 
Log Message:


Add the "IToolkitTopLevelWindow" interface to encapsulate top-level
window operations; implement some more top-level window operations in "Form".


Index: DrawingWindow.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/System.Drawing.Win32/DrawingWindow.cs,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** DrawingWindow.cs    16 Nov 2003 20:28:35 -0000      1.22
--- DrawingWindow.cs    1 Dec 2003 00:23:27 -0000       1.23
***************
*** 61,77 ****
        }
  
-       // Set the window title (top-level windows only).
-       void IToolkitWindow.SetTitle(String title)
-       {
-               if (hwnd == IntPtr.Zero)
-                       throw new ApplicationException("DrawingWindow.SetTitle 
ERROR:Cant set title. Hwnd not created yet");
-               if(title == null)
-               {
-                       title = String.Empty;
-               }
-               Win32.Api.SetWindowTextA(hwnd, title);
-               //Console.WriteLine("DrawingWindow.SetTitle, " + sink);
-       }
- 
        void IToolkitWindow.Lower()
        {
--- 61,64 ----
***************
*** 212,219 ****
        }
  
-       void 
IToolkitWindow.SetWindowFlags(System.Drawing.Toolkit.ToolkitWindowFlags flags)
-       {
-       }
- 
        // Set the background of the window to a solid color.
        void IToolkitWindow.SetBackground(System.Drawing.Color color)
--- 199,202 ----
***************
*** 290,303 ****
        {
        }
- 
-       void IToolkitWindow.Iconify()
-       {
-               if (hwnd == IntPtr.Zero)
-                       throw new ApplicationException("Can not minimize, 
window not created yet");
-               
-               Win32.Api.CloseWindow(hwnd);
-               //Console.WriteLine("DrawingWindow.Iconify, "+sink);
-       }
- 
  
        // Get a toolkit graphics object for this window.
--- 273,276 ----

Index: DrawingToolkit.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/System.Drawing.Win32/DrawingToolkit.cs,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** DrawingToolkit.cs   30 Nov 2003 05:50:40 -0000      1.23
--- DrawingToolkit.cs   1 Dec 2003 00:23:27 -0000       1.24
***************
*** 213,219 ****
  
        // Create a form.
!       public IToolkitWindow CreateTopLevelWindow(int width, int height, 
IToolkitEventSink sink)
                        {
!                               DrawingWindow window = new 
DrawingTopLevelWindow(this, string.Empty, width, height, sink);
                                windows.Add(window);
                                window.CreateWindow();
--- 213,219 ----
  
        // Create a form.
!       public IToolkitTopLevelWindow CreateTopLevelWindow(int width, int 
height, IToolkitEventSink sink)
                        {
!                               DrawingTopLevelWindow window = new 
DrawingTopLevelWindow(this, string.Empty, width, height, sink);
                                windows.Add(window);
                                window.CreateWindow();

Index: DrawingTopLevelWindow.cs
===================================================================
RCS file: 
/cvsroot/dotgnu-pnet/pnetlib/System.Drawing.Win32/DrawingTopLevelWindow.cs,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** DrawingTopLevelWindow.cs    2 Nov 2003 22:21:24 -0000       1.7
--- DrawingTopLevelWindow.cs    1 Dec 2003 00:23:27 -0000       1.8
***************
*** 23,27 ****
  using System;
  
! internal class DrawingTopLevelWindow : DrawingWindow, IToolkitWindow
  {
  
--- 23,27 ----
  using System;
  
! internal class DrawingTopLevelWindow : DrawingWindow, IToolkitTopLevelWindow
  {
  
***************
*** 57,62 ****
                        }
  
        // Change the set of supported window decorations and functions.
!       void IToolkitWindow.SetWindowFlags(ToolkitWindowFlags flags)
                        {
                                if (hwnd == IntPtr.Zero)
--- 57,120 ----
                        }
  
+       void IToolkitTopLevelWindow.Iconify()
+       {
+               if (hwnd == IntPtr.Zero)
+                       throw new ApplicationException("Can not minimize, 
window not created yet");
+               
+               Win32.Api.CloseWindow(hwnd);
+               //Console.WriteLine("DrawingWindow.Iconify, "+sink);
+       }
+ 
+       // Maximize the window.
+       void IToolkitTopLevelWindow.Maximize()
+       {
+               // TODO
+       }
+ 
+       // Restore the window from its iconified or maximized state.
+       void IToolkitTopLevelWindow.Restore()
+       {
+               // TODO
+       }
+ 
+       // Set the owner for modal and modeless dialog support.
+       void IToolkitTopLevelWindow.SetDialogOwner(IToolkitTopLevelWindow owner)
+       {
+               // TODO
+       }
+ 
+       // Set this window's icon.
+       void IToolkitTopLevelWindow.SetIcon(Icon icon)
+       {
+               // TODO
+       }
+ 
+       // Set this window's maximum size.
+       void IToolkitTopLevelWindow.SetMaximumSize(Size size)
+       {
+               // TODO
+       }
+ 
+       // Set this window's minimum size.
+       void IToolkitTopLevelWindow.SetMinimumSize(Size size)
+       {
+               // TODO
+       }
+ 
+       // Set the window title.
+       void IToolkitTopLevelWindow.SetTitle(String title)
+       {
+               if (hwnd == IntPtr.Zero)
+                       throw new ApplicationException("DrawingWindow.SetTitle 
ERROR:Cant set title. Hwnd not created yet");
+               if(title == null)
+               {
+                       title = String.Empty;
+               }
+               Win32.Api.SetWindowTextA(hwnd, title);
+               //Console.WriteLine("DrawingWindow.SetTitle, " + sink);
+       }
+ 
        // Change the set of supported window decorations and functions.
!       void IToolkitTopLevelWindow.SetWindowFlags(ToolkitWindowFlags flags)
                        {
                                if (hwnd == IntPtr.Zero)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]