X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b6a158b04e7784dc30ad8fc043eb94ae71c19e4f..e980740ac55c4718617e84c17b74ec34b96a0c24:/samples/grid/test.cpp diff --git a/samples/grid/test.cpp b/samples/grid/test.cpp index 2d088c5415..7662b5b09c 100644 --- a/samples/grid/test.cpp +++ b/samples/grid/test.cpp @@ -40,8 +40,6 @@ class MyFrame: public wxFrame wxGrid *grid; MyFrame(wxFrame *frame, const wxString& title, const wxPoint& pos, const wxSize& size); - bool OnClose(void) { return TRUE; } - void ToggleEditable(wxCommandEvent& event); void ToggleRowLabel(wxCommandEvent& event); void ToggleColLabel(wxCommandEvent& event); @@ -62,8 +60,8 @@ class MyFrame: public wxFrame DECLARE_EVENT_TABLE() }; -wxBitmap *cellBitmap1 = NULL; -wxBitmap *cellBitmap2 = NULL; +wxBitmap *cellBitmap1 = (wxBitmap *) NULL; +wxBitmap *cellBitmap2 = (wxBitmap *) NULL; // ID for the menu quit command #define GRID_QUIT 1 @@ -94,7 +92,7 @@ bool MyApp::OnInit(void) #endif // Create the main frame window - MyFrame *frame = new MyFrame(NULL, "wxGrid Sample", wxPoint(50, 50), wxSize(450, 300)); + MyFrame *frame = new MyFrame((wxFrame *) NULL, (char *) "wxGrid Sample", wxPoint(50, 50), wxSize(450, 300)); // Give it an icon #ifdef __WXMSW__ @@ -137,7 +135,7 @@ bool MyApp::OnInit(void) frame->grid->SetCellValue("First cell", 0, 0); frame->grid->SetCellValue("Another cell", 1, 1); frame->grid->SetCellValue("Yet another cell", 2, 2); - frame->grid->SetCellTextFont(wxTheFontList->FindOrCreateFont(10, wxROMAN, wxITALIC, wxNORMAL), 0, 0); + frame->grid->SetCellTextFont(* wxTheFontList->FindOrCreateFont(10, wxROMAN, wxITALIC, wxNORMAL), 0, 0); frame->grid->SetCellTextColour(*wxRED, 1, 1); frame->grid->SetCellBackgroundColour(*wxCYAN, 2, 2); if (cellBitmap1 && cellBitmap2) @@ -161,7 +159,7 @@ bool MyApp::OnInit(void) MyFrame::MyFrame(wxFrame *frame, const wxString& title, const wxPoint& pos, const wxSize& size): wxFrame(frame, -1, title, pos, size) { - grid = NULL; + grid = (wxGenericGrid *) NULL; } BEGIN_EVENT_TABLE(MyFrame, wxFrame) @@ -207,10 +205,10 @@ void MyFrame::ToggleColLabel(wxCommandEvent& WXUNUSED(event)) void MyFrame::ToggleDividers(wxCommandEvent& WXUNUSED(event)) { - if (!grid->GetDividerPen()) - grid->SetDividerPen(wxThePenList->FindOrCreatePen("LIGHT GREY", 1, wxSOLID)); + if (!grid->GetDividerPen().Ok()) + grid->SetDividerPen(* wxThePenList->FindOrCreatePen("LIGHT GREY", 1, wxSOLID)); else - grid->SetDividerPen(NULL); + grid->SetDividerPen(wxNullPen); grid->Refresh(); }