#include "wx/settings.h"
#include "wx/splitter.h"
+#include "wx/dcmirror.h"
+
#include "wx/renderer.h"
// ----------------------------------------------------------------------------
virtual void DrawSplitterSash(wxWindow *win,
wxDC& dc,
const wxSize& size,
- wxCoord position);
+ wxCoord position,
+ wxOrientation orient);
virtual wxPoint GetSplitterSashAndBorder(const wxWindow *win);
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)),
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