X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/52c14774b3309c1f6baddbcf92df1eb86a322d92..30fd71e65bbbada8d17a0efbafbbbb3bafb42f9f:/src/generic/renderg.cpp diff --git a/src/generic/renderg.cpp b/src/generic/renderg.cpp index 7f121bef42..15af1286b6 100644 --- a/src/generic/renderg.cpp +++ b/src/generic/renderg.cpp @@ -34,6 +34,8 @@ #include "wx/settings.h" #include "wx/splitter.h" +#include "wx/dcmirror.h" + #include "wx/renderer.h" // ---------------------------------------------------------------------------- @@ -62,7 +64,8 @@ public: virtual void DrawSplitterSash(wxWindow *win, wxDC& dc, const wxSize& size, - wxCoord position); + wxCoord position, + wxOrientation orient); virtual wxPoint GetSplitterSashAndBorder(const wxWindow *win); @@ -97,17 +100,6 @@ wxRendererNative& wxRendererNative::GetGeneric() return s_rendererGeneric; } -// some platforms have their own renderers -#if !defined(__WXMSW__) && !defined(__WXMAC__) && !defined(__WXGTK__) - -/* static */ -wxRendererNative& wxRendererNative::Get() -{ - return GetGeneric(); -} - -#endif // platforms using their own renderers - wxRendererGeneric::wxRendererGeneric() : m_penBlack(wxSystemSettings::GetColour(wxSYS_COLOUR_3DDKSHADOW)), m_penDarkGrey(wxSystemSettings::GetColour(wxSYS_COLOUR_3DSHADOW)), @@ -227,10 +219,17 @@ wxRendererGeneric::DrawSplitterBorder(wxWindow *win, void wxRendererGeneric::DrawSplitterSash(wxWindow *win, - wxDC& dc, - const wxSize& size, - wxCoord position) + wxDC& dcReal, + const wxSize& sizeReal, + wxCoord position, + wxOrientation orient) { + // to avoid duplicating the same code for horizontal and vertical sashes, + // simply mirror the DC instead if needed (i.e. if horz splitter) + wxMirrorDC dc(dcReal, orient != wxVERTICAL); + wxSize size = dc.Reflect(sizeReal); + + // we draw a Win32-like grey sash with possible 3D border here: // // ---- this is position