Let various AppendXXXColumn helplers return the column created within
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48330 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
		@@ -11,7 +11,7 @@ this class to render its data.
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
\wxheading{Constants}
 | 
					\wxheading{Constants}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
These flags define behavi
 | 
					These flags define behaviour of the column:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
{\small
 | 
					{\small
 | 
				
			||||||
\begin{verbatim}
 | 
					\begin{verbatim}
 | 
				
			||||||
@@ -122,9 +122,7 @@ Set the bitmap of the column header.
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
Indicate the sort order if the implementation of the
 | 
					Indicate the sort order if the implementation of the
 | 
				
			||||||
wxDataViewCtrl supports it, most commonly by showing
 | 
					wxDataViewCtrl supports it, most commonly by showing
 | 
				
			||||||
a little arrow. Use this in conjunction with 
 | 
					a little arrow. 
 | 
				
			||||||
\helpref{wxDataViewSortedListModel::SetAscending}{wxdataviewsortedlistmodelsetascending}
 | 
					 | 
				
			||||||
to sort the actual data.
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
\membersection{wxDataViewColumn::SetSortable}\label{wxdataviewcolumnsetsortable}
 | 
					\membersection{wxDataViewColumn::SetSortable}\label{wxdataviewcolumnsetsortable}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -132,9 +130,7 @@ to sort the actual data.
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
Indicate that the column is sortable. This is only to provide a
 | 
					Indicate that the column is sortable. This is only to provide a
 | 
				
			||||||
visual hint in the column (such as a sort order indicator). It
 | 
					visual hint in the column (such as a sort order indicator). It
 | 
				
			||||||
will not actually sort the data. Use a 
 | 
					will not actually sort the data. 
 | 
				
			||||||
\helpref{wxDataViewSortedListModel}{wxdataviewsortedlistmodel}
 | 
					 | 
				
			||||||
to so the sorting.
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
\membersection{wxDataViewColumn::SetTitle}\label{wxdataviewcolumnsettitle}
 | 
					\membersection{wxDataViewColumn::SetTitle}\label{wxdataviewcolumnsettitle}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -88,51 +88,57 @@ Destructor.
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
\func{virtual bool}{AppendColumn}{\param{wxDataViewColumn* }{col}}
 | 
					\func{virtual bool}{AppendColumn}{\param{wxDataViewColumn* }{col}}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Add a \helpref{wxDataViewColumn}{wxdataviewcolumn} to the control. Note
 | 
					Add a \helpref{wxDataViewColumn}{wxdataviewcolumn} to the control. Returns
 | 
				
			||||||
that there is a number of short cut methods which implicitly create
 | 
					{\it true} on success.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Note that there is a number of short cut methods which implicitly create
 | 
				
			||||||
a \helpref{wxDataViewColumn}{wxdataviewcolumn} and a 
 | 
					a \helpref{wxDataViewColumn}{wxdataviewcolumn} and a 
 | 
				
			||||||
\helpref{wxDataViewRenderer}{wxdataviewrenderer} for it (see below).
 | 
					\helpref{wxDataViewRenderer}{wxdataviewrenderer} for it (see below).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
\membersection{wxDataViewCtrl::AppendBitmapColumn}\label{wxdataviewctrlappendbitmapcolumn}
 | 
					\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}
 | 
					\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}
 | 
					\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{bool}{AppendProgressColumn}{\param{const wxBitmap\& }{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.
 | 
					Appends a column for rendering a progress indicator. Returns the wxDataViewColumn
 | 
				
			||||||
 | 
					created in the function or NULL on failure.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
\membersection{wxDataViewCtrl::AppendTextColumn}\label{wxdataviewctrlappendtextcolumn}
 | 
					\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}
 | 
					\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}
 | 
					\membersection{wxDataViewCtrl::AssociateModel}\label{wxdataviewctrlassociatemodel}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -413,43 +413,44 @@ public:
 | 
				
			|||||||
    wxDataViewModel* GetModel();
 | 
					    wxDataViewModel* GetModel();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // short cuts
 | 
					    // short cuts
 | 
				
			||||||
    bool AppendTextColumn( const wxString &label, unsigned int model_column, 
 | 
					    wxDataViewColumn *AppendTextColumn( const wxString &label, unsigned int model_column, 
 | 
				
			||||||
                    wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1,
 | 
					                    wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1,
 | 
				
			||||||
                    wxAlignment align = wxALIGN_CENTER,
 | 
					                    wxAlignment align = wxALIGN_CENTER,
 | 
				
			||||||
                    int flags = wxDATAVIEW_COL_RESIZABLE );
 | 
					                    int flags = wxDATAVIEW_COL_RESIZABLE );
 | 
				
			||||||
    bool AppendToggleColumn( const wxString &label, unsigned int model_column,
 | 
					    wxDataViewColumn *AppendToggleColumn( const wxString &label, unsigned int model_column,
 | 
				
			||||||
                    wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = wxDVC_TOGGLE_DEFAULT_WIDTH,
 | 
					                    wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = wxDVC_TOGGLE_DEFAULT_WIDTH,
 | 
				
			||||||
                    wxAlignment align = wxALIGN_CENTER,
 | 
					                    wxAlignment align = wxALIGN_CENTER,
 | 
				
			||||||
                    int flags = wxDATAVIEW_COL_RESIZABLE );
 | 
					                    int flags = wxDATAVIEW_COL_RESIZABLE );
 | 
				
			||||||
    bool AppendProgressColumn( const wxString &label, unsigned int model_column, 
 | 
					    wxDataViewColumn *AppendProgressColumn( const wxString &label, unsigned int model_column, 
 | 
				
			||||||
                    wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = wxDVC_DEFAULT_WIDTH,
 | 
					                    wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = wxDVC_DEFAULT_WIDTH,
 | 
				
			||||||
                    wxAlignment align = wxALIGN_CENTER,
 | 
					                    wxAlignment align = wxALIGN_CENTER,
 | 
				
			||||||
                    int flags = wxDATAVIEW_COL_RESIZABLE );
 | 
					                    int flags = wxDATAVIEW_COL_RESIZABLE );
 | 
				
			||||||
    bool AppendDateColumn( const wxString &label, unsigned int model_column,
 | 
					    wxDataViewColumn *AppendDateColumn( const wxString &label, unsigned int model_column,
 | 
				
			||||||
                    wxDataViewCellMode mode = wxDATAVIEW_CELL_ACTIVATABLE, int width = -1,
 | 
					                    wxDataViewCellMode mode = wxDATAVIEW_CELL_ACTIVATABLE, int width = -1,
 | 
				
			||||||
                    wxAlignment align = wxALIGN_CENTER,
 | 
					                    wxAlignment align = wxALIGN_CENTER,
 | 
				
			||||||
                    int flags = wxDATAVIEW_COL_RESIZABLE );
 | 
					                    int flags = wxDATAVIEW_COL_RESIZABLE );
 | 
				
			||||||
    bool AppendBitmapColumn( const wxString &label, unsigned int model_column,
 | 
					    wxDataViewColumn *AppendBitmapColumn( const wxString &label, unsigned int model_column,
 | 
				
			||||||
                    wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1,
 | 
					                    wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1,
 | 
				
			||||||
                    wxAlignment align = wxALIGN_CENTER,
 | 
					                    wxAlignment align = wxALIGN_CENTER,
 | 
				
			||||||
                    int flags = wxDATAVIEW_COL_RESIZABLE );
 | 
					                    int flags = wxDATAVIEW_COL_RESIZABLE );
 | 
				
			||||||
    bool AppendTextColumn( const wxBitmap &label, unsigned int model_column,
 | 
					    wxDataViewColumn *AppendTextColumn( const wxBitmap &label, unsigned int model_column,
 | 
				
			||||||
                    wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1,
 | 
					                    wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1,
 | 
				
			||||||
                    wxAlignment align = wxALIGN_CENTER,
 | 
					                    wxAlignment align = wxALIGN_CENTER,
 | 
				
			||||||
                    int flags = wxDATAVIEW_COL_RESIZABLE );
 | 
					                    int flags = wxDATAVIEW_COL_RESIZABLE );
 | 
				
			||||||
    bool AppendToggleColumn( const wxBitmap &label, unsigned int model_column,
 | 
					    wxDataViewColumn *AppendToggleColumn( const wxBitmap &label, unsigned int model_column,
 | 
				
			||||||
                    wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = wxDVC_TOGGLE_DEFAULT_WIDTH,
 | 
					                    wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = wxDVC_TOGGLE_DEFAULT_WIDTH,
 | 
				
			||||||
                    wxAlignment align = wxALIGN_CENTER,
 | 
					                    wxAlignment align = wxALIGN_CENTER,
 | 
				
			||||||
                    int flags = wxDATAVIEW_COL_RESIZABLE );
 | 
					                    int flags = wxDATAVIEW_COL_RESIZABLE );
 | 
				
			||||||
    bool AppendProgressColumn( const wxBitmap &label, unsigned int model_column,
 | 
					    wxDataViewColumn *AppendProgressColumn( const wxBitmap &label, unsigned int model_column,
 | 
				
			||||||
                    wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = wxDVC_DEFAULT_WIDTH,
 | 
					                    wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = wxDVC_DEFAULT_WIDTH,
 | 
				
			||||||
                    wxAlignment align = wxALIGN_CENTER,
 | 
					                    wxAlignment align = wxALIGN_CENTER,
 | 
				
			||||||
                    int flags = wxDATAVIEW_COL_RESIZABLE );
 | 
					                    int flags = wxDATAVIEW_COL_RESIZABLE );
 | 
				
			||||||
    bool AppendDateColumn( const wxBitmap &label, unsigned int model_column,
 | 
					    wxDataViewColumn *AppendDateColumn( const wxBitmap &label, unsigned int model_column,
 | 
				
			||||||
                    wxDataViewCellMode mode = wxDATAVIEW_CELL_ACTIVATABLE, int width = -1,
 | 
					                    wxDataViewCellMode mode = wxDATAVIEW_CELL_ACTIVATABLE, int width = -1,
 | 
				
			||||||
                    wxAlignment align = wxALIGN_CENTER,
 | 
					                    wxAlignment align = wxALIGN_CENTER,
 | 
				
			||||||
                    int flags = wxDATAVIEW_COL_RESIZABLE );
 | 
					                    int flags = wxDATAVIEW_COL_RESIZABLE );
 | 
				
			||||||
    bool AppendBitmapColumn( const wxBitmap &label, unsigned int model_column,
 | 
					    
 | 
				
			||||||
 | 
					    wxDataViewColumn *AppendBitmapColumn( const wxBitmap &label, unsigned int model_column,
 | 
				
			||||||
                    wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1,
 | 
					                    wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int width = -1,
 | 
				
			||||||
                    wxAlignment align = wxALIGN_CENTER,
 | 
					                    wxAlignment align = wxALIGN_CENTER,
 | 
				
			||||||
                    int flags = wxDATAVIEW_COL_RESIZABLE );
 | 
					                    int flags = wxDATAVIEW_COL_RESIZABLE );
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -579,87 +579,119 @@ wxDataViewModel* wxDataViewCtrlBase::GetModel()
 | 
				
			|||||||
    return m_model;
 | 
					    return m_model;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool wxDataViewCtrlBase::AppendTextColumn( const wxString &label, unsigned int model_column,
 | 
					wxDataViewColumn *
 | 
				
			||||||
 | 
					wxDataViewCtrlBase::AppendTextColumn( const wxString &label, unsigned int model_column,
 | 
				
			||||||
                            wxDataViewCellMode mode, int width, wxAlignment align, int flags )
 | 
					                            wxDataViewCellMode mode, int width, wxAlignment align, int flags )
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    return AppendColumn( new wxDataViewColumn( label,
 | 
					    wxDataViewColumn *ret = new wxDataViewColumn( label,
 | 
				
			||||||
        new wxDataViewTextRenderer( wxT("string"), mode, (int)align ),
 | 
					        new wxDataViewTextRenderer( wxT("string"), mode, (int)align ),
 | 
				
			||||||
        model_column, width, align, flags ) );
 | 
					        model_column, width, align, flags );
 | 
				
			||||||
 | 
					    AppendColumn( ret );
 | 
				
			||||||
 | 
					    return ret;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool wxDataViewCtrlBase::AppendToggleColumn( const wxString &label, unsigned int model_column,
 | 
					wxDataViewColumn *
 | 
				
			||||||
 | 
					wxDataViewCtrlBase::AppendToggleColumn( const wxString &label, unsigned int model_column,
 | 
				
			||||||
                            wxDataViewCellMode mode, int width, wxAlignment align, int flags )
 | 
					                            wxDataViewCellMode mode, int width, wxAlignment align, int flags )
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    return AppendColumn( new wxDataViewColumn( label,
 | 
					    
 | 
				
			||||||
 | 
					    wxDataViewColumn *ret = new wxDataViewColumn( label,
 | 
				
			||||||
        new wxDataViewToggleRenderer( wxT("bool"), mode, (int)align ),
 | 
					        new wxDataViewToggleRenderer( wxT("bool"), mode, (int)align ),
 | 
				
			||||||
        model_column, width, align, flags ) );
 | 
					        model_column, width, align, flags );
 | 
				
			||||||
 | 
					    AppendColumn( ret );
 | 
				
			||||||
 | 
					    return ret;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool wxDataViewCtrlBase::AppendProgressColumn( const wxString &label, unsigned int model_column,
 | 
					wxDataViewColumn *
 | 
				
			||||||
 | 
					wxDataViewCtrlBase::AppendProgressColumn( const wxString &label, unsigned int model_column,
 | 
				
			||||||
                            wxDataViewCellMode mode, int width, wxAlignment align, int flags )
 | 
					                            wxDataViewCellMode mode, int width, wxAlignment align, int flags )
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    return AppendColumn( new wxDataViewColumn( label,
 | 
					    wxDataViewColumn *ret = new wxDataViewColumn( label,
 | 
				
			||||||
        new wxDataViewProgressRenderer( wxEmptyString, wxT("long"), mode, (int)align ),
 | 
					        new wxDataViewProgressRenderer( wxEmptyString, wxT("long"), mode, (int)align ),
 | 
				
			||||||
        model_column, width, align, flags ) );
 | 
					        model_column, width, align, flags );
 | 
				
			||||||
 | 
					    AppendColumn( ret );
 | 
				
			||||||
 | 
					    return ret;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool wxDataViewCtrlBase::AppendDateColumn( const wxString &label, unsigned int model_column,
 | 
					wxDataViewColumn *
 | 
				
			||||||
 | 
					wxDataViewCtrlBase::AppendDateColumn( const wxString &label, unsigned int model_column,
 | 
				
			||||||
                            wxDataViewCellMode mode, int width, wxAlignment align, int flags )
 | 
					                            wxDataViewCellMode mode, int width, wxAlignment align, int flags )
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    return AppendColumn( new wxDataViewColumn( label,
 | 
					    wxDataViewColumn *ret = new wxDataViewColumn( label,
 | 
				
			||||||
        new wxDataViewDateRenderer( wxT("datetime"), mode, (int)align ),
 | 
					        new wxDataViewDateRenderer( wxT("datetime"), mode, (int)align ),
 | 
				
			||||||
        model_column, width, align, flags ) );
 | 
					        model_column, width, align, flags );
 | 
				
			||||||
 | 
					    AppendColumn( ret );
 | 
				
			||||||
 | 
					    return ret;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool wxDataViewCtrlBase::AppendBitmapColumn( const wxString &label, unsigned int model_column,
 | 
					wxDataViewColumn *
 | 
				
			||||||
 | 
					wxDataViewCtrlBase::AppendBitmapColumn( const wxString &label, unsigned int model_column,
 | 
				
			||||||
                            wxDataViewCellMode mode, int width, wxAlignment align, int flags )
 | 
					                            wxDataViewCellMode mode, int width, wxAlignment align, int flags )
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    return AppendColumn( new wxDataViewColumn( label,
 | 
					    wxDataViewColumn *ret = new wxDataViewColumn( label,
 | 
				
			||||||
        new wxDataViewBitmapRenderer( wxT("wxBitmap"), mode, (int)align ),
 | 
					        new wxDataViewBitmapRenderer( wxT("wxBitmap"), mode, (int)align ),
 | 
				
			||||||
        model_column, width, align, flags ) );
 | 
					        model_column, width, align, flags );
 | 
				
			||||||
 | 
					    AppendColumn( ret );
 | 
				
			||||||
 | 
					    return ret;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool wxDataViewCtrlBase::AppendTextColumn( const wxBitmap &label, unsigned int model_column,
 | 
					wxDataViewColumn *
 | 
				
			||||||
 | 
					wxDataViewCtrlBase::AppendTextColumn( const wxBitmap &label, unsigned int model_column,
 | 
				
			||||||
                            wxDataViewCellMode mode, int width, wxAlignment align, int flags )
 | 
					                            wxDataViewCellMode mode, int width, wxAlignment align, int flags )
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    return AppendColumn( new wxDataViewColumn( label,
 | 
					    wxDataViewColumn *ret = new wxDataViewColumn( label,
 | 
				
			||||||
        new wxDataViewTextRenderer( wxT("string"), mode, (int)align ),
 | 
					        new wxDataViewTextRenderer( wxT("string"), mode, (int)align ),
 | 
				
			||||||
        model_column, width, align, flags ) );
 | 
					        model_column, width, align, flags );
 | 
				
			||||||
 | 
					    AppendColumn( ret );
 | 
				
			||||||
 | 
					    return ret;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool wxDataViewCtrlBase::AppendToggleColumn( const wxBitmap &label, unsigned int model_column,
 | 
					wxDataViewColumn *
 | 
				
			||||||
 | 
					wxDataViewCtrlBase::AppendToggleColumn( const wxBitmap &label, unsigned int model_column,
 | 
				
			||||||
                            wxDataViewCellMode mode, int width, wxAlignment align, int flags )
 | 
					                            wxDataViewCellMode mode, int width, wxAlignment align, int flags )
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    return AppendColumn( new wxDataViewColumn( label,
 | 
					    wxDataViewColumn *ret = new wxDataViewColumn( label,
 | 
				
			||||||
        new wxDataViewToggleRenderer( wxT("bool"), mode, (int)align ),
 | 
					        new wxDataViewToggleRenderer( wxT("bool"), mode, (int)align ),
 | 
				
			||||||
        model_column, width, align, flags ) );
 | 
					        model_column, width, align, flags );
 | 
				
			||||||
 | 
					    AppendColumn( ret );
 | 
				
			||||||
 | 
					    return ret;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool wxDataViewCtrlBase::AppendProgressColumn( const wxBitmap &label, unsigned int model_column,
 | 
					wxDataViewColumn *
 | 
				
			||||||
 | 
					wxDataViewCtrlBase::AppendProgressColumn( const wxBitmap &label, unsigned int model_column,
 | 
				
			||||||
                            wxDataViewCellMode mode, int width, wxAlignment align, int flags )
 | 
					                            wxDataViewCellMode mode, int width, wxAlignment align, int flags )
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    return AppendColumn( new wxDataViewColumn( label,
 | 
					    wxDataViewColumn *ret = new wxDataViewColumn( label,
 | 
				
			||||||
        new wxDataViewProgressRenderer( wxEmptyString, wxT("long"), mode, (int)align ),
 | 
					        new wxDataViewProgressRenderer( wxEmptyString, wxT("long"), mode, (int)align ),
 | 
				
			||||||
        model_column, width, align, flags ) );
 | 
					        model_column, width, align, flags );
 | 
				
			||||||
 | 
					    AppendColumn( ret );
 | 
				
			||||||
 | 
					    return ret;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool wxDataViewCtrlBase::AppendDateColumn( const wxBitmap &label, unsigned int model_column,
 | 
					wxDataViewColumn *
 | 
				
			||||||
 | 
					wxDataViewCtrlBase::AppendDateColumn( const wxBitmap &label, unsigned int model_column,
 | 
				
			||||||
                            wxDataViewCellMode mode, int width, wxAlignment align, int flags )
 | 
					                            wxDataViewCellMode mode, int width, wxAlignment align, int flags )
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    return AppendColumn( new wxDataViewColumn( label,
 | 
					    wxDataViewColumn *ret = new wxDataViewColumn( label,
 | 
				
			||||||
        new wxDataViewDateRenderer( wxT("datetime"), mode, (int)align ),
 | 
					        new wxDataViewDateRenderer( wxT("datetime"), mode, (int)align ),
 | 
				
			||||||
        model_column, width, align, flags ) );
 | 
					        model_column, width, align, flags );
 | 
				
			||||||
 | 
					    AppendColumn( ret );
 | 
				
			||||||
 | 
					    return ret;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool wxDataViewCtrlBase::AppendBitmapColumn( const wxBitmap &label, unsigned int model_column,
 | 
					wxDataViewColumn *
 | 
				
			||||||
 | 
					wxDataViewCtrlBase::AppendBitmapColumn( const wxBitmap &label, unsigned int model_column,
 | 
				
			||||||
                            wxDataViewCellMode mode, int width, wxAlignment align, int flags )
 | 
					                            wxDataViewCellMode mode, int width, wxAlignment align, int flags )
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    return AppendColumn( new wxDataViewColumn( label,
 | 
					    wxDataViewColumn *ret = new wxDataViewColumn( label,
 | 
				
			||||||
        new wxDataViewBitmapRenderer( wxT("wxBitmap"), mode, (int)align ),
 | 
					        new wxDataViewBitmapRenderer( wxT("wxBitmap"), mode, (int)align ),
 | 
				
			||||||
        model_column, width, align, flags ) );
 | 
					        model_column, width, align, flags );
 | 
				
			||||||
 | 
					    AppendColumn( ret );
 | 
				
			||||||
 | 
					    return ret;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool wxDataViewCtrlBase::AppendColumn( wxDataViewColumn *col )
 | 
					bool
 | 
				
			||||||
 | 
					wxDataViewCtrlBase::AppendColumn( wxDataViewColumn *col )
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    m_cols.Append( (wxObject*) col );
 | 
					    m_cols.Append( (wxObject*) col );
 | 
				
			||||||
    col->SetOwner( (wxDataViewCtrl*) this );
 | 
					    col->SetOwner( (wxDataViewCtrl*) this );
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user