X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/60c474a0c4f878a68f8e88be2be26bc5de750212..55325d01e68cfb071e42699ca72ba84a7071aa2b:/samples/render/renddll.cpp?ds=sidebyside diff --git a/samples/render/renddll.cpp b/samples/render/renddll.cpp index b3afaf8336..ca0e0f7fd0 100644 --- a/samples/render/renddll.cpp +++ b/samples/render/renddll.cpp @@ -21,7 +21,9 @@ #include "wx/dc.h" #endif -class MyDllRenderer : public wxRendererNative +// derive from wxDelegateRendererNative and not wxRendererNative itself to be +// able to only reimplement the methods we want to show and not all of them +class MyDllRenderer : public wxDelegateRendererNative { public: // draw the header control button (used by wxListCtrl) @@ -36,50 +38,6 @@ public: dc.DrawLabel(_T("MyDllRenderer"), wxNullBitmap, rect, wxALIGN_CENTER); } - // draw the expanded/collapsed icon for a tree control item - virtual void DrawTreeItemButton(wxWindow *win, - wxDC& dc, - const wxRect& rect, - int flags = 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, - int flags = 0) - { - } - - // draw a (vertical) sash - virtual void DrawSplitterSash(wxWindow *win, - wxDC& dc, - const wxSize& size, - wxCoord position, - wxOrientation orient, - int flags = 0) - { - } - - // draw a combobox dropdown button - // - // flags may only use wxCONTROL_PRESSED - virtual void DrawComboBoxDropButton(wxWindow *win, - wxDC& dc, - const wxRect& rect, - int flags = 0) - { - } - - // get the splitter parameters: the x field of the returned point is the - // sash width and the y field is the border width - virtual wxSplitterRenderParams GetSplitterParams(const wxWindow *win) - { - return wxSplitterRenderParams(0, 0, 0); - } - virtual wxRendererVersion GetVersion() const { return wxRendererVersion(wxRendererVersion::Current_Version, @@ -104,4 +62,3 @@ WXEXPORT wxRendererNative *wxCreateRenderer() { return new MyDllRenderer; } -