+ // are we drawing vertical or horizontal splitter?
+ const bool isVert = orient == wxVERTICAL;
+
+ // we must erase everything first, otherwise the garbage from the old sash
+ // is left when dragging it
+ //
+ // TODO: is this the right way to draw themed background?
+ GdkRectangle rect;
+ if ( isVert )
+ {
+ rect.x = position;
+ rect.y = 0;
+ rect.width = SASH_SIZE + SASH_MARGIN;
+ rect.height = size.y;
+ }
+ else // horz
+ {
+ rect.x = 0;
+ rect.y = position;
+ rect.height = SASH_SIZE + SASH_MARGIN;
+ rect.width = size.x;
+ }
+
+ gtk_paint_flat_box
+ (
+ win->m_wxwindow->style,
+ GTK_PIZZA(win->m_wxwindow)->bin_window,
+ GTK_STATE_NORMAL,
+ GTK_SHADOW_NONE,
+ &rect,
+ win->m_wxwindow,
+ (char *)"base", // const_cast
+ 0, 0, -1, -1
+ );
+
+
+ // 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)