X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9c7f49f569dcabe360a3a51a94eff77225b39d69..fe164c3e2ea5453896cd63a5440a26365daec1bc:/src/mac/renderer.cpp diff --git a/src/mac/renderer.cpp b/src/mac/renderer.cpp index aa92c55c2d..cfa3a81385 100644 --- a/src/mac/renderer.cpp +++ b/src/mac/renderer.cpp @@ -1,6 +1,6 @@ /////////////////////////////////////////////////////////////////////////////// // 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 @@ -26,15 +26,18 @@ #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) @@ -49,6 +52,12 @@ public: const wxRect& rect, int flags = 0); + // draw a (vertical) sash + virtual void DrawSplitterSash(wxWindow *win, + wxDC& dc, + const wxSize& size, + wxCoord position); + private: // the tree buttons wxBitmap m_bmpTreeExpanded, @@ -108,7 +117,7 @@ static const char *aqua_arrow_down_xpm[] = { // ============================================================================ /* static */ -wxRendererNative& wxRendererMac::Get() +wxRendererNative& wxRendererNative::Get() { static wxRendererMac s_rendererMac; @@ -185,3 +194,20 @@ wxRendererMac::DrawTreeItemButton(wxWindow *win, #endif // 0/1 } +void +wxRendererMac::DrawSplitterSash(wxWindow *win, + wxDC& dc, + const wxSize& size, + wxCoord position) +{ + // 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) + + const wxCoord h = size.y; + + dc.SetPen(*wxLIGHT_GREY_PEN); + dc.SetBrush(*wxWHITE_BRUSH); + dc.DrawRectangle(position, 0, 7, h); +} +