Enable OnDrawSeparator and OnDrawBackground to be overridable in wx.HtmlListBox
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38126 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -517,7 +517,7 @@ public:
|
||||
//
|
||||
// the base class version doesn't do anything
|
||||
// virtual void OnDrawSeparator(wxDC& dc, wxRect& rect, size_t n) const;
|
||||
DEC_PYCALLBACK__DCRECTSIZET_constpure(OnDrawSeparator);
|
||||
DEC_PYCALLBACK__DCRECTSIZET2_const(OnDrawSeparator);
|
||||
|
||||
|
||||
// this method is used to draw the items background and, maybe, a border
|
||||
@@ -538,7 +538,7 @@ IMPLEMENT_ABSTRACT_CLASS(wxPyVListBox, wxVListBox);
|
||||
|
||||
IMP_PYCALLBACK__DCRECTSIZET_constpure(wxPyVListBox, wxVListBox, OnDrawItem);
|
||||
IMP_PYCALLBACK_COORD_SIZET_constpure (wxPyVListBox, wxVListBox, OnMeasureItem);
|
||||
IMP_PYCALLBACK__DCRECTSIZET_constpure(wxPyVListBox, wxVListBox, OnDrawSeparator);
|
||||
IMP_PYCALLBACK__DCRECTSIZET2_const (wxPyVListBox, wxVListBox, OnDrawSeparator);
|
||||
IMP_PYCALLBACK__DCRECTSIZET_const (wxPyVListBox, wxVListBox, OnDrawBackground);
|
||||
|
||||
%}
|
||||
@@ -709,6 +709,8 @@ public:
|
||||
// change the background colour of the selected cells
|
||||
void SetSelectionBackground(const wxColour& col);
|
||||
|
||||
virtual void OnDrawSeparator(wxDC& dc, wxRect& rect, size_t n) const;
|
||||
virtual void OnDrawBackground(wxDC& dc, const wxRect& rect, size_t n) const;
|
||||
};
|
||||
|
||||
|
||||
@@ -745,6 +747,10 @@ public:
|
||||
// this function may be overridden to decorate HTML returned by OnGetItem()
|
||||
DEC_PYCALLBACK_STRING_SIZET(OnGetItemMarkup);
|
||||
|
||||
// These are from wxVListBox
|
||||
DEC_PYCALLBACK__DCRECTSIZET2_const(OnDrawSeparator);
|
||||
DEC_PYCALLBACK__DCRECTSIZET_const(OnDrawBackground);
|
||||
|
||||
// TODO:
|
||||
// // this method allows to customize the selection appearance: it may be used
|
||||
// // to specify the colour of the text which normally has the given colour
|
||||
@@ -768,6 +774,8 @@ IMPLEMENT_ABSTRACT_CLASS(wxPyHtmlListBox, wxHtmlListBox)
|
||||
|
||||
IMP_PYCALLBACK_STRING_SIZET_pure(wxPyHtmlListBox, wxHtmlListBox, OnGetItem);
|
||||
IMP_PYCALLBACK_STRING_SIZET (wxPyHtmlListBox, wxHtmlListBox, OnGetItemMarkup);
|
||||
IMP_PYCALLBACK__DCRECTSIZET2_const (wxPyHtmlListBox, wxHtmlListBox, OnDrawSeparator);
|
||||
IMP_PYCALLBACK__DCRECTSIZET_const (wxPyHtmlListBox, wxHtmlListBox, OnDrawBackground);
|
||||
|
||||
%}
|
||||
|
||||
|
Reference in New Issue
Block a user