X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d10f4bf950c4ad064b982fe8fe07d5ca5e3af7ba..447002a13109caa3cba1c9b51e591cdb1b77d269:/src/generic/gridctrl.cpp diff --git a/src/generic/gridctrl.cpp b/src/generic/gridctrl.cpp index 23fa38899a..a6f8f58b80 100644 --- a/src/generic/gridctrl.cpp +++ b/src/generic/gridctrl.cpp @@ -10,7 +10,7 @@ ///////////////////////////////////////////////////////////////////////////// #ifdef __GNUG__ - #pragma interface "gridctrl.h" + #pragma implementation "gridctrl.h" #endif #include "wx/wxprec.h" @@ -19,6 +19,11 @@ #pragma hdrstop #endif +#ifndef WX_PRECOMP + #include "wx/textctrl.h" + #include "wx/dc.h" +#endif // WX_PRECOMP + #include "wx/generic/gridctrl.h" #include "wx/tokenzr.h" @@ -110,7 +115,7 @@ wxSize wxGridCellDateTimeRenderer::GetBestSize(wxGrid& grid, } void wxGridCellDateTimeRenderer::SetParameters(const wxString& params){ - if(params) + if (!params.IsEmpty()) m_oformat=params; } @@ -123,7 +128,7 @@ void wxGridCellDateTimeRenderer::SetParameters(const wxString& params){ wxGridCellEnumRenderer::wxGridCellEnumRenderer(const wxString& choices) { - if(choices) + if (!choices.IsEmpty()) SetParameters(choices); } @@ -210,7 +215,7 @@ void wxGridCellEnumRenderer::SetParameters(const wxString& params) wxGridCellEnumEditor::wxGridCellEnumEditor(const wxString& choices) : wxGridCellChoiceEditor() { - if(choices) + if (!choices.IsEmpty()) SetParameters(choices); } @@ -260,7 +265,7 @@ bool wxGridCellEnumEditor::EndEdit(int row, int col, wxGrid* grid) if (grid->GetTable()->CanSetValueAs(row, col, wxGRID_VALUE_NUMBER)) grid->GetTable()->SetValueAsLong(row, col, pos); else - grid->GetTable()->SetValue(row, col,wxString::Format("%i",pos)); + grid->GetTable()->SetValue(row, col,wxString::Format(wxT("%i"),pos)); } return changed; @@ -358,7 +363,7 @@ wxGridCellAutoWrapStringRenderer::GetBestSize(wxGrid& grid, wxDC& dc, int row, int col) { - int x,y, height , width = grid.GetColSize(col) -10; + wxCoord x,y, height , width = grid.GetColSize(col) -10; int count = 250; //Limit iterations.. wxRect rect(0,0,width,10);