+// ============================================================================
+// wxRendererXP implementation
+// ============================================================================
+
+/* static */
+wxRendererNative& wxRendererXP::Get()
+{
+ static wxRendererXP s_rendererXP;
+
+ return s_rendererXP;
+}
+
+// ----------------------------------------------------------------------------
+// splitter drawing
+// ----------------------------------------------------------------------------
+
+// the width of the sash: this is the same as used by Explorer...
+static const wxCoord SASH_WIDTH = 4;
+
+wxSplitterRenderParams
+wxRendererXP::GetSplitterParams(const wxWindow * WXUNUSED(win))
+{
+ return wxSplitterRenderParams(SASH_WIDTH, 0, false);
+}
+
+void
+wxRendererXP::DrawSplitterBorder(wxWindow * WXUNUSED(win),
+ wxDC& WXUNUSED(dc),
+ const wxRect& WXUNUSED(rect),
+ int WXUNUSED(flags))
+{
+}
+
+void
+wxRendererXP::DrawSplitterSash(wxWindow *win,
+ wxDC& dc,
+ const wxSize& size,
+ wxCoord position,
+ wxOrientation orient,
+ int WXUNUSED(flags))
+{
+ // I don't know if it is correct to use the rebar background for the
+ // splitter but it least this works ok in the default theme
+ wxUxThemeHandle hTheme(win, L"REBAR");
+ if ( hTheme )
+ {
+ RECT rect;
+ if ( orient == wxVERTICAL )
+ {
+ rect.left = position;
+ rect.right = position + SASH_WIDTH;
+ rect.top = 0;
+ rect.bottom = size.y;
+ }
+ else // wxHORIZONTAL
+ {
+ rect.left = 0;
+ rect.right = size.x;
+ rect.top = position;
+ rect.bottom = position + SASH_WIDTH;
+ }
+
+ wxUxThemeEngine::Get()->DrawThemeBackground
+ (
+ (WXHTHEME)hTheme,
+ dc.GetHDC(),
+ 3 /* RP_BAND */,
+ 0 /* no state */ ,
+ &rect,
+ NULL
+ );
+ }
+}
+