resolve ambiguity between 2 inherited versions of Clear() in wxSimpleHtmlListBox (see bug 1836384)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51115 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2008-01-08 19:24:08 +00:00
parent 8df2696160
commit e52cd41e5d
2 changed files with 12 additions and 3 deletions

View File

@ -268,8 +268,8 @@ public:
virtual void SetString(unsigned int n, const wxString& s);
virtual void DoClear();
virtual void DoDeleteOneItem(unsigned int n);
// resolve ambiguity between wxItemContainer and wxVListBox versions
void Clear();
protected:
virtual int DoInsertItems(const wxArrayStringsAdapter & items,
@ -282,10 +282,14 @@ protected:
virtual void *DoGetItemClientData(unsigned int n) const
{ return m_HTMLclientData[n]; }
// wxItemContainer methods
virtual void DoClear();
virtual void DoDeleteOneItem(unsigned int n);
// calls wxHtmlListBox::SetItemCount() and RefreshAll()
void UpdateCount();
// overload these functions just to change their visibility: users of
// override these functions just to change their visibility: users of
// wxSimpleHtmlListBox shouldn't be allowed to call them directly!
virtual void SetItemCount(size_t count)
{ wxHtmlListBox::SetItemCount(count); }

View File

@ -603,6 +603,11 @@ void wxSimpleHtmlListBox::DoClear()
UpdateCount();
}
void wxSimpleHtmlListBox::Clear()
{
DoClear();
}
void wxSimpleHtmlListBox::DoDeleteOneItem(unsigned int n)
{
m_items.RemoveAt(n);