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"
18 #include "wx/renderer.h"
20 class MyDllRenderer
: public wxRendererNative
23 // draw the header control button (used by wxListCtrl)
24 virtual void DrawHeaderButton(wxWindow
*win
,
29 dc
.SetBrush(*wxCYAN_BRUSH
);
30 dc
.SetTextForeground(*wxRED
);
31 dc
.DrawRoundedRectangle(rect
, 10);
32 dc
.DrawLabel(_T("MyDllRenderer"), wxNullBitmap
, rect
, wxALIGN_CENTER
);
35 // draw the expanded/collapsed icon for a tree control item
36 virtual void DrawTreeItemButton(wxWindow
*win
,
43 // draw the border for sash window: this border must be such that the sash
44 // drawn by DrawSash() blends into it well
45 virtual void DrawSplitterBorder(wxWindow
*win
,
52 // draw a (vertical) sash
53 virtual void DrawSplitterSash(wxWindow
*win
,
62 // get the splitter parameters: the x field of the returned point is the
63 // sash width and the y field is the border width
64 virtual wxSplitterRenderParams
GetSplitterParams(const wxWindow
*win
)
66 return wxSplitterRenderParams(0, 0, 0);
69 #if 0 // just for debugging
72 wxMessageBox(_T("Creating MyDllRenderer"), _T("Renderer Sample"));
75 virtual ~MyDllRenderer()
77 wxMessageBox(_T("Deleting MyDllRenderer"), _T("Renderer Sample"));
83 WXEXPORT wxRendererNative
*wxCreateRenderer()
85 return new MyDllRenderer
;