-bool wxDataViewCtrlBase::AssociateStore( wxDataViewStore *store )
-{
- m_store = store;
-
- return true;
-}
-
-wxDataViewStore* wxDataViewCtrlBase::GetStore()
-{
- return m_store;
-}
-
-IMPLEMENT_DYNAMIC_CLASS(wxDataViewCtrl,wxControl)
-
-// -------------------- GTK2 implementaion --------------------
-
-#ifdef __WXGTK20__
-
-// wxDataViewListStore
-
-wxDataViewListStore::wxDataViewListStore()
-{
- m_store = gtk_list_store_new( 3, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING );
-}
-
-bool wxDataViewListStore::AppendRow()
-{
- GtkTreeIter iter;
- gtk_list_store_append( m_store, &iter );
-
- return true;
-}
-
-
-// wxDataViewCtrl
-
-wxDataViewCtrl::~wxDataViewCtrl()
-{
-}
-
-void wxDataViewCtrl::Init()
-{
-}
-
-bool wxDataViewCtrl::Create(wxWindow *parent, wxWindowID id,
- const wxPoint& pos, const wxSize& size,
- long style, const wxValidator& validator )
-{
- Init();
-
- m_needParent = TRUE;
- m_acceptsFocus = TRUE;
-
- if (!PreCreation( parent, pos, size ) ||
- !CreateBase( parent, id, pos, size, style, validator ))
- {
- wxFAIL_MSG( wxT("wxDataViewCtrl creation failed") );
- return FALSE;
- }
-
- m_widget = gtk_tree_view_new();
-
- m_parent->DoAddChild( this );
-
- PostCreation(size);
-
- return true;
-}
-
-bool wxDataViewCtrl::AppendStringColumn( const wxString &label, int index )
-{
- GtkCellRenderer *renderer
- = gtk_cell_renderer_text_new();
-
- GtkTreeViewColumn *column
- = gtk_tree_view_column_new_with_attributes( wxGTK_CONV(label), renderer, "text", index, NULL );
-
- gtk_tree_view_append_column( GTK_TREE_VIEW(m_widget), column );
-
- return true;
-}
-
-bool wxDataViewCtrl::AssociateStore( wxDataViewStore *store )
-{
- wxDataViewCtrlBase::AssociateStore( store );
-
- // Right now we only have the GTK+ port's
- // list store variant, so cast to that...
-
- wxDataViewListStore *liststore = (wxDataViewListStore*) store;
-
- gtk_tree_view_set_model( GTK_TREE_VIEW(m_widget), GTK_TREE_MODEL(liststore->GetGtkListStore()) );
-
- return true;
-}
-
-#endif
-
-// -------------------- wxDataViewControl --------------------