bool operator == (const wxDataViewItem &left, const wxDataViewItem &right);
+// ---------------------------------------------------------
+// wxDataViewModelNotifier
+// ---------------------------------------------------------
+
+class WXDLLIMPEXP_ADV wxDataViewModelNotifier
+{
+public:
+ wxDataViewModelNotifier() { }
+ virtual ~wxDataViewModelNotifier() { m_owner = NULL; }
+
+ virtual bool ItemAdded( const wxDataViewItem &parent, const wxDataViewItem &item ) = 0;
+ virtual bool ItemDeleted( const wxDataViewItem &parent, const wxDataViewItem &item ) = 0;
+ virtual bool ItemChanged( const wxDataViewItem &item ) = 0;
+ virtual bool ValueChanged( const wxDataViewItem &item, unsigned int col ) = 0;
+ virtual bool Cleared() = 0;
+
+ virtual void Resort() { }
+
+ void SetOwner( wxDataViewModel *owner ) { m_owner = owner; }
+ wxDataViewModel *GetOwner() { return m_owner; }
+
+private:
+ wxDataViewModel *m_owner;
+};
+
+
// ---------------------------------------------------------
// wxDataViewModel
// ---------------------------------------------------------
+WX_DECLARE_LIST(wxDataViewModelNotifier, wxDataViewModelNotifiers );
+
class WXDLLIMPEXP_ADV wxDataViewModel: public wxObjectRefData
{
public:
// delegated notifiers
virtual bool ItemAdded( const wxDataViewItem &parent, const wxDataViewItem &item );
- virtual bool ItemDeleted( const wxDataViewItem &item );
+ virtual bool ItemDeleted( const wxDataViewItem &parent, const wxDataViewItem &item );
virtual bool ItemChanged( const wxDataViewItem &item );
virtual bool ValueChanged( const wxDataViewItem &item, unsigned int col );
virtual bool Cleared();
// the user should not delete this class directly: he should use DecRef() instead!
virtual ~wxDataViewModel() { }
- wxList m_notifiers;
- unsigned int m_sortingColumn;
- bool m_ascending;
+ wxDataViewModelNotifiers m_notifiers;
+ unsigned int m_sortingColumn;
+ bool m_ascending;
};
// ---------------------------------------------------------
unsigned int m_lastIndex;
};
-// ---------------------------------------------------------
-// wxDataViewModelNotifier
-// ---------------------------------------------------------
-
-class WXDLLIMPEXP_ADV wxDataViewModelNotifier: public wxObject
-{
-public:
- wxDataViewModelNotifier() { }
- virtual ~wxDataViewModelNotifier() { m_owner = NULL; }
-
- virtual bool ItemAdded( const wxDataViewItem &parent, const wxDataViewItem &item ) = 0;
- virtual bool ItemDeleted( const wxDataViewItem &item ) = 0;
- virtual bool ItemChanged( const wxDataViewItem &item ) = 0;
- virtual bool ValueChanged( const wxDataViewItem &item, unsigned int col ) = 0;
- virtual bool Cleared() = 0;
-
- virtual void Resort() { };
-
- void SetOwner( wxDataViewModel *owner ) { m_owner = owner; }
- wxDataViewModel *GetOwner() { return m_owner; }
-
-private:
- wxDataViewModel *m_owner;
-};
-
-
//-----------------------------------------------------------------------------
// wxDataViewEditorCtrlEvtHandler
//-----------------------------------------------------------------------------