Add item<->row mapping helpers to wxDataViewListCtrl.
These are commonly needed when using wxDataViewListCtrl, yet they were only available in wxDataViewIndexListModel. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65121 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -950,6 +950,11 @@ public:
|
|||||||
const wxDataViewListStore *GetStore() const
|
const wxDataViewListStore *GetStore() const
|
||||||
{ return (const wxDataViewListStore*) GetModel(); }
|
{ return (const wxDataViewListStore*) GetModel(); }
|
||||||
|
|
||||||
|
int ItemToRow(const wxDataViewItem &item) const
|
||||||
|
{ return item.IsOk() ? GetStore()->GetRow(item) : wxNOT_FOUND; }
|
||||||
|
wxDataViewItem RowToItem(int row) const
|
||||||
|
{ return row == wxNOT_FOUND ? wxDataViewItem() : GetStore()->GetItem(row); }
|
||||||
|
|
||||||
bool AppendColumn( wxDataViewColumn *column, const wxString &varianttype );
|
bool AppendColumn( wxDataViewColumn *column, const wxString &varianttype );
|
||||||
bool PrependColumn( wxDataViewColumn *column, const wxString &varianttype );
|
bool PrependColumn( wxDataViewColumn *column, const wxString &varianttype );
|
||||||
bool InsertColumn( unsigned int pos, wxDataViewColumn *column, const wxString &varianttype );
|
bool InsertColumn( unsigned int pos, wxDataViewColumn *column, const wxString &varianttype );
|
||||||
|
@@ -1754,6 +1754,21 @@ public:
|
|||||||
const wxDataViewListStore *GetStore() const;
|
const wxDataViewListStore *GetStore() const;
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
|
/**
|
||||||
|
Returns the position of given @e item or wxNOT_FOUND if it's
|
||||||
|
not a valid item.
|
||||||
|
|
||||||
|
@since 2.9.2
|
||||||
|
*/
|
||||||
|
int ItemToRow(const wxDataViewItem &item) const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
Returns the wxDataViewItem at the given @e row.
|
||||||
|
|
||||||
|
@since 2.9.2
|
||||||
|
*/
|
||||||
|
wxDataViewItem RowToItem(int row) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@name Column management functions
|
@name Column management functions
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user