wxDataViewCtrl is a control to display data either
in a tree like fashion or in a tabular form or both.
+A \helpref{wxDataViewItem}{wxdataviewitem} is used
+to represent a (visible) item in the control.
+
Unlike \helpref{wxListCtrl}{wxlistctrl} wxDataViewCtrl doesn't
get its data from the user through virtual functions or by
setting it directly. Instead you need to write your own
\twocolwidtha{7cm}
\begin{twocollist}\itemsep=0pt
-\twocolitem{{\bf EVT\_DATAVIEW\_ITEM\_SELECTED(id, func)}}{Processes a wxEVT\_COMMAND\_DATAVIEW\_ITEM\_SELECTED event.}
+\twocolitem{{\bf EVT\_DATAVIEW\_SELECTION\_CHANGED(id, func)}}{Processes a wxEVT\_COMMAND\_DATAVIEW\_SELECTION\_CHANGED event.}
\twocolitem{{\bf EVT\_DATAVIEW\_ITEM\_ACTIVATED(id, func)}}{Processes a wxEVT\_COMMAND\_DATAVIEW\_ITEM\_ACTIVATED event.}
+\twocolitem{{\bf EVT\_DATAVIEW\_ITEM\_EDITING\_STARTED(id, func)}}{Processes a wxEVT\_COMMAND\_DATAVIEW\_ITEM\_EDITING\_STARTED event.}
+\twocolitem{{\bf EVT\_DATAVIEW\_ITEM\_EDITING\_DONE(id, func)}}{Processes a wxEVT\_COMMAND\_DATAVIEW\_ITEM\_EDITING\_DONE event.}
+\twocolitem{{\bf EVT\_DATAVIEW\_ITEM\_COLLAPSING(id, func)}}{Processes a wxEVT\_COMMAND\_DATAVIEW\_ITEM\_COLLAPSING event.}
+\twocolitem{{\bf EVT\_DATAVIEW\_ITEM\_COLLAPSED(id, func)}}{Processes a wxEVT\_COMMAND\_DATAVIEW\_ITEM\_COLLAPSED event.}
+\twocolitem{{\bf EVT\_DATAVIEW\_ITEM\_EXPANDING(id, func)}}{Processes a wxEVT\_COMMAND\_DATAVIEW\_ITEM\_EXPANDING event.}
+\twocolitem{{\bf EVT\_DATAVIEW\_ITEM\_EXPANDED(id, func)}}{Processes a wxEVT\_COMMAND\_DATAVIEW\_ITEM\_EXPANDED event.}
\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.}
\helpref{wxAdv}{librarieslist}
+\latexignore{\rtfignore{\wxheading{Members}}}
+
\membersection{wxDataViewCtrl::wxDataViewCtrl}\label{wxdataviewctrlwxdataviewctrl}
\func{}{wxDataViewCtrl}{\void}
\func{virtual bool}{AppendColumn}{\param{wxDataViewColumn* }{col}}
-Add a \helpref{wxDataViewColumn}{wxdataviewcolumn} to the control. Note
-that there is a number of short cut methods which implicitly create
+Add a \helpref{wxDataViewColumn}{wxdataviewcolumn} to the control. Returns
+{\it true} on success.
+
+Note that there is a number of short cut methods which implicitly create
a \helpref{wxDataViewColumn}{wxdataviewcolumn} and a
\helpref{wxDataViewRenderer}{wxdataviewrenderer} for it (see below).
-
\membersection{wxDataViewCtrl::AppendBitmapColumn}\label{wxdataviewctrlappendbitmapcolumn}
-\func{bool}{AppendBitmapColumn}{\param{const wxString\& }{label}, \param{unsigned int }{model\_column}, \param{wxDataViewCellMode }{mode = wxDATAVIEW\_CELL\_INERT}, \param{int }{width = -1}}
+\func{wxDataViewColumn*}{AppendBitmapColumn}{\param{const wxString\& }{label}, \param{unsigned int }{model\_column}, \param{wxDataViewCellMode }{mode = wxDATAVIEW\_CELL\_INERT}, \param{int }{width = -1}}
-\func{bool}{AppendBitmapColumn}{\param{const wxBitmap\& }{label}, \param{unsigned int }{model\_column}, \param{wxDataViewCellMode }{mode = wxDATAVIEW\_CELL\_INERT}, \param{int }{width = -1}}
+\func{wxDataViewColumn*}{AppendBitmapColumn}{\param{const wxBitmap\& }{label}, \param{unsigned int }{model\_column}, \param{wxDataViewCellMode }{mode = wxDATAVIEW\_CELL\_INERT}, \param{int }{width = -1}}
-Appends a column for rendering a bitmap.
+Appends a column for rendering a bitmap. Returns the wxDataViewColumn
+created in the function or NULL on failure.
\membersection{wxDataViewCtrl::AppendDateColumn}\label{wxdataviewctrlappenddatecolumn}
-\func{bool}{AppendDateColumn}{\param{const wxString\& }{label}, \param{unsigned int }{model\_column}, \param{wxDataViewCellMode }{mode = wxDATAVIEW\_CELL\_ACTIVATABLE}, \param{int }{width = -1}}
+\func{wxDataViewColumn*}{AppendDateColumn}{\param{const wxString\& }{label}, \param{unsigned int }{model\_column}, \param{wxDataViewCellMode }{mode = wxDATAVIEW\_CELL\_ACTIVATABLE}, \param{int }{width = -1}}
-\func{bool}{AppendDateColumn}{\param{const wxBitmap\& }{label}, \param{unsigned int }{model\_column}, \param{wxDataViewCellMode }{mode = wxDATAVIEW\_CELL\_ACTIVATABLE}, \param{int }{width = -1}}
+\func{wxDataViewColumn*}{AppendDateColumn}{\param{const wxBitmap\& }{label}, \param{unsigned int }{model\_column}, \param{wxDataViewCellMode }{mode = wxDATAVIEW\_CELL\_ACTIVATABLE}, \param{int }{width = -1}}
-Appends a column for rendering a date.
+Appends a column for rendering a date. Returns the wxDataViewColumn
+created in the function or NULL on failure.
\membersection{wxDataViewCtrl::AppendProgressColumn}\label{wxdataviewctrlappendprogresscolumn}
-\func{bool}{AppendProgressColumn}{\param{const wxString\& }{label}, \param{unsigned int }{model\_column}, \param{wxDataViewCellMode }{mode = wxDATAVIEW\_CELL\_INERT}, \param{int }{width = 80}}
+\func{wxDataViewColumn*}{AppendProgressColumn}{\param{const wxString\& }{label}, \param{unsigned int }{model\_column}, \param{wxDataViewCellMode }{mode = wxDATAVIEW\_CELL\_INERT}, \param{int }{width = 80}}
+
+\func{wxDataViewColumn*}{AppendProgressColumn}{\param{const wxBitmap\& }{label}, \param{unsigned int }{model\_column}, \param{wxDataViewCellMode }{mode = wxDATAVIEW\_CELL\_INERT}, \param{int }{width = 80}}
+
+Appends a column for rendering a progress indicator. Returns the wxDataViewColumn
+created in the function or NULL on failure.
+
+\membersection{wxDataViewCtrl::AppendIconTextColumn}\label{wxdataviewctrlappendicontextcolumn}
-\func{bool}{AppendProgressColumn}{\param{const wxBitmap\& }{label}, \param{unsigned int }{model\_column}, \param{wxDataViewCellMode }{mode = wxDATAVIEW\_CELL\_INERT}, \param{int }{width = 80}}
+\func{wxDataViewColumn*}{AppendIconTextColumn}{\param{const wxString\& }{label}, \param{unsigned int }{model\_column}, \param{wxDataViewCellMode }{mode = wxDATAVIEW\_CELL\_INERT}, \param{int }{width = -1}}
-Appends a column for rendering a progress indicator.
+\func{wxDataViewColumn*}{AppendIconTextColumn}{\param{const wxBitmap\& }{label}, \param{unsigned int }{model\_column}, \param{wxDataViewCellMode }{mode = wxDATAVIEW\_CELL\_INERT}, \param{int }{width = -1}}
+
+Appends a column for rendering text with an icon. Returns the wxDataViewColumn
+created in the function or NULL on failure. This uses the
+\helpref{wxDataViewIconTextRenderer}{wxdataviewicontextrenderer}.
\membersection{wxDataViewCtrl::AppendTextColumn}\label{wxdataviewctrlappendtextcolumn}
-\func{bool}{AppendTextColumn}{\param{const wxString\& }{label}, \param{unsigned int }{model\_column}, \param{wxDataViewCellMode }{mode = wxDATAVIEW\_CELL\_INERT}, \param{int }{width = -1}}
+\func{wxDataViewColumn*}{AppendTextColumn}{\param{const wxString\& }{label}, \param{unsigned int }{model\_column}, \param{wxDataViewCellMode }{mode = wxDATAVIEW\_CELL\_INERT}, \param{int }{width = -1}}
-\func{bool}{AppendTextColumn}{\param{const wxBitmap\& }{label}, \param{unsigned int }{model\_column}, \param{wxDataViewCellMode }{mode = wxDATAVIEW\_CELL\_INERT}, \param{int }{width = -1}}
+\func{wxDataViewColumn*}{AppendTextColumn}{\param{const wxBitmap\& }{label}, \param{unsigned int }{model\_column}, \param{wxDataViewCellMode }{mode = wxDATAVIEW\_CELL\_INERT}, \param{int }{width = -1}}
-Appends a column for rendering text.
+Appends a column for rendering text. Returns the wxDataViewColumn
+created in the function or NULL on failure.
\membersection{wxDataViewCtrl::AppendToggleColumn}\label{wxdataviewctrlappendtogglecolumn}
-\func{bool}{AppendToggleColumn}{\param{const wxString\& }{label}, \param{unsigned int }{model\_column}, \param{wxDataViewCellMode }{mode = wxDATAVIEW\_CELL\_INERT}, \param{int }{width = 30}}
+\func{wxDataViewColumn*}{AppendToggleColumn}{\param{const wxString\& }{label}, \param{unsigned int }{model\_column}, \param{wxDataViewCellMode }{mode = wxDATAVIEW\_CELL\_INERT}, \param{int }{width = 30}}
-\func{bool}{AppendToggleColumn}{\param{const wxBitmap\& }{label}, \param{unsigned int }{model\_column}, \param{wxDataViewCellMode }{mode = wxDATAVIEW\_CELL\_INERT}, \param{int }{width = 30}}
+\func{wxDataViewColumn*}{AppendToggleColumn}{\param{const wxBitmap\& }{label}, \param{unsigned int }{model\_column}, \param{wxDataViewCellMode }{mode = wxDATAVIEW\_CELL\_INERT}, \param{int }{width = 30}}
-Appends a column for rendering a toggle.
+Appends a column for rendering a toggle. Returns the wxDataViewColumn
+created in the function or NULL on failure.
\membersection{wxDataViewCtrl::AssociateModel}\label{wxdataviewctrlassociatemodel}
Unselects all rows.
+\membersection{wxDataViewCtrl::Collapse}\label{wxdataviewctrlcollapse}
+
+\func{void}{Collapse}{\param{const wxDataViewItem \& }{item}}
+
+Collapses the item.
+
\membersection{wxDataViewCtrl::DeleteColumn}\label{wxdataviewctrldeletecolumn}
-\func{virtual bool}{DeleteColumn}{\param{unsigned int }{pos}}
+\func{virtual bool}{DeleteColumn}{\param{const wxDataViewColumn* }{column}}
Deletes given column.
-\membersection{wxDataViewCtrl::GetColumn}\label{wxdataviewctrlgetcolumn}
+\membersection{wxDataViewCtrl::Expand}\label{wxdataviewctrlexpand}
-\func{virtual wxDataViewColumn*}{GetColumn}{\param{unsigned int }{pos}}
+\func{void}{Expand}{\param{const wxDataViewItem \& }{item}}
-Returns pointer to the column.
-
-\membersection{wxDataViewCtrl::GetModel}\label{wxdataviewctrlgetmodel}
+Expands the item.
+
+\membersection{wxDataViewCtrl::GetColumn}\label{wxdataviewctrlgetcolumn}
-\func{virtual wxDataViewModel*}{GetModel}{\void}
+\constfunc{virtual wxDataViewColumn*}{GetColumn}{\param{unsigned int }{pos}}
-Returns pointer to the data model associated with the
-control (if any).
+Returns pointer to the column. {\it pos} refers to the
+position in the control which may change after reordering
+columns by the user.
\membersection{wxDataViewCtrl::GetColumnCount}\label{wxdataviewctrlgetcolumncount}
-\func{virtual unsigned int}{GetColumnCount}{\void}
+\constfunc{virtual unsigned int}{GetColumnCount}{\void}
Returns the number of columns.
+\membersection{wxDataViewCtrl::GetColumnPosition}\label{wxdataviewctrlgetcolumnposition}
+
+\constfunc{virtual int}{GetColumnPosition}{\param{const wxDataViewColumn* }{column}}
+
+Returns the position of the column or -1 if not found in the control.
+
\membersection{wxDataViewCtrl::EnsureVisible}\label{wxdataviewctrlensurevisible}
-\func{void}{EnsureVisible}{\param{const wxDataViewItem \& }{item}, \param{wxDataViewColumn* }{column = NULL}}
+\func{void}{EnsureVisible}{\param{const wxDataViewItem \& }{item}, \param{const wxDataViewColumn* }{column = NULL}}
Call this to ensure that the given item is visible.
\membersection{wxDataViewCtrl::GetExpanderColumn}\label{wxdataviewctrlgetexpandercolumn}
-\constfunc{unsigned int}{GetExpanderColumn}{\void}
+\constfunc{wxDataViewColumn *}{GetExpanderColumn}{\void}
Returns column containing the expanders.
\membersection{wxDataViewCtrl::GetItemRect}\label{wxdataviewctrlgetitemrect}
-\constfunc{wxRect}{GetItemRect}{\param{const wxDataViewItem\& }{item}, \param{unsigned int }{column}}
+\constfunc{wxRect}{GetItemRect}{\param{const wxDataViewItem\& }{item}, \param{const wxDataViewColumn *}{col = NULL}}
Returns item rect.
+\membersection{wxDataViewCtrl::GetModel}\label{wxdataviewctrlgetmodel}
+
+\constfunc{virtual wxDataViewModel*}{GetModel}{\void}
+
+Returns pointer to the data model associated with the
+control (if any).
+
\membersection{wxDataViewCtrl::GetSelection}\label{wxdataviewctrlgetselection}
-\func{wxDataViewItem}{GetSelection}{\void}
+\constfunc{wxDataViewItem}{GetSelection}{\void}
Returns first selected item or an invalid item if none is selected.
Fills {\it sel} with currently selected items and returns
their number.
+\membersection{wxDataViewCtrl::GetSortingColumn}\label{wxdataviewctrlgetsortingcolumn}
+
+\constfunc{virtual wxDataViewColumn*}{GetSortingColumn}{\void}
+
+Returns the wxDataViewColumn currently responsible for sorting
+or NULL if none has been selected.
+
\membersection{wxDataViewCtrl::HitTest}\label{wxdataviewctrlhittest}
-\constfunc{void}{HitTest}{\param{const wxPoint\& }{point}, \param{wxDataViewItem\& }{item}, \param{unsigned int\& }{column}}
+\constfunc{void}{HitTest}{\param{const wxPoint\& }{point}, \param{wxDataViewItem\& }{item}, \param{wxDataViewColumn *\&}{col}}
Hittest.
\membersection{wxDataViewCtrl::SetExpanderColumn}\label{wxdataviewctrlsetexpandercolumn}
-\func{void}{SetExpanderColumn}{\param{unsigned int }{col}}
+\func{void}{SetExpanderColumn}{\param{wxDataViewColumn *}{col}}
Set which column shall contain the tree-like expanders.