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

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

[Dotgnu-pnet-commits] CVS: pnetlib/Xsharp InputOutputWidget.cs,1.2,1.3


From: Rhys Weatherley <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: pnetlib/Xsharp InputOutputWidget.cs,1.2,1.3
Date: Wed, 11 Jun 2003 06:37:30 -0400

Update of /cvsroot/dotgnu-pnet/pnetlib/Xsharp
In directory subversions:/tmp/cvs-serv21569/Xsharp

Modified Files:
        InputOutputWidget.cs 
Log Message:


Process user-initiated move and resize events from the window manager;
implement "SetBoundsCore" and window invalidation.


Index: InputOutputWidget.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/Xsharp/InputOutputWidget.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** InputOutputWidget.cs        6 Jun 2003 10:46:45 -0000       1.2
--- InputOutputWidget.cs        11 Jun 2003 10:37:28 -0000      1.3
***************
*** 328,331 ****
--- 328,386 ----
  
        /// <summary>
+       /// <para>Force a repaint on a section of this widget.</para>
+       /// </summary>
+       ///
+       /// <param name="x">
+       /// <para>The X co-ordinate of the top-left corner of
+       /// the section to repaint.</para>
+       /// </param>
+       ///
+       /// <param name="y">
+       /// <para>The Y co-ordinate of the top-left corner of
+       /// the section to repaint.</para>
+       /// </param>
+       ///
+       /// <param name="width">
+       /// <para>The width of the section to repaint.</para>
+       /// </param>
+       ///
+       /// <param name="height">
+       /// <para>The height of the section to repaint.</para>
+       /// </param>
+       ///
+       /// <exception cref="T:Xsharp.XException">
+       /// <para>Raised if <paramref name="x"/>, <paramref name="y"/>,
+       /// <paramref name="width"/>, or <paramref name="height"/> are
+       /// out of range.</para>
+       /// </exception>
+       public void Repaint(int x, int y, int width, int height)
+                       {
+                               if(x < -32768 || x > 32767 ||
+                                  y < -32768 || y > 32767)
+                               {
+                                       throw new 
XException(S._("X_InvalidPosition"));
+                               }
+                               if(width < 1 || width > 32767 ||
+                                  height < 1 || height > 32767)
+                               {
+                                       throw new 
XException(S._("X_InvalidSize"));
+                               }
+                               try
+                               {
+                                       IntPtr display = dpy.Lock();
+                                       if(mapped && AncestorsMapped)
+                                       {
+                                               Xlib.XClearArea(display, 
GetWidgetHandle(),
+                                                                               
x, y, (uint)width, (uint)height,
+                                                                               
Xlib.Bool.True);
+                                       }
+                               }
+                               finally
+                               {
+                                       dpy.Unlock();
+                               }
+                       }
+ 
+       /// <summary>
        /// <para>Process a color theme change for this widget.</para>
        /// </summary>





reply via email to

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