X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9c7f49f569dcabe360a3a51a94eff77225b39d69..7ba1412f1965a8756caf9e5ab1e4b4a0f1245fa3:/include/wx/renderer.h diff --git a/include/wx/renderer.h b/include/wx/renderer.h index 449927ead8..76e7a80090 100644 --- a/include/wx/renderer.h +++ b/include/wx/renderer.h @@ -25,6 +25,11 @@ #ifndef _WX_RENDERER_H_ #define _WX_RENDERER_H_ +class WXDLLEXPORT wxDC; +class WXDLLEXPORT wxWindow; + +#include "wx/gdicmn.h" // for wxPoint + // ---------------------------------------------------------------------------- // constants // ---------------------------------------------------------------------------- @@ -57,6 +62,8 @@ enum class WXDLLEXPORT wxRendererNative { public: + virtual ~wxRendererNative() { } // stop GCC warning + // drawing functions // ----------------- @@ -72,6 +79,26 @@ public: const wxRect& rect, int flags = 0) = 0; + // draw the border for sash window: this border must be such that the sash + // drawn by DrawSash() blends into it well + virtual void DrawSplitterBorder(wxWindow *win, + wxDC& dc, + const wxRect& rect) = 0; + + // draw a (vertical) sash + virtual void DrawSplitterSash(wxWindow *win, + wxDC& dc, + const wxSize& size, + wxCoord position) = 0; + + + // geometry functions + // ------------------ + + // get the splitter parameters: the x field of the returned point is the + // sash width and the y field is the border width + virtual wxPoint GetSplitterSashAndBorder(const wxWindow *win) = 0; + // pseudo constructors // ------------------- @@ -102,14 +129,32 @@ public: const wxRect& rect, int flags = 0) { m_rendererNative.DrawHeaderButton(win, dc, rect, flags); } + virtual void DrawTreeItemButton(wxWindow *win, wxDC& dc, const wxRect& rect, int flags = 0) { m_rendererNative.DrawTreeItemButton(win, dc, rect, flags); } + virtual void DrawSplitterBorder(wxWindow *win, + wxDC& dc, + const wxRect& rect) + { m_rendererNative.DrawSplitterBorder(win, dc, rect); } + + virtual void DrawSplitterSash(wxWindow *win, + wxDC& dc, + const wxSize& size, + wxCoord position) + { m_rendererNative.DrawSplitterSash(win, dc, size, position); } + + + virtual wxPoint GetSplitterSashAndBorder(const wxWindow *win) + { return m_rendererNative.GetSplitterSashAndBorder(win); } + protected: wxRendererNative& m_rendererNative; + + DECLARE_NO_COPY_CLASS(wxDelegateRendererNative) }; #endif // _WX_RENDERER_H_