+ wxDataViewListCtrl();
+ wxDataViewListCtrl( wxWindow *parent, wxWindowID id,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize, long style = wxDV_ROW_LINES,
+ const wxValidator& validator = wxDefaultValidator );
+ ~wxDataViewListCtrl();
+
+ bool Create( wxWindow *parent, wxWindowID id,
+ const wxPoint& pos = wxDefaultPosition,
+ const wxSize& size = wxDefaultSize, long style = wxDV_ROW_LINES,
+ const wxValidator& validator = wxDefaultValidator );
+
+ wxDataViewListStore *GetStore()
+ { return (wxDataViewListStore*) GetModel(); }
+ const wxDataViewListStore *GetStore() const
+ { return (const wxDataViewListStore*) GetModel(); }
+
+ int ItemToRow(const wxDataViewItem &item) const
+ { return item.IsOk() ? (int)GetStore()->GetRow(item) : wxNOT_FOUND; }
+ wxDataViewItem RowToItem(int row) const
+ { return row == wxNOT_FOUND ? wxDataViewItem() : GetStore()->GetItem(row); }
+
+ int GetSelectedRow() const
+ { return ItemToRow(GetSelection()); }
+ void SelectRow(unsigned row)
+ { Select(RowToItem(row)); }
+ void UnselectRow(unsigned row)
+ { Unselect(RowToItem(row)); }
+ bool IsRowSelected(unsigned row) const
+ { return IsSelected(RowToItem(row)); }
+
+ bool AppendColumn( wxDataViewColumn *column, const wxString &varianttype );
+ bool PrependColumn( wxDataViewColumn *column, const wxString &varianttype );
+ bool InsertColumn( unsigned int pos, wxDataViewColumn *column, const wxString &varianttype );
+
+ // overridden from base class
+ virtual bool PrependColumn( wxDataViewColumn *col );
+ virtual bool InsertColumn( unsigned int pos, wxDataViewColumn *col );
+ virtual bool AppendColumn( wxDataViewColumn *col );
+
+ wxDataViewColumn *AppendTextColumn( const wxString &label,
+ wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
+ int width = -1, wxAlignment align = wxALIGN_LEFT, int flags = wxDATAVIEW_COL_RESIZABLE );
+ wxDataViewColumn *AppendToggleColumn( const wxString &label,
+ wxDataViewCellMode mode = wxDATAVIEW_CELL_ACTIVATABLE,
+ int width = -1, wxAlignment align = wxALIGN_LEFT, int flags = wxDATAVIEW_COL_RESIZABLE );
+ wxDataViewColumn *AppendProgressColumn( const wxString &label,
+ wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT,
+ int width = -1, wxAlignment align = wxALIGN_LEFT, int flags = wxDATAVIEW_COL_RESIZABLE );
+ wxDataViewColumn *AppendIconTextColumn( const wxString &label,
+ 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 )
+ { GetStore()->AppendItem( values, data ); }
+ void PrependItem( const wxVector<wxVariant> &values, wxClientData *data = NULL )
+ { GetStore()->PrependItem( values, data ); }
+ void InsertItem( unsigned int row, const wxVector<wxVariant> &values, wxClientData *data = NULL )
+ { GetStore()->InsertItem( row, values, data ); }
+ void DeleteItem( unsigned row )
+ { GetStore()->DeleteItem( row ); }
+ void DeleteAllItems()
+ { GetStore()->DeleteAllItems(); }
+
+ void SetValue( const wxVariant &value, unsigned int row, unsigned int col )
+ { GetStore()->SetValueByRow( value, row, col );
+ GetStore()->RowValueChanged( row, col); }
+ void GetValue( wxVariant &value, unsigned int row, unsigned int col )
+ { GetStore()->GetValueByRow( value, row, col ); }
+
+ void SetTextValue( const wxString &value, unsigned int row, unsigned int col )
+ { GetStore()->SetValueByRow( value, row, col );
+ GetStore()->RowValueChanged( row, col); }
+ wxString GetTextValue( unsigned int row, unsigned int col ) const
+ { wxVariant value; GetStore()->GetValueByRow( value, row, col ); return value.GetString(); }
+
+ void SetToggleValue( bool value, unsigned int row, unsigned int col )
+ { GetStore()->SetValueByRow( value, row, col );
+ GetStore()->RowValueChanged( row, col); }
+ bool GetToggleValue( unsigned int row, unsigned int col ) const
+ { wxVariant value; GetStore()->GetValueByRow( value, row, col ); return value.GetBool(); }
+
+ void OnSize( wxSizeEvent &event );