-// ---------------------------------------------------------
-// wxDataViewEventModelNotifier
-// ---------------------------------------------------------
-
-class WXDLLIMPEXP_ADV wxDataViewEventModelNotifier: public wxDataViewModelNotifier
-{
-public:
- wxDataViewEventModelNotifier( wxDataViewCtrl *ctrl ) { m_ctrl = ctrl; }
-
- bool SendEvent( wxEventType event_type, const wxDataViewItem &item, unsigned int col = 0 )
- {
- wxDataViewEvent event( event_type, m_ctrl->GetId() );
- event.SetEventObject( m_ctrl );
- event.SetModel( m_ctrl->GetModel() );
- event.SetItem( item );
- event.SetColumn( col );
- m_ctrl->GetEventHandler()->ProcessEvent( event );
- return true;
- }
-
- virtual bool ItemAdded( const wxDataViewItem &parent, const wxDataViewItem &item )
- { return SendEvent( wxEVT_COMMAND_DATAVIEW_MODEL_ITEM_ADDED, item ); }
- virtual bool ItemDeleted( const wxDataViewItem &item )
- { return SendEvent( wxEVT_COMMAND_DATAVIEW_MODEL_ITEM_DELETED, item ); }
- virtual bool ItemChanged( const wxDataViewItem &item )
- { return SendEvent( wxEVT_COMMAND_DATAVIEW_MODEL_ITEM_CHANGED, item ); }
- virtual bool ValueChanged( const wxDataViewItem &item, unsigned int col )
- { return SendEvent( wxEVT_COMMAND_DATAVIEW_MODEL_VALUE_CHANGED, item, col ); }
- virtual bool Cleared()
- { return SendEvent( wxEVT_COMMAND_DATAVIEW_MODEL_CLEARED, wxDataViewItem(0) ); }
-
-private:
- wxDataViewCtrl *m_ctrl;
-};
-
-