X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c78b3acd0cedd9be601e396302246fb63e7d2a59..02c6eadbc854eb841b75a57ec28f916abe381d03:/src/generic/grid.cpp?ds=inline diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index 49561b6498..2a8075f226 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -52,10 +52,10 @@ #include "wx/grid.h" #include "wx/generic/gridsel.h" -#if defined(__WXGTK__) || defined(__WXMOTIF__) - #define WXUNUSED_GTK_AND_MOTIF(identifier) WXUNUSED(identifier) +#if defined(__WXMOTIF__) + #define WXUNUSED_MOTIF(identifier) WXUNUSED(identifier) #else - #define WXUNUSED_GTK_AND_MOTIF(identifier) identifier + #define WXUNUSED_MOTIF(identifier) identifier #endif #if defined(__WXGTK__) @@ -620,11 +620,11 @@ void wxGridCellTextEditor::StartingKey(wxKeyEvent& event) } void wxGridCellTextEditor::HandleReturn( wxKeyEvent& - WXUNUSED_GTK_AND_MOTIF(event) ) + WXUNUSED_GTK(WXUNUSED_MOTIF(event)) ) { #if defined(__WXMOTIF__) || defined(__WXGTK__) // wxMotif needs a little extra help... - long pos = Text()->GetInsertionPoint(); + size_t pos = (size_t)( Text()->GetInsertionPoint() ); wxString s( Text()->GetValue() ); s = s.Left(pos) + "\n" + s.Mid(pos); Text()->SetValue(s); @@ -7606,6 +7606,12 @@ void wxGrid::Fit() AutoSize(); } + +wxPen& wxGrid::GetDividerPen() const +{ + return wxNullPen; +} + // ---------------------------------------------------------------------------- // cell value accessor functions // ---------------------------------------------------------------------------- @@ -7659,7 +7665,17 @@ void wxGrid::SelectBlock( int topRow, int leftCol, int bottomRow, int rightCol ) { int temp; wxGridCellCoords updateTopLeft, updateBottomRight; - + + if ( m_selection->GetSelectionMode() == wxGrid::wxGridSelectRows ) + { + leftCol = 0; + rightCol = GetNumberCols() - 1; + } + else if ( m_selection->GetSelectionMode() == wxGrid::wxGridSelectColumns ) + { + topRow = 0; + bottomRow = GetNumberRows() - 1; + } if ( topRow > bottomRow ) { temp = topRow;