X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/606b005fb2b535b34d1ca45d2d06ee86718e8b1c..a308135449c51cbf067c128c9b61354ca7f899c9:/src/generic/grid.cpp?ds=sidebyside diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index c547765a84..70a8efaf32 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -30,9 +30,11 @@ #pragma hdrstop #endif +#if wxUSE_GRID + #if !defined(wxUSE_NEW_GRID) || !(wxUSE_NEW_GRID) -#include "gridg.cpp" -#else + #include "gridg.cpp" +#else // wxUSE_NEW_GRID #ifndef WX_PRECOMP #include "wx/utils.h" @@ -518,6 +520,8 @@ void wxGridCellEditor::StartingClick() { } +#if wxUSE_TEXTCTRL + // ---------------------------------------------------------------------------- // wxGridCellTextEditor // ---------------------------------------------------------------------------- @@ -1144,6 +1148,10 @@ bool wxGridCellFloatEditor::IsAcceptedKey(wxKeyEvent& event) return FALSE; } +#endif // wxUSE_TEXTCTRL + +#if wxUSE_CHECKBOX + // ---------------------------------------------------------------------------- // wxGridCellBoolEditor // ---------------------------------------------------------------------------- @@ -1288,6 +1296,10 @@ bool wxGridCellBoolEditor::IsAcceptedKey(wxKeyEvent& event) return FALSE; } +#endif // wxUSE_CHECKBOX + +#if wxUSE_COMBOBOX + // ---------------------------------------------------------------------------- // wxGridCellChoiceEditor // ---------------------------------------------------------------------------- @@ -1408,6 +1420,8 @@ void wxGridCellChoiceEditor::SetParameters(const wxString& params) } } +#endif // wxUSE_COMBOBOX + // ---------------------------------------------------------------------------- // wxGridCellEditorEvtHandler // ---------------------------------------------------------------------------- @@ -2456,19 +2470,24 @@ int wxGridTypeRegistry::FindDataType(const wxString& typeName) { // check whether this is one of the standard ones, in which case // register it "on the fly" +#if wxUSE_TEXTCTRL if ( typeName == wxGRID_VALUE_STRING ) { RegisterDataType(wxGRID_VALUE_STRING, new wxGridCellStringRenderer, new wxGridCellTextEditor); - } - else if ( typeName == wxGRID_VALUE_BOOL ) + } else +#endif // wxUSE_TEXTCTRL +#if wxUSE_CHECKBOX + if ( typeName == wxGRID_VALUE_BOOL ) { RegisterDataType(wxGRID_VALUE_BOOL, new wxGridCellBoolRenderer, new wxGridCellBoolEditor); - } - else if ( typeName == wxGRID_VALUE_NUMBER ) + } else +#endif // wxUSE_CHECKBOX +#if wxUSE_TEXTCTRL + if ( typeName == wxGRID_VALUE_NUMBER ) { RegisterDataType(wxGRID_VALUE_NUMBER, new wxGridCellNumberRenderer, @@ -2479,14 +2498,16 @@ int wxGridTypeRegistry::FindDataType(const wxString& typeName) RegisterDataType(wxGRID_VALUE_FLOAT, new wxGridCellFloatRenderer, new wxGridCellFloatEditor); - } - else if ( typeName == wxGRID_VALUE_CHOICE ) + } else +#endif // wxUSE_TEXTCTRL +#if wxUSE_COMBOBOX + if ( typeName == wxGRID_VALUE_CHOICE ) { RegisterDataType(wxGRID_VALUE_CHOICE, new wxGridCellStringRenderer, new wxGridCellChoiceEditor); - } - else + } else +#endif // wxUSE_COMBOBOX { return wxNOT_FOUND; } @@ -3003,7 +3024,7 @@ bool wxGridStringTable::DeleteRows( size_t pos, size_t numRows ) { for ( n = 0; n < numRows; n++ ) { - m_data.Remove( pos ); + m_data.RemoveAt( pos ); } } if ( GetView() ) @@ -8755,4 +8776,7 @@ wxGridEditorCreatedEvent::wxGridEditorCreatedEvent(int id, wxEventType type, } -#endif // ifndef wxUSE_NEW_GRID +#endif // !wxUSE_NEW_GRID/wxUSE_NEW_GRID + +#endif // wxUSE_GRID +