X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9939bfd98ba4e85bab7def962c74797d6f6fb527..ab797d5d346f10b3097d38431c96c090e20d687b:/samples/dataview/dataview.cpp diff --git a/samples/dataview/dataview.cpp b/samples/dataview/dataview.cpp index 252cca4655..b9d424622a 100644 --- a/samples/dataview/dataview.cpp +++ b/samples/dataview/dataview.cpp @@ -189,7 +189,7 @@ public: return true; } - virtual bool Activate( wxRect WXUNUSED(cell), + virtual bool Activate( const wxRect& WXUNUSED(cell), wxDataViewModel *WXUNUSED(model), const wxDataViewItem &WXUNUSED(item), unsigned int WXUNUSED(col) ) @@ -198,7 +198,8 @@ public: return false; } - virtual bool LeftClick( wxPoint cursor, wxRect WXUNUSED(cell), + virtual bool LeftClick(const wxPoint& cursor, + const wxRect& WXUNUSED(cell), wxDataViewModel *WXUNUSED(model), const wxDataViewItem &WXUNUSED(item), unsigned int WXUNUSED(col) ) @@ -242,7 +243,6 @@ bool MyApp::OnInit() MyFrame *frame = new MyFrame(NULL, "wxDataViewCtrl sample", 40, 40, 1000, 540); - SetTopWindow(frame); frame->Show(true); return true; @@ -653,6 +653,10 @@ void MyFrame::BuildDataViewCtrl(wxPanel* parent, unsigned int nPanel, unsigned l wxDefaultSize, style ); m_ctrl[2] = lc; + MyListStoreDerivedModel* page2_model = new MyListStoreDerivedModel(); + lc->AssociateModel(page2_model); + page2_model->DecRef(); + lc->AppendToggleColumn( "Toggle" ); lc->AppendTextColumn( "Text" ); lc->AppendProgressColumn( "Progress" );