- Rewrite wxHeaderCtrl to be virtual-like: even if we don't need an infinite
number of columns in it, it turns out that getting column information from the associated control is much easier than copying it into the control. - Provide wxHeaderCtrlSimple derived class which can be used easily if callback approach of wxHeaderCtrl is not needed. - Because of wxHeaderCtrl virtualization, port-specific implementations of wxHeaderColumn are not needed any more and were removed. - Use wxHeaderCtrl in the generic wxDataViewCtrl: this means that column events are broken right now in it as they haven't been implemented by wxHeaderCtrl yet, this will be fixed a.s.a.p. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57161 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -91,43 +91,6 @@ unsigned int wxHeaderCtrl::DoGetCount() const
|
||||
return m_cols.size();
|
||||
}
|
||||
|
||||
void wxHeaderCtrl::DoInsert(const wxHeaderColumn& col, unsigned int idx)
|
||||
{
|
||||
m_cols.insert(m_cols.begin() + idx, col);
|
||||
m_sortOrders.insert(m_sortOrders.begin() + idx, -1);
|
||||
|
||||
if ( m_cols[idx].IsShown() )
|
||||
RefreshColsAfter(idx);
|
||||
}
|
||||
|
||||
void wxHeaderCtrl::DoDelete(unsigned int idx)
|
||||
{
|
||||
m_cols.erase(m_cols.begin() + idx);
|
||||
m_sortOrders.erase(m_sortOrders.begin() + idx);
|
||||
|
||||
RefreshColsAfter(idx);
|
||||
}
|
||||
|
||||
void wxHeaderCtrl::DoShowColumn(unsigned int idx, bool show)
|
||||
{
|
||||
if ( show != m_cols[idx].IsShown() )
|
||||
{
|
||||
m_cols[idx].SetHidden(!show);
|
||||
|
||||
RefreshColsAfter(idx);
|
||||
}
|
||||
}
|
||||
|
||||
void wxHeaderCtrl::DoShowSortIndicator(unsigned int idx, int sortOrder)
|
||||
{
|
||||
if ( sortOrder != m_sortOrders[idx] )
|
||||
{
|
||||
m_sortOrders[idx] = sortOrder;
|
||||
|
||||
RefreshCol(idx);
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxHeaderCtrl scrolling
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user