X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/50ec54b6564af84ca1280005b6659264a598abb7..c86b476dd540ac302ad023dc864c7c7d4f9ed823:/interface/wx/dataview.h?ds=inline diff --git a/interface/wx/dataview.h b/interface/wx/dataview.h index 9e12071e23..53a0c72ac5 100644 --- a/interface/wx/dataview.h +++ b/interface/wx/dataview.h @@ -203,11 +203,6 @@ public: */ wxDataViewModel(); - /** - Destructor. This should not be called directly. Use DecRef() instead. - */ - virtual ~wxDataViewModel(); - /** Adds a wxDataViewModelNotifier to the model. */ @@ -237,15 +232,15 @@ public: @see wxDataViewItemAttr. */ - bool GetAttr(const wxDataViewItem& item, unsigned int col, - wxDataViewItemAttr& attr); + virtual bool GetAttr(const wxDataViewItem& item, unsigned int col, + wxDataViewItemAttr& attr); /** Override this so the control can query the child items of an item. Returns the number of items. */ virtual unsigned int GetChildren(const wxDataViewItem& item, - wxDataViewItemArray& children) const; + wxDataViewItemArray& children) const = 0; /** Override this to indicate the number of columns in the model. @@ -369,6 +364,13 @@ public: */ virtual bool ValueChanged(const wxDataViewItem& item, unsigned int col); + +protected: + + /** + Destructor. This should not be called directly. Use DecRef() instead. + */ + virtual ~wxDataViewModel(); }; @@ -415,8 +417,8 @@ public: @see wxDataViewItemAttr. */ - bool GetAttr(unsigned int row, unsigned int col, - wxDataViewItemAttr& attr); + virtual bool GetAttr(unsigned int row, unsigned int col, + wxDataViewItemAttr& attr); /** Returns the wxDataViewItem at the given @e row. @@ -431,8 +433,8 @@ public: /** Override this to allow getting values from the model. */ - void GetValue(wxVariant& variant, unsigned int row, - unsigned int col) const; + virtual void GetValue(wxVariant& variant, unsigned int row, + unsigned int col) const = 0; /** Call this after if the data has to be read again from the model. @@ -481,8 +483,8 @@ public: /** Called in order to set a value in the model. */ - bool SetValue(const wxVariant& variant, unsigned int row, - unsigned int col); + virtual bool SetValue(const wxVariant& variant, unsigned int row, + unsigned int col) = 0; }; @@ -855,11 +857,6 @@ public: */ virtual bool ClearColumns(); - /** - Unselects all rows. - */ - void ClearSelection(); - /** Collapses the item. */ @@ -882,8 +879,8 @@ public: /** Call this to ensure that the given item is visible. */ - void EnsureVisible(const wxDataViewItem& item, - const wxDataViewColumn* column = NULL); + virtual void EnsureVisible(const wxDataViewItem& item, + const wxDataViewColumn* column = NULL); /** Expands the item. @@ -919,8 +916,8 @@ public: /** Returns item rect. */ - wxRect GetItemRect(const wxDataViewItem& item, - const wxDataViewColumn* col = NULL) const; + virtual wxRect GetItemRect(const wxDataViewItem& item, + const wxDataViewColumn* col = NULL) const; /** Returns pointer to the data model associated with the control (if any). @@ -946,8 +943,8 @@ public: /** Hittest. */ - void HitTest(const wxPoint& point, wxDataViewItem& item, - wxDataViewColumn*& col) const; + virtual void HitTest(const wxPoint& point, wxDataViewItem& item, + wxDataViewColumn*& col) const; /** Return @true if the item is selected. @@ -1029,8 +1026,8 @@ public: /** Called by owning model. */ - bool ItemAdded(const wxDataViewItem& parent, - const wxDataViewItem& item); + virtual bool ItemAdded(const wxDataViewItem& parent, + const wxDataViewItem& item) = 0; /** Called by owning model. @@ -1040,14 +1037,14 @@ public: /** Called by owning model. */ - bool ItemDeleted(const wxDataViewItem& parent, - const wxDataViewItem& item); + virtual bool ItemDeleted(const wxDataViewItem& parent, + const wxDataViewItem& item) = 0; /** Called by owning model. */ - bool ItemsAdded(const wxDataViewItem& parent, - const wxDataViewItemArray& items); + virtual bool ItemsAdded(const wxDataViewItem& parent, + const wxDataViewItemArray& items); /** Called by owning model. @@ -1057,8 +1054,8 @@ public: /** Called by owning model. */ - bool ItemsDeleted(const wxDataViewItem& parent, - const wxDataViewItemArray& items); + virtual bool ItemsDeleted(const wxDataViewItem& parent, + const wxDataViewItemArray& items); /** Called by owning model. @@ -1595,14 +1592,14 @@ public: /** Returns @true if the column is reorderable. */ - bool GetReorderable(); + virtual bool IsReorderable() const; /** Returns @true if the column is sortable. @see SetSortable() */ - bool GetSortable(); + virtual bool IsSortable() const; /** Returns the width of the column.