+ // Current item is the one used by the keyboard navigation, it is the same
+ // as the (unique) selected item in single selection mode so these
+ // functions are mostly useful for controls with wxDV_MULTIPLE style.
+ wxDataViewItem GetCurrentItem() const;
+ void SetCurrentItem(const wxDataViewItem& item);
+
+ // Currently focused column of the current item or NULL if no column has focus
+ virtual wxDataViewColumn *GetCurrentColumn() const = 0;
+
+ // Selection: both GetSelection() and GetSelections() can be used for the
+ // controls both with and without wxDV_MULTIPLE style. For single selection
+ // controls GetSelections() is not very useful however. And for multi
+ // selection controls GetSelection() returns an invalid item if more than
+ // one item is selected. Use GetSelectedItemsCount() or HasSelection() to
+ // check if any items are selected at all.
+ virtual int GetSelectedItemsCount() const = 0;
+ bool HasSelection() const { return GetSelectedItemsCount() != 0; }
+ wxDataViewItem GetSelection() const;