From f95ce8d9d5f1ca6262398e141bda92008e6e17fe Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 8 Oct 2019 01:16:50 +0200 Subject: [PATCH] Add wxListCtrlBase::GetItemCount() pure virtual No real changes, just ensure that all derived classes implement this method (which already was the case). --- include/wx/generic/listctrl.h | 2 +- include/wx/listbase.h | 3 +++ include/wx/msw/listctrl.h | 2 +- include/wx/qt/listctrl.h | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/include/wx/generic/listctrl.h b/include/wx/generic/listctrl.h index d377082e7b..a7b8a1b872 100644 --- a/include/wx/generic/listctrl.h +++ b/include/wx/generic/listctrl.h @@ -86,7 +86,7 @@ public: bool GetSubItemRect( long item, long subItem, wxRect& rect, int code = wxLIST_RECT_BOUNDS ) const; bool GetItemPosition( long item, wxPoint& pos ) const; bool SetItemPosition( long item, const wxPoint& pos ); // not supported in wxGLC - int GetItemCount() const; + int GetItemCount() const wxOVERRIDE; int GetColumnCount() const wxOVERRIDE; void SetItemSpacing( int spacing, bool isSmall = false ); wxSize GetItemSpacing() const; diff --git a/include/wx/listbase.h b/include/wx/listbase.h index 8c493bc935..ca2ead8fce 100644 --- a/include/wx/listbase.h +++ b/include/wx/listbase.h @@ -378,6 +378,9 @@ public: virtual bool DeleteColumn(int col) = 0; virtual bool DeleteAllColumns() = 0; + // Return the current number of items. + virtual int GetItemCount() const = 0; + // Return the current number of columns. virtual int GetColumnCount() const = 0; diff --git a/include/wx/msw/listctrl.h b/include/wx/msw/listctrl.h index f35585d58f..59794184af 100644 --- a/include/wx/msw/listctrl.h +++ b/include/wx/msw/listctrl.h @@ -199,7 +199,7 @@ public: bool SetItemPosition(long item, const wxPoint& pos); // Gets the number of items in the list control - int GetItemCount() const; + int GetItemCount() const wxOVERRIDE; // Gets the number of columns in the list control int GetColumnCount() const wxOVERRIDE { return m_colCount; } diff --git a/include/wx/qt/listctrl.h b/include/wx/qt/listctrl.h index 7582d8be43..23a672dbf7 100644 --- a/include/wx/qt/listctrl.h +++ b/include/wx/qt/listctrl.h @@ -127,7 +127,7 @@ public: bool SetItemPosition(long item, const wxPoint& pos); // Gets the number of items in the list control - int GetItemCount() const; + int GetItemCount() const wxOVERRIDE; // Gets the number of columns in the list control int GetColumnCount() const wxOVERRIDE;