git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41585
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
#if defined(__WXGTK20__)
// for testing
#if defined(__WXGTK20__)
// for testing
- #define wxUSE_GENERICDATAVIEWCTRL 1
+ // #define wxUSE_GENERICDATAVIEWCTRL 1
#elif defined(__WXMAC__)
#define wxUSE_GENERICDATAVIEWCTRL 1
#else
#elif defined(__WXMAC__)
#define wxUSE_GENERICDATAVIEWCTRL 1
#else
}
wxDataViewColumn *m_viewColumn;
}
wxDataViewColumn *m_viewColumn;
- unsigned int m_modelColumn;
+ unsigned int m_modelColumn;
};
class WXDLLIMPEXP_ADV wxDataViewListModel: public wxDataViewModel
};
class WXDLLIMPEXP_ADV wxDataViewListModel: public wxDataViewModel
virtual bool ClearColumns();
virtual wxDataViewColumn* GetColumn( unsigned int pos );
virtual bool ClearColumns();
virtual wxDataViewColumn* GetColumn( unsigned int pos );
+ virtual void SetSelection( int row ) = 0; // -1 for unselect
+ inline void ClearSelection() { SetSelection( -1 ); }
+ virtual void SetSelectionRange( unsigned int from, unsigned int to ) = 0;
+ virtual void SetSelections( const wxArrayInt& aSelections) = 0;
+
+ virtual bool IsSelected( unsigned int row ) const = 0;
+ virtual int GetSelection() const = 0;
+ virtual int GetSelections(wxArrayInt& aSelections) const = 0;
+
private:
wxDataViewListModel *m_model;
wxList m_cols;
private:
wxDataViewListModel *m_model;
wxList m_cols;
virtual bool AssociateModel( wxDataViewListModel *model );
virtual bool AppendColumn( wxDataViewColumn *col );
virtual bool AssociateModel( wxDataViewListModel *model );
virtual bool AppendColumn( wxDataViewColumn *col );
+ virtual void SetSelection( int row ); // -1 for unselect
+ virtual void SetSelectionRange( unsigned int from, unsigned int to );
+ virtual void SetSelections( const wxArrayInt& aSelections);
+
+ virtual bool IsSelected( unsigned int row ) const;
+ virtual int GetSelection() const;
+ virtual int GetSelections(wxArrayInt& aSelections) const;
+
private:
friend class wxDataViewMainWindow;
friend class wxDataViewHeaderWindow;
private:
friend class wxDataViewMainWindow;
friend class wxDataViewHeaderWindow;
virtual bool AssociateModel( wxDataViewListModel *model );
virtual bool AppendColumn( wxDataViewColumn *col );
virtual bool AssociateModel( wxDataViewListModel *model );
virtual bool AppendColumn( wxDataViewColumn *col );
+ virtual void SetSelection( int row ); // -1 for unselect
+ virtual void SetSelectionRange( unsigned int from, unsigned int to );
+ virtual void SetSelections( const wxArrayInt& aSelections);
+
+ virtual bool IsSelected( unsigned int row ) const;
+ virtual int GetSelection() const;
+ virtual int GetSelections(wxArrayInt& aSelections) const;
+
+
private:
friend class wxDataViewCtrlDC;
friend class wxGtkDataViewListModelNotifier;
private:
friend class wxDataViewCtrlDC;
friend class wxGtkDataViewListModelNotifier;
+void wxDataViewCtrl::SetSelection( int row )
+{
+}
+
+void wxDataViewCtrl::SetSelectionRange( unsigned int from, unsigned int to )
+{
+}
+
+void wxDataViewCtrl::SetSelections( const wxArrayInt& aSelections)
+{
+}
+
+bool wxDataViewCtrl::IsSelected( unsigned int row ) const
+{
+ return false;
+}
+
+int wxDataViewCtrl::GetSelection() const
+{
+ return -1;
+}
+
+int wxDataViewCtrl::GetSelections(wxArrayInt& aSelections) const
+{
+ return 0;
+}
+
#endif
// !wxUSE_GENERICDATAVIEWCTRL
#endif
// !wxUSE_GENERICDATAVIEWCTRL
+void wxDataViewCtrl::SetSelection( int row )
+{
+}
+
+void wxDataViewCtrl::SetSelectionRange( unsigned int from, unsigned int to )
+{
+}
+
+void wxDataViewCtrl::SetSelections( const wxArrayInt& aSelections)
+{
+}
+
+bool wxDataViewCtrl::IsSelected( unsigned int row ) const
+{
+ return false;
+}
+
+int wxDataViewCtrl::GetSelection() const
+{
+ return -1;
+}
+
+int wxDataViewCtrl::GetSelections(wxArrayInt& aSelections) const
+{
+ return 0;
+}
+
+
#endif
// !wxUSE_GENERICDATAVIEWCTRL
#endif
// !wxUSE_GENERICDATAVIEWCTRL