Get rid of ugly wxCONTROL_ITEMCONTAINER_CLIENTDATAOBJECT_RECAST macro.

Replace it with wxWindowWithItems<> template class which takes care of
disambiguating between the two inherited Get/SetClientXXX() versions and use
it as a base class in all clases that previously used the macro.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@68460 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2011-07-30 11:30:08 +00:00
parent c29c95fe24
commit bf8f10225c
7 changed files with 50 additions and 53 deletions

View File

@@ -233,15 +233,15 @@ private:
// the wxComboCtrl.
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_ADV wxOwnerDrawnComboBox : public wxComboCtrl,
public wxItemContainer
class WXDLLIMPEXP_ADV wxOwnerDrawnComboBox :
public wxWindowWithItems<wxComboCtrl, wxItemContainer>
{
//friend class wxComboPopupWindow;
friend class wxVListBoxComboPopup;
public:
// ctors and such
wxOwnerDrawnComboBox() : wxComboCtrl() { Init(); }
wxOwnerDrawnComboBox() { Init(); }
wxOwnerDrawnComboBox(wxWindow *parent,
wxWindowID id,
@@ -253,7 +253,6 @@ public:
long style = 0,
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxComboBoxNameStr)
: wxComboCtrl()
{
Init();
@@ -339,8 +338,6 @@ public:
virtual bool IsSorted() const { return HasFlag(wxCB_SORT); }
wxCONTROL_ITEMCONTAINER_CLIENTDATAOBJECT_RECAST
protected:
virtual void DoClear();
virtual void DoDeleteOneItem(unsigned int n);