#if defined(__WXGTK20__)
// for testing
- #define wxUSE_GENERICDATAVIEWCTRL 1
+ // #define wxUSE_GENERICDATAVIEWCTRL 1
#elif defined(__WXMAC__)
#else
#define wxUSE_GENERICDATAVIEWCTRL 1
int GetIndent() const
{ return m_indent; }
- //Selection Code
+ virtual wxDataViewItem GetSelection() = 0;
virtual int GetSelections( wxDataViewItemArray & sel ) const = 0;
virtual void SetSelections( const wxDataViewItemArray & sel ) = 0;
virtual void Select( const wxDataViewItem & item ) = 0;
virtual void Unselect( const wxDataViewItem & item ) = 0;
virtual bool IsSelected( const wxDataViewItem & item ) const = 0;
- virtual int GetSelections( wxArrayInt & sel ) const = 0;
- virtual void SetSelections( const wxArrayInt & sel ) = 0;
- virtual void Select( int row ) = 0;
- virtual void Unselect( int row ) = 0;
- virtual bool IsSelected( int row ) const = 0;
- virtual void SelectRange( int from, int to ) = 0;
- virtual void UnselectRange( int from, int to ) = 0;
-
virtual void SelectAll() = 0;
virtual void UnselectAll() = 0;
- virtual void EnsureVisible( int row ) = 0;
virtual void EnsureVisible( const wxDataViewItem & item ) = 0;
- virtual wxDataViewItem GetItemByRow( unsigned int row ) const = 0;
- virtual int GetRowByItem( const wxDataViewItem & item ) const = 0;
-
protected:
virtual void DoSetExpanderColumn() = 0 ;
virtual void DoSetIndent() = 0;
BEGIN_DECLARE_EVENT_TYPES()
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ITEM_SELECTED, -1)
+ DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ITEM_DESELECTED, -1)
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, -1)
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ITEM_COLLAPSED, -1)
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV, wxEVT_COMMAND_DATAVIEW_ITEM_EXPANDED, -1)
wx__DECLARE_EVT1(wxEVT_COMMAND_DATAVIEW_ ## evt, id, wxDataViewEventHandler(fn))
#define EVT_DATAVIEW_ITEM_SELECTED(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_SELECTED, id, fn)
+#define EVT_DATAVIEW_ITEM_DESELECTED(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_DESELECTED, id, fn)
#define EVT_DATAVIEW_ITEM_ACTIVATED(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_ACTIVATED, id, fn)
#define EVT_DATAVIEW_ITEM_COLLAPSED(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_COLLAPSED, id, fn)
#define EVT_DATAVIEW_ITEM_EXPANDED(id, fn) wx__DECLARE_DATAVIEWEVT(ITEM_EXPANDED, id, fn)
virtual bool AssociateModel( wxDataViewModel *model );
virtual bool AppendColumn( wxDataViewColumn *col );
- // selection code
virtual wxDataViewItem GetSelection();
-
+ virtual int GetSelections( wxDataViewItemArray & sel ) const;
+ virtual void SetSelections( const wxDataViewItemArray & sel );
+ virtual void Select( const wxDataViewItem & item );
+ virtual void Unselect( const wxDataViewItem & item );
+ virtual bool IsSelected( const wxDataViewItem & item ) const;
+ virtual void SelectAll();
+ virtual void UnselectAll();
+
+ virtual void EnsureVisible( const wxDataViewItem & item );
static wxVisualAttributes
GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL);