diff dwt/widgets/Control.d @ 351:f1bb3949939b

Update to SWT 3.4.1
author Frank Benoit <benoit@tionex.de>
date Mon, 03 Nov 2008 23:35:30 +0100
parents c0d810de7093
children 4bffbf81e2d6
line wrap: on
line diff
--- a/dwt/widgets/Control.d	Sun Nov 02 01:30:09 2008 -0800
+++ b/dwt/widgets/Control.d	Mon Nov 03 23:35:30 2008 +0100
@@ -78,7 +78,7 @@
  * IMPORTANT: This class is intended to be subclassed <em>only</em>
  * within the DWT implementation.
  * </p>
- * 
+ *
  * @see <a href="http://www.eclipse.org/swt/snippets/#control">Control snippets</a>
  * @see <a href="http://www.eclipse.org/swt/examples.php">DWT Example: ControlExample</a>
  * @see <a href="http://www.eclipse.org/swt/">Sample code and further information</a>
@@ -337,7 +337,7 @@
 
 /**
  * Prints the receiver and all children.
- * 
+ *
  * @param gc the gc where the drawing occurs
  * @return <code>true</code> if the operation was successful and <code>false</code> otherwise
  *
@@ -349,7 +349,7 @@
  *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
  * </ul>
- * 
+ *
  * @since 3.4
  */
 public bool print (GC gc) {
@@ -1000,7 +1000,7 @@
  *
  * @exception IllegalArgumentException <ul>
  *    <li>ERROR_INVALID_ARGUMENT - if the region has been disposed</li>
- * </ul>  
+ * </ul>
  * @exception DWTException <ul>
  *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
@@ -2469,12 +2469,12 @@
     return result;
 }
 
-/** 
+/**
  * Returns the region that defines the shape of the control,
  * or null if the control has the default shape.
  *
  * @return the region that defines the shape of the shell (or null)
- *  
+ *
  * @exception DWTException <ul>
  *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
  *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
@@ -2548,7 +2548,11 @@
     return (state & HIDDEN) is 0;
 }
 
-override int /*long*/ gtk_button_press_event (GtkWidget* widget, GdkEventButton* gdkEvent) {
+override int /*long*/ gtk_button_press_event (GtkWidget* widget, GdkEventButton* event) {
+    return gtk_button_press_event (widget, event, true);
+}
+
+int /*long*/ gtk_button_press_event (GtkWidget* widget, GdkEventButton* gdkEvent, bool sendMouseDown) {
     if (gdkEvent.type is OS.GDK_3BUTTON_PRESS) return 0;
 
     /*
@@ -2582,7 +2586,7 @@
                 if (isDisposed ()) return 1;
             }
         }
-        if (!sendMouseEvent (DWT.MouseDown, gdkEvent.button, display.clickCount, 0, false, gdkEvent.time, gdkEvent.x_root, gdkEvent.y_root, false, gdkEvent.state)) {
+        if (sendMouseDown && !sendMouseEvent (DWT.MouseDown, gdkEvent.button, display.clickCount, 0, false, gdkEvent.time, gdkEvent.x_root, gdkEvent.y_root, false, gdkEvent.state)) {
             result = 1;
         }
         if (isDisposed ()) return 1;