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"
24 class MyDllRenderer
: public wxRendererNative
27 // draw the header control button (used by wxListCtrl)
28 virtual void DrawHeaderButton(wxWindow
*win
,
33 dc
.SetBrush(*wxCYAN_BRUSH
);
34 dc
.SetTextForeground(*wxRED
);
35 dc
.DrawRoundedRectangle(rect
, 10);
36 dc
.DrawLabel(_T("MyDllRenderer"), wxNullBitmap
, rect
, wxALIGN_CENTER
);
39 // draw the expanded/collapsed icon for a tree control item
40 virtual void DrawTreeItemButton(wxWindow
*win
,
47 // draw the border for sash window: this border must be such that the sash
48 // drawn by DrawSash() blends into it well
49 virtual void DrawSplitterBorder(wxWindow
*win
,
56 // draw a (vertical) sash
57 virtual void DrawSplitterSash(wxWindow
*win
,
66 // get the splitter parameters: the x field of the returned point is the
67 // sash width and the y field is the border width
68 virtual wxSplitterRenderParams
GetSplitterParams(const wxWindow
*win
)
70 return wxSplitterRenderParams(0, 0, 0);
73 #if 0 // just for debugging
76 wxMessageBox(_T("Creating MyDllRenderer"), _T("Renderer Sample"));
79 virtual ~MyDllRenderer()
81 wxMessageBox(_T("Deleting MyDllRenderer"), _T("Renderer Sample"));
87 WXEXPORT wxRendererNative
*wxCreateRenderer()
89 return new MyDllRenderer
;