X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c4e5720224e0cae44be42d48631d6c03b5b797bb..ea22bf815ff359791dc23ea48749d22371c09bce:/interface/wx/dataview.h diff --git a/interface/wx/dataview.h b/interface/wx/dataview.h index caa53fbdc8..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. */ @@ -877,13 +874,13 @@ public: /** Deletes given column. */ - virtual bool DeleteColumn(const wxDataViewColumn* column); + virtual bool DeleteColumn(wxDataViewColumn* column); /** 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. @@ -1320,7 +1317,8 @@ public: The ctor. */ wxDataViewToggleRenderer(const wxString& varianttype = "bool", - wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT); + wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, + int align = wxDVR_DEFAULT_ALIGNMENT); }; @@ -1340,7 +1338,8 @@ public: The ctor. */ wxDataViewDateRenderer(const wxString& varianttype = "datetime", - wxDataViewCellMode mode = wxDATAVIEW_CELL_ACTIVATABLE); + wxDataViewCellMode mode = wxDATAVIEW_CELL_ACTIVATABLE, + int align = wxDVR_DEFAULT_ALIGNMENT); }; @@ -1484,7 +1483,7 @@ public: This will ensure that the correct colour, font and vertical alignment will be chosen so the text will look the same as text drawn by native renderers. */ - bool RenderText(const wxString& text, int xoffset, wxRect cell, + void RenderText(const wxString& text, int xoffset, wxRect cell, wxDC* dc, int state); /** @@ -1593,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. @@ -1621,7 +1620,7 @@ public: /** Set the bitmap of the column header. - */e + */ virtual void SetBitmap(const wxBitmap& bitmap); /**