virtual int Compare( const wxDataViewItem &item1, const wxDataViewItem &item2,
unsigned int column, bool ascending );
virtual bool HasDefaultCompare() const { return false; }
+
+ // internal
+ virtual bool IsIndexListModel() const { return false; }
protected:
// the user should not delete this class directly: he should use DecRef() instead!
wxDataViewIndexListModel( unsigned int initial_size = 0 );
~wxDataViewIndexListModel();
- virtual unsigned int GetRowCount() = 0;
-
virtual void GetValue( wxVariant &variant,
unsigned int row, unsigned int col ) const = 0;
virtual int Compare( const wxDataViewItem &item1, const wxDataViewItem &item2,
unsigned int column, bool ascending );
- virtual bool HasDefaultCompare() const { return true; }
+ virtual bool HasDefaultCompare() const;
// implement base methods
virtual bool IsContainer( const wxDataViewItem &item ) const;
virtual unsigned int GetChildren( const wxDataViewItem &item, wxDataViewItemArray &children ) const;
+ // internal
+ virtual bool IsIndexListModel() const { return true; }
+ unsigned int GetLastIndex() const { return m_lastIndex; }
+
private:
wxDataViewItemArray m_hash;
unsigned int m_lastIndex;
+ bool m_ordered;
+ bool m_useHash;
};
const wxBitmap &GetBitmap() const { return m_bitmap; }
unsigned int GetModelColumn() const { return static_cast<unsigned int>(m_model_column); }
- wxDataViewCtrl *GetOwner() { return m_owner; }
- wxDataViewRenderer* GetRenderer() { return m_renderer; }
+ wxDataViewCtrl *GetOwner() const { return m_owner; }
+ wxDataViewRenderer* GetRenderer() const { return m_renderer; }
protected:
wxDataViewRenderer *m_renderer;
virtual unsigned int GetColumnCount() const
{ return 1; };
virtual wxString GetColumnType( unsigned int WXUNUSED(col) ) const
- { return "wxDataViewIconText"; }
+ { return wxT("wxDataViewIconText"); }
wxDataViewTreeStoreNode *FindNode( const wxDataViewItem &item ) const;
wxDataViewTreeStoreContainerNode *FindContainerNode( const wxDataViewItem &item ) const;