virtual void DoScrollHorz(int dx);
+ virtual void DoSetColumnsOrder(const wxArrayInt& order);
+ virtual wxArrayInt DoGetColumnsOrder() const;
+
// override wxWindow methods which must be implemented by a new control
virtual wxSize DoGetBestSize() const;
// the overlay display used during the dragging operations
wxOverlay m_overlay;
+ // the indices of the column appearing at the given position on the display
+ // (its size is always m_numColumns)
+ wxArrayInt m_colIndices;
+
DECLARE_EVENT_TABLE()
DECLARE_NO_COPY_CLASS(wxHeaderCtrl)
void wxHeaderCtrl::DoSetCount(unsigned int count)
{
m_numColumns = count;
+ m_colIndices.resize(count);
Refresh();
}
m_colBeingResized = COL_NONE;
}
+// ----------------------------------------------------------------------------
+// wxHeaderCtrl column reordering
+// ----------------------------------------------------------------------------
+
+void wxHeaderCtrl::DoSetColumnsOrder(const wxArrayInt& order)
+{
+ m_colIndices = order;
+ Refresh();
+}
+
+wxArrayInt wxHeaderCtrl::DoGetColumnsOrder() const
+{
+ return m_colIndices;
+}
+
// ----------------------------------------------------------------------------
// wxHeaderCtrl event handlers
// ----------------------------------------------------------------------------