Doc improvements

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49173 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2007-10-16 17:53:01 +00:00
parent 7da1b21e25
commit 2a4f365c04

View File

@@ -33,15 +33,20 @@ one of the following methods:
\helpref{ItemAdded}{wxdataviewmodelitemadded}, \helpref{ItemAdded}{wxdataviewmodelitemadded},
\helpref{ItemDeleted}{wxdataviewmodelitemdeleted}, \helpref{ItemDeleted}{wxdataviewmodelitemdeleted},
\helpref{ItemChanged}{wxdataviewmodelitemchanged}, \helpref{ItemChanged}{wxdataviewmodelitemchanged},
\helpref{Cleared}{wxdataviewmodelcleared}. \helpref{Cleared}{wxdataviewmodelcleared}. There are
plural forms for notification of addition, change
or removal of several item at once. See
\helpref{ItemsAdded}{wxdataviewmodelitesmadded},
\helpref{ItemsDeleted}{wxdataviewmodelitemsdeleted},
\helpref{ItemsChanged}{wxdataviewmodelitemschanged},
Note that wxDataViewModel does not define the position or Note that wxDataViewModel does not define the position or
index of any item in the control since several control might index of any item in the control because different controls
display the data differently, but wxDataViewModel does might display the same data differently. wxDataViewModel does
provide a \helpref{Compare}{wxdataviewmodelcompare} method provide a \helpref{Compare}{wxdataviewmodelcompare} method
which the wxDataViewCtrl may use to sort the data either which the wxDataViewCtrl may use to sort the data either
in conjunction with a column header or without (see in conjunction with a column header or without (see
\helpref{HasDefaultCompare}{wxdataviewmodelhasdefaultcompare}. \helpref{HasDefaultCompare}{wxdataviewmodelhasdefaultcompare}).
This class maintains a list of This class maintains a list of
\helpref{wxDataViewModelNotifier}{wxdataviewmodelnotifier} \helpref{wxDataViewModelNotifier}{wxdataviewmodelnotifier}
@@ -59,6 +64,24 @@ from the base model:
\helpref{wxDataViewIndexListModel}{wxdataviewindexlistmodel}, \helpref{wxDataViewIndexListModel}{wxdataviewindexlistmodel},
\helpref{wxDataViewTreeStore}{wxdataviewtreestore}. \helpref{wxDataViewTreeStore}{wxdataviewtreestore}.
Note that wxDataViewModel is reference counted, derives from
\helpref{wxObjectRefData}{wxobjectrefdata} and cannot be deleted
directly as it can be shares by several wxDataViewCtrl. This
implies that you need to decrease the reference count after
associating the model with a control like this:
{\small%
\begin{verbatim}
wxDataViewCtrl *musicCtrl = new wxDataViewCtrl( this, ID_MUSIC_CTRL, wxDefaultPosition,
wxDefaultSize, wxDV_MULTIPLE );
wxDataViewModel *musicModel = new MyMusicModel;
m_musicCtrl->AssociateModel( musicModel );
musicModel->DecRef(); // avoid memory leak !!
// add columns now
\end{verbatim}
}%
\wxheading{Derived from} \wxheading{Derived from}
\helpref{wxObjectRefData}{wxobjectrefdata} \helpref{wxObjectRefData}{wxobjectrefdata}
@@ -137,7 +160,8 @@ an item. Returns the number of items.
\constfunc{virtual wxDataViewItem}{GetParent}{\param{const wxDataViewItem\& }{item}} \constfunc{virtual wxDataViewItem}{GetParent}{\param{const wxDataViewItem\& }{item}}
Override this to indicate which wxDataViewItem representing the parent Override this to indicate which wxDataViewItem representing the parent
of {\it item} or an invalid wxDataViewItem if {\it item} is the root item. of {\it item} or an invalid wxDataViewItem if the the root item is
the parent item.
\membersection{wxDataViewModel::GetValue}\label{wxdataviewmodelgetvalue} \membersection{wxDataViewModel::GetValue}\label{wxdataviewmodelgetvalue}