don't duplicate the column reordering in generic wxHeaderCtrl and wxGrid, extract it into a (public) helper function

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57264 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-12-11 22:27:02 +00:00
parent 3169a8e837
commit 1bb7462687
5 changed files with 63 additions and 46 deletions

View File

@@ -272,6 +272,26 @@ public:
*/
unsigned int GetColumnPos(unsigned int idx) const;
/**
Helper function to manipulate the array of column indices.
This function reshuffles the array of column indices indexed by
positions (i.e. using the same convention as for SetColumnsOrder()) so
that the column with the given index is found at the specified
position.
@param order
Array containing the indices of columns in order of their
positions.
@param idx
The index of the column to move.
@param pos
The new position for the column @a idx.
*/
static void MoveColumnInOrderArray(wxArrayInt& order,
unsigned int idx,
unsigned int pos);
protected:
/**
Method to be implemented by the derived classes to return the