diff options
author | Steve Northover <steve> | 2002-03-23 21:13:20 +0000 |
---|---|---|
committer | Steve Northover <steve> | 2002-03-23 21:13:20 +0000 |
commit | 63b1a2d36990c1f8e8816e7709fc0b09bed89050 (patch) | |
tree | 455ec8b0adc74ff478ffa3ced2f0777b036ab573 /bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Sash.java | |
parent | d412b6257ae0dc29106f460bb8ad57dae5af6e21 (diff) | |
download | eclipse.platform.swt-63b1a2d36990c1f8e8816e7709fc0b09bed89050.tar.gz eclipse.platform.swt-63b1a2d36990c1f8e8816e7709fc0b09bed89050.tar.xz eclipse.platform.swt-63b1a2d36990c1f8e8816e7709fc0b09bed89050.zip |
*** empty log message ***
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Sash.java')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Sash.java | 29 |
1 files changed, 10 insertions, 19 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Sash.java b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Sash.java index 3911e13761..10ebb70d11 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Sash.java +++ b/bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/widgets/Sash.java @@ -67,23 +67,16 @@ public Sash (Composite parent, int style) { void createHandle (int index) { state |= HANDLE; - handle=OS.gtk_drawing_area_new(); + handle = OS.gtk_drawing_area_new(); if (handle == 0) error (SWT.ERROR_NO_HANDLES); -} - -void setHandleStyle() {} - -void showHandle() { - createCursor(); - OS.gtk_widget_show(handle); - OS.gtk_widget_realize(handle); -} - -private void createCursor() { - int cursorType = ((style&SWT.VERTICAL)!=0)? - OS.GDK_SB_H_DOUBLE_ARROW:OS.GDK_SB_V_DOUBLE_ARROW; - cursor = OS.gdk_cursor_new(cursorType); - OS.gdk_window_set_cursor(OS.GTK_WIDGET_WINDOW(handle), cursor); + int parentHandle = parent.parentingHandle (); + OS.gtk_container_add (parentHandle, handle); + OS.gtk_widget_show (handle); + int type = (style & SWT.VERTICAL) != 0 ? OS.GDK_SB_H_DOUBLE_ARROW:OS.GDK_SB_V_DOUBLE_ARROW; + cursor = OS.gdk_cursor_new (type); + OS.gtk_widget_realize (handle); + int window = OS.GTK_WIDGET_WINDOW (handle); + OS.gdk_window_set_cursor (window, cursor); } public Point computeSize (int wHint, int hHint, boolean changed) { @@ -100,8 +93,6 @@ public Point computeSize (int wHint, int hHint, boolean changed) { return new Point (width, height); } - - /** * Adds the listener to the collection of listeners who will * be notified when the control is selected, by sending @@ -328,7 +319,7 @@ static int checkStyle (int style) { void releaseWidget () { super.releaseWidget (); - OS.gdk_cursor_destroy (cursor); + if (cursor != 0) OS.gdk_cursor_destroy (cursor); cursor = 0; } |