1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/common/datavcmn.cpp
3 // Purpose: wxDataViewCtrl base classes and common parts
4 // Author: Robert Roebling
7 // Copyright: (c) 2006, Robert Roebling
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 // For compilers that support precompilation, includes "wx.h".
12 #include "wx/wxprec.h"
18 #include "wx/object.h"
19 #include "wx/dataview.h"
23 // ---------------------------------------------------------
25 // ---------------------------------------------------------
27 IMPLEMENT_ABSTRACT_CLASS(wxDataViewModel
, wxObject
)
29 // ---------------------------------------------------------
30 // wxDataViewListModel
31 // ---------------------------------------------------------
33 IMPLEMENT_ABSTRACT_CLASS(wxDataViewListModel
, wxDataViewModel
)
35 wxDataViewListModel::wxDataViewListModel()
40 wxDataViewListModel::~wxDataViewListModel()
46 bool wxDataViewListModel::RowAppended()
49 return m_notifier
->RowAppended();
54 bool wxDataViewListModel::RowPrepended()
57 return m_notifier
->RowPrepended();
62 bool wxDataViewListModel::RowInserted( size_t before
)
65 return m_notifier
->RowInserted( before
);
70 bool wxDataViewListModel::RowDeleted( size_t row
)
73 return m_notifier
->RowDeleted( row
);
78 bool wxDataViewListModel::RowChanged( size_t row
)
81 return m_notifier
->RowChanged( row
);
86 bool wxDataViewListModel::ValueChanged( size_t row
, size_t col
)
89 return m_notifier
->RowAppended();
94 bool wxDataViewListModel::Cleared()
97 return m_notifier
->Cleared();
102 void wxDataViewListModel::SetNotifier( wxDataViewListModelNotifier
*notifier
)
107 m_notifier
= notifier
;
110 wxDataViewListModelNotifier
* wxDataViewListModel::GetNotifier()
115 // ---------------------------------------------------------
116 // wxDataViewCtrlBase
117 // ---------------------------------------------------------
119 IMPLEMENT_ABSTRACT_CLASS(wxDataViewCtrlBase
, wxControl
)
121 wxDataViewCtrlBase::wxDataViewCtrlBase()
126 wxDataViewCtrlBase::~wxDataViewCtrlBase()
132 bool wxDataViewCtrlBase::AssociateModel( wxDataViewModel
*model
)
142 wxDataViewModel
* wxDataViewCtrlBase::GetModel()