+ else // horz
+ {
+ int w = win->GetClientSize().GetWidth();
+
+ rect.x = 0;
+ rect.y = position;
+ rect.height = full_size;
+ rect.width = w;
+
+#if USE_ERASE_RECT
+ erase_rect.y = position;
+ erase_rect.x = 0;
+ erase_rect.height = full_size;
+ erase_rect.width = w;
+#endif
+ }
+
+#if USE_ERASE_RECT
+ // we must erase everything first, otherwise the garbage
+ // from the old sash is left when dragging it
+ gtk_paint_flat_box
+ (
+ win->m_wxwindow->style,
+ GTK_PIZZA(win->m_wxwindow)->bin_window,
+ GTK_STATE_NORMAL,
+ GTK_SHADOW_NONE,
+ NULL,
+ win->m_wxwindow,
+ (char *)"viewportbin", // const_cast
+ erase_rect.x,
+ erase_rect.y,
+ erase_rect.width,
+ erase_rect.height
+ );
+#endif
+
+#ifdef __WXGTK20__
+ gtk_paint_handle
+ (
+ win->m_wxwindow->style,
+ GTK_PIZZA(win->m_wxwindow)->bin_window,
+ flags & wxCONTROL_CURRENT ? GTK_STATE_PRELIGHT : GTK_STATE_NORMAL,
+ GTK_SHADOW_NONE,
+ NULL /* no clipping */,
+ win->m_wxwindow,
+ "paned",
+ rect.x,
+ rect.y,
+ rect.width,
+ rect.height,
+ isVert ? GTK_ORIENTATION_VERTICAL : GTK_ORIENTATION_HORIZONTAL
+ );
+#else // GTK+ 1.x
+
+ // leave some margin before sash itself
+ position += SASH_MARGIN / 2;
+
+ // and finally draw it using GTK paint functions
+ typedef void (*GtkPaintLineFunc)(GtkStyle *, GdkWindow *,
+ GtkStateType,
+ GdkRectangle *, GtkWidget *,
+ gchar *,
+ gint, gint, gint);
+
+ GtkPaintLineFunc func = isVert ? gtk_paint_vline : gtk_paint_hline;
+
+ (*func)
+ (
+ win->m_wxwindow->style,
+ GTK_PIZZA(win->m_wxwindow)->bin_window,
+ GTK_STATE_NORMAL,
+ NULL,
+ win->m_wxwindow,
+ (char *)"paned", // const_cast
+ 0, isVert ? size.y : size.x, position + SASH_SIZE / 2 - 1
+ );