X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c59e508935aec75243134a72de9098d38aff8e75..e9cec36348072df16d6cd649f82a92c86ba3b662:/samples/render/renddll.cpp diff --git a/samples/render/renddll.cpp b/samples/render/renddll.cpp index 8d31e25e8a..ca0e0f7fd0 100644 --- a/samples/render/renddll.cpp +++ b/samples/render/renddll.cpp @@ -5,15 +5,25 @@ // Modified by: // Created: 04.08.03 // RCS-ID: $Id$ -// Copyright: (c) 2003 Vadim Zeitlin +// Copyright: (c) 2003 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// #include "wx/wxprec.h" +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + #include "wx/renderer.h" -class MyDllRenderer : public wxRendererNative +#ifndef WX_PRECOMP + #include "wx/dc.h" +#endif + +// 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) @@ -28,38 +38,10 @@ 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) + virtual wxRendererVersion GetVersion() const { - } - - // 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); + return wxRendererVersion(wxRendererVersion::Current_Version, + wxRendererVersion::Current_Age); } #if 0 // just for debugging @@ -80,4 +62,3 @@ WXEXPORT wxRendererNative *wxCreateRenderer() { return new MyDllRenderer; } -