X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f2b7492a88eef36f26668cefff8d3f8b91e5f50e..13d843f1c15fe721f03d933c600cd5ca62944003:/include/wx/dataview.h diff --git a/include/wx/dataview.h b/include/wx/dataview.h index e2dec89538..39ab01c92f 100644 --- a/include/wx/dataview.h +++ b/include/wx/dataview.h @@ -23,6 +23,7 @@ #include "wx/dynarray.h" #include "wx/icon.h" #include "wx/imaglist.h" +#include "wx/weakref.h" class WXDLLIMPEXP_FWD_CORE wxDataFormat; @@ -114,7 +115,7 @@ public: virtual void Resort() = 0; void SetOwner( wxDataViewModel *owner ) { m_owner = owner; } - wxDataViewModel *GetOwner() { return m_owner; } + wxDataViewModel *GetOwner() const { return m_owner; } private: wxDataViewModel *m_owner; @@ -292,7 +293,6 @@ private: wxDataViewItemArray m_hash; unsigned int m_lastIndex; bool m_ordered; - bool m_useHash; }; // --------------------------------------------------------- @@ -413,12 +413,13 @@ public: wxDataViewRendererBase( const wxString &varianttype, wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int alignment = wxDVR_DEFAULT_ALIGNMENT ); + ~wxDataViewRendererBase(); virtual bool Validate( wxVariant& WXUNUSED(value) ) { return true; } void SetOwner( wxDataViewColumn *owner ) { m_owner = owner; } - wxDataViewColumn* GetOwner() { return m_owner; } + wxDataViewColumn* GetOwner() const { return m_owner; } // renderer properties: @@ -456,7 +457,7 @@ public: protected: wxString m_variantType; wxDataViewColumn *m_owner; - wxControl *m_editorCtrl; + wxWeakRef m_editorCtrl; wxDataViewItem m_item; // for m_editorCtrl // internal utility: @@ -477,6 +478,7 @@ public: : m_text(text), m_icon(icon) { } wxDataViewIconText( const wxDataViewIconText &other ) + : wxObject() { m_icon = other.m_icon; m_text = other.m_text; } void SetText( const wxString &text ) { m_text = text; } @@ -583,6 +585,7 @@ protected: #define wxDV_VERT_RULES 0x0008 // light vertical rules between columns #define wxDV_ROW_LINES 0x0010 // alternating colour in rows +#define wxDV_VARIABLE_LINE_HEIGHT 0x0020 // variable line height class WXDLLIMPEXP_ADV wxDataViewCtrlBase: public wxControl { @@ -695,6 +698,7 @@ public: virtual bool PrependColumn( wxDataViewColumn *col ); + virtual bool InsertColumn( unsigned int pos, wxDataViewColumn *col ); virtual bool AppendColumn( wxDataViewColumn *col ); virtual unsigned int GetColumnCount() const = 0; @@ -710,7 +714,7 @@ public: { return m_expander_column; } virtual wxDataViewColumn *GetSortingColumn() const = 0; - + void SetIndent( int indent ) { m_indent = indent ; DoSetIndent(); } int GetIndent() const