class WXDLLIMPEXP_ADV wxDataViewListStoreLine
{
public:
- wxDataViewListStoreLine( wxClientData *data = NULL )
+ wxDataViewListStoreLine( wxUIntPtr data = NULL )
{
m_data = data;
}
- virtual ~wxDataViewListStoreLine()
- {
- delete m_data;
- }
- void SetData( wxClientData *data )
- { if (m_data) delete m_data; m_data = data; }
- wxClientData *GetData() const
+ void SetData( wxUIntPtr data )
+ { m_data = data; }
+ wxUIntPtr GetData() const
{ return m_data; }
wxVector<wxVariant> m_values;
private:
- wxClientData *m_data;
+ wxUIntPtr m_data;
};
void InsertColumn( unsigned int pos, const wxString &varianttype );
void AppendColumn( const wxString &varianttype );
- void AppendItem( const wxVector<wxVariant> &values, wxClientData *data = NULL );
- void PrependItem( const wxVector<wxVariant> &values, wxClientData *data = NULL );
- void InsertItem( unsigned int row, const wxVector<wxVariant> &values, wxClientData *data = NULL );
+ void AppendItem( const wxVector<wxVariant> &values, wxUIntPtr data = NULL );
+ void PrependItem( const wxVector<wxVariant> &values, wxUIntPtr data = NULL );
+ void InsertItem( unsigned int row, const wxVector<wxVariant> &values, wxUIntPtr data = NULL );
void DeleteItem( unsigned int pos );
void DeleteAllItems();
+ unsigned int GetItemCount() const;
+
+ void SetItemData( const wxDataViewItem& item, wxUIntPtr data );
+ wxUIntPtr GetItemData( const wxDataViewItem& item ) const;
+
// override base virtuals
virtual unsigned int GetColumnCount() const;
wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
int width = -1, wxAlignment align = wxALIGN_LEFT, int flags = wxDATAVIEW_COL_RESIZABLE );
- void AppendItem( const wxVector<wxVariant> &values, wxClientData *data = NULL )
+ void AppendItem( const wxVector<wxVariant> &values, wxUIntPtr data = NULL )
{ GetStore()->AppendItem( values, data ); }
- void PrependItem( const wxVector<wxVariant> &values, wxClientData *data = NULL )
+ void PrependItem( const wxVector<wxVariant> &values, wxUIntPtr data = NULL )
{ GetStore()->PrependItem( values, data ); }
- void InsertItem( unsigned int row, const wxVector<wxVariant> &values, wxClientData *data = NULL )
+ void InsertItem( unsigned int row, const wxVector<wxVariant> &values, wxUIntPtr data = NULL )
{ GetStore()->InsertItem( row, values, data ); }
void DeleteItem( unsigned row )
{ GetStore()->DeleteItem( row ); }
bool GetToggleValue( unsigned int row, unsigned int col ) const
{ wxVariant value; GetStore()->GetValueByRow( value, row, col ); return value.GetBool(); }
+ void SetItemData( const wxDataViewItem& item, wxUIntPtr data )
+ { GetStore()->SetItemData( item, data ); }
+ wxUIntPtr GetItemData( const wxDataViewItem& item ) const
+ { return GetStore()->GetItemData( item ); }
+
+ int GetItemCount() const
+ { return GetStore()->GetItemCount(); }
+
void OnSize( wxSizeEvent &event );
private: