Added API for column reordering

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50906 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling 2007-12-22 18:29:14 +00:00
parent 8515098c75
commit e483dfcb9d
4 changed files with 12 additions and 6 deletions

View File

@ -17,9 +17,10 @@ These flags define behaviour of the column:
\begin{verbatim}
enum wxDataViewColumnFlags
{
wxDATAVIEW_COL_RESIZABLE = 1, // the user can resize the column
wxDATAVIEW_COL_SORTABLE = 2, // same as SetSortable()
wxDATAVIEW_COL_HIDDEN = 4 // column is hidden
wxDATAVIEW_COL_RESIZABLE = 1, // the user can resize the column
wxDATAVIEW_COL_SORTABLE = 2, // same as SetSortable()
wxDATAVIEW_COL_REORDERABLE = 4, // column can be reordered
wxDATAVIEW_COL_HIDDEN = 8 // column is hidden
};
\end{verbatim}
}

View File

@ -65,6 +65,7 @@ macros to direct input to member functions that take a
\twocolitem{{\bf EVT\_DATAVIEW\_COLUMN\_HEADER\_CLICK(id, func)}}{Processes a wxEVT\_COMMAND\_DATAVIEW\_COLUMN\_HEADER\_CLICKED event.}
\twocolitem{{\bf EVT\_DATAVIEW\_COLUMN\_HEADER\_RIGHT\_CLICK(id, func)}}{Processes a wxEVT\_COMMAND\_DATAVIEW\_COLUMN\_HEADER\_RIGHT\_CLICKED event.}
\twocolitem{{\bf EVT\_DATAVIEW\_COLUMN\_HEADER\_SORTED(id, func)}}{Processes a wxEVT\_COMMAND\_DATAVIEW\_COLUMN\_HEADER\_SORTED event.}
\twocolitem{{\bf EVT\_DATAVIEW\_COLUMN\_REORDERED(id, func)}}{Processes a wxEVT\_COMMAND\_DATAVIEW\_COLUMN\_REORDERED event.}
\end{twocollist}

View File

@ -424,9 +424,10 @@ DECLARE_VARIANT_OBJECT_EXPORTED(wxDataViewIconText, WXDLLIMPEXP_ADV)
enum wxDataViewColumnFlags
{
wxDATAVIEW_COL_RESIZABLE = 1,
wxDATAVIEW_COL_SORTABLE = 2,
wxDATAVIEW_COL_HIDDEN = 4
wxDATAVIEW_COL_RESIZABLE = 1,
wxDATAVIEW_COL_SORTABLE = 2,
wxDATAVIEW_COL_REORDERABLE = 4,
wxDATAVIEW_COL_HIDDEN = 8
};
class WXDLLIMPEXP_ADV wxDataViewColumnBase: public wxObject
@ -744,6 +745,7 @@ BEGIN_DECLARE_EVENT_TYPES()
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_CLICK, -1)
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK, -1)
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_COLUMN_SORTED, -1)
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_COLUMN_REORDERED, -1)
END_DECLARE_EVENT_TYPES()
typedef void (wxEvtHandler::*wxDataViewEventFunction)(wxDataViewEvent&);
@ -770,6 +772,7 @@ typedef void (wxEvtHandler::*wxDataViewEventFunction)(wxDataViewEvent&);
#define EVT_DATAVIEW_COLUMN_HEADER_CLICK(id, fn) wx__DECLARE_DATAVIEWEVT(COLUMN_HEADER_CLICK, id, fn)
#define EVT_DATAVIEW_COLUMN_HEADER_RIGHT_CLICKED(id, fn) wx__DECLARE_DATAVIEWEVT(COLUMN_HEADER_RIGHT_CLICK, id, fn)
#define EVT_DATAVIEW_COLUMN_SORTED(id, fn) wx__DECLARE_DATAVIEWEVT(COLUMN_SORTED, id, fn)
#define EVT_DATAVIEW_COLUMN_REORDERED(id, fn) wx__DECLARE_DATAVIEWEVT(COLUMN_REORDERED, id, fn)
#if defined(wxUSE_GENERICDATAVIEWCTRL)
#include "wx/generic/dataview.h"

View File

@ -1154,6 +1154,7 @@ DEFINE_EVENT_TYPE(wxEVT_COMMAND_DATAVIEW_ITEM_CONTEXT_MENU)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_CLICK)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_DATAVIEW_COLUMN_HEADER_RIGHT_CLICK)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_DATAVIEW_COLUMN_SORTED)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_DATAVIEW_COLUMN_REORDERED)
// -------------------------------------