This is clearly an accessor function, so make it const, even if it requires a
const_cast<> inside it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70716
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// the displaying number of the tree are changing along with the
// expanding/collapsing of the tree nodes
unsigned int GetLastVisibleRow();
// the displaying number of the tree are changing along with the
// expanding/collapsing of the tree nodes
unsigned int GetLastVisibleRow();
- unsigned int GetRowCount();
+ unsigned int GetRowCount() const;
const wxDataViewSelection& GetSelections() const { return m_selection; }
void SetSelections( const wxDataViewSelection & sel )
const wxDataViewSelection& GetSelections() const { return m_selection; }
void SetSelections( const wxDataViewSelection & sel )
void StartEditing(const wxDataViewItem& item, const wxDataViewColumn* col);
private:
void StartEditing(const wxDataViewItem& item, const wxDataViewColumn* col);
private:
- int RecalculateCount();
+ int RecalculateCount() const;
// Return false only if the event was vetoed by its handler.
bool SendExpanderEvent(wxEventType type, const wxDataViewItem& item);
// Return false only if the event was vetoed by its handler.
bool SendExpanderEvent(wxEventType type, const wxDataViewItem& item);
return wxMin( GetRowCount()-1, row );
}
return wxMin( GetRowCount()-1, row );
}
-unsigned int wxDataViewMainWindow::GetRowCount()
+unsigned int wxDataViewMainWindow::GetRowCount() const
- m_count = RecalculateCount();
- UpdateDisplay();
+ wxDataViewMainWindow* const
+ self = const_cast<wxDataViewMainWindow*>(this);
+ self->m_count = RecalculateCount();
+ self->UpdateDisplay();
-int wxDataViewMainWindow::RecalculateCount()
+int wxDataViewMainWindow::RecalculateCount() const