///////////////////////////////////////////////////////////////////////////////
// Name: mac/renderer.cpp
-// Purpose: implementation of wxRendererBase for Mac
+// Purpose: implementation of wxRendererNative for Mac
// Author: Vadim Zeitlin
// Modified by:
// Created: 20.07.2003
#ifndef WX_PRECOMP
#include "wx/string.h"
+ #include "wx/dc.h"
+ #include "wx/bitmap.h"
+ #include "wx/settings.h"
#endif //WX_PRECOMP
#include "wx/renderer.h"
// ----------------------------------------------------------------------------
-// wxRendererMac: our wxRendererBase implementation
+// wxRendererMac: our wxRendererNative implementation
// ----------------------------------------------------------------------------
-class WXDLLEXPORT wxRendererMac : public wxRendererBase
+class WXDLLEXPORT wxRendererMac : public wxDelegateRendererNative
{
public:
// draw the header control button (used by wxListCtrl)
const wxRect& rect,
int flags = 0);
+ // draw a (vertical) sash
+ virtual void DrawSplitterSash(wxWindow *win,
+ wxDC& dc,
+ const wxSize& size,
+ wxCoord position,
+ wxOrientation orient,
+ int flags = 0);
+
private:
// the tree buttons
wxBitmap m_bmpTreeExpanded,
// ============================================================================
/* static */
-wxRendererNative& wxRendererMac::Get()
+wxRendererNative& wxRendererNative::GetDefault()
{
static wxRendererMac s_rendererMac;
#endif // 0/1
}
+void
+wxRendererMac::DrawSplitterSash(wxWindow *win,
+ wxDC& dc,
+ const wxSize& size,
+ wxCoord position,
+ wxOrientation orient,
+ int WXUNUSED(flags))
+{
+ // VZ: we have to somehow determine if we're drawing a normal sash or
+ // a brushed metal one as they look quite differently... this is
+ // completely bogus anyhow, of course (TODO)
+
+ dc.SetPen(*wxLIGHT_GREY_PEN);
+ dc.SetBrush(*wxWHITE_BRUSH);
+ if ( orient == wxVERTICAL )
+ dc.DrawRectangle(position, 0, 7, size.y);
+ else
+ dc.DrawRectangle(0, position, size.x, 7);
+}
+