1 ///////////////////////////////////////////////////////////////////////////////
3 // Purpose: Example of a renderer implemented in a DLL
4 // Author: Vadim Zeitlin
8 // Copyright: (c) 2003 Vadim Zeitlin <vadim@wxwindows.org>
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
12 #include "wx/wxprec.h"
14 #include "wx/renderer.h"
16 class MyDllRenderer
: public wxRendererNative
19 // draw the header control button (used by wxListCtrl)
20 virtual void DrawHeaderButton(wxWindow
*win
,
25 dc
.SetBrush(*wxCYAN_BRUSH
);
26 dc
.SetTextForeground(*wxRED
);
27 dc
.DrawRoundedRectangle(rect
, 10);
28 dc
.DrawLabel(_T("MyDllRenderer"), wxNullBitmap
, rect
, wxALIGN_CENTER
);
31 // draw the expanded/collapsed icon for a tree control item
32 virtual void DrawTreeItemButton(wxWindow
*win
,
39 // draw the border for sash window: this border must be such that the sash
40 // drawn by DrawSash() blends into it well
41 virtual void DrawSplitterBorder(wxWindow
*win
,
48 // draw a (vertical) sash
49 virtual void DrawSplitterSash(wxWindow
*win
,
58 // get the splitter parameters: the x field of the returned point is the
59 // sash width and the y field is the border width
60 virtual wxSplitterRenderParams
GetSplitterParams(const wxWindow
*win
)
62 return wxSplitterRenderParams(0, 0, 0);
65 #if 0 // just for debugging
68 wxMessageBox(_T("Creating MyDllRenderer"), _T("Renderer Sample"));
71 virtual ~MyDllRenderer()
73 wxMessageBox(_T("Deleting MyDllRenderer"), _T("Renderer Sample"));
79 WXEXPORT wxRendererNative
*wxCreateRenderer()
81 return new MyDllRenderer
;