private:
wxGrid *m_owner;
- void OnPaint( wxPaintEvent &event );
+ void OnPaint( wxPaintEvent& event );
void OnMouseEvent( wxMouseEvent& event );
void OnMouseWheel( wxMouseEvent& event );
void OnKeyDown( wxKeyEvent& event );
END_EVENT_TABLE()
-
// ----------------------------------------------------------------------------
// the internal data representation used by wxGridCellAttrProvider
// ----------------------------------------------------------------------------
wxGridDataTypeInfoArray m_typeinfo;
};
+
// ----------------------------------------------------------------------------
// conditional compilation
// ----------------------------------------------------------------------------
{
if (m_control)
{
- m_control->PopEventHandler(true /* delete it*/);
+ m_control->PopEventHandler( true /* delete it*/ );
m_control->Destroy();
m_control = NULL;
m_fontOld = m_control->GetFont();
m_control->SetFont(attr->GetFont());
#endif
+
// can't do anything more in the base class version, the other
// attributes may only be used by the derived classes
}
void wxGridCellTextEditor::PaintBackground(const wxRect& WXUNUSED(rectCell),
wxGridCellAttr * WXUNUSED(attr))
{
- // as we fill the entire client area, don't do anything here to minimize
- // flicker
+ // as we fill the entire client area,
+ // don't do anything here to minimize flicker
}
void wxGridCellTextEditor::SetSize(const wxRect& rectOrig)
grid->GetTable()->SetValue(row, col, value);
m_startValue = wxEmptyString;
+
// No point in setting the text of the hidden control
//Text()->SetValue(m_startValue);
long tmp;
if ( !params.ToLong(&tmp) )
{
- wxLogDebug(_T("Invalid wxGridCellTextEditor parameter string '%s' ignored"), params.c_str());
+ wxLogDebug( _T("Invalid wxGridCellTextEditor parameter string '%s' ignored"), params.c_str() );
}
else
{
BEGIN_EVENT_TABLE( wxGridRowLabelWindow, wxWindow )
EVT_PAINT( wxGridRowLabelWindow::OnPaint )
- EVT_MOUSEWHEEL( wxGridRowLabelWindow::OnMouseWheel)
+ EVT_MOUSEWHEEL( wxGridRowLabelWindow::OnMouseWheel )
EVT_MOUSE_EVENTS( wxGridRowLabelWindow::OnMouseEvent )
EVT_KEY_DOWN( wxGridRowLabelWindow::OnKeyDown )
EVT_KEY_UP( wxGridRowLabelWindow::OnKeyUp )
- EVT_CHAR ( wxGridRowLabelWindow::OnChar )
+ EVT_CHAR( wxGridRowLabelWindow::OnChar )
END_EVENT_TABLE()
wxGridRowLabelWindow::wxGridRowLabelWindow( wxGrid *parent,
wxWindowID id,
const wxPoint &pos, const wxSize &size )
- : wxWindow( parent, id, pos, size, wxWANTS_CHARS|wxBORDER_NONE|wxFULL_REPAINT_ON_RESIZE )
+ : wxWindow( parent, id, pos, size, wxWANTS_CHARS | wxBORDER_NONE | wxFULL_REPAINT_ON_RESIZE )
{
m_owner = parent;
}
dc.SetDeviceOrigin( 0, -y );
wxArrayInt rows = m_owner->CalcRowLabelsExposed( GetUpdateRegion() );
- m_owner->DrawRowLabels( dc , rows );
+ m_owner->DrawRowLabels( dc, rows );
}
void wxGridRowLabelWindow::OnMouseEvent( wxMouseEvent& event )
void wxGridRowLabelWindow::OnMouseWheel( wxMouseEvent& event )
{
- m_owner->GetEventHandler()->ProcessEvent(event);
+ m_owner->GetEventHandler()->ProcessEvent( event );
}
// This seems to be required for wxMotif otherwise the mouse
BEGIN_EVENT_TABLE( wxGridColLabelWindow, wxWindow )
EVT_PAINT( wxGridColLabelWindow::OnPaint )
- EVT_MOUSEWHEEL( wxGridColLabelWindow::OnMouseWheel)
+ EVT_MOUSEWHEEL( wxGridColLabelWindow::OnMouseWheel )
EVT_MOUSE_EVENTS( wxGridColLabelWindow::OnMouseEvent )
EVT_KEY_DOWN( wxGridColLabelWindow::OnKeyDown )
EVT_KEY_UP( wxGridColLabelWindow::OnKeyUp )
- EVT_CHAR ( wxGridColLabelWindow::OnChar )
+ EVT_CHAR( wxGridColLabelWindow::OnChar )
END_EVENT_TABLE()
wxGridColLabelWindow::wxGridColLabelWindow( wxGrid *parent,
wxWindowID id,
const wxPoint &pos, const wxSize &size )
- : wxWindow( parent, id, pos, size, wxWANTS_CHARS|wxBORDER_NONE|wxFULL_REPAINT_ON_RESIZE )
+ : wxWindow( parent, id, pos, size, wxWANTS_CHARS | wxBORDER_NONE | wxFULL_REPAINT_ON_RESIZE )
{
m_owner = parent;
}
dc.SetDeviceOrigin( -x, 0 );
wxArrayInt cols = m_owner->CalcColLabelsExposed( GetUpdateRegion() );
- m_owner->DrawColLabels( dc , cols );
+ m_owner->DrawColLabels( dc, cols );
}
void wxGridColLabelWindow::OnMouseEvent( wxMouseEvent& event )
void wxGridColLabelWindow::OnMouseWheel( wxMouseEvent& event )
{
- m_owner->GetEventHandler()->ProcessEvent(event);
+ m_owner->GetEventHandler()->ProcessEvent( event );
}
// This seems to be required for wxMotif otherwise the mouse
IMPLEMENT_DYNAMIC_CLASS( wxGridCornerLabelWindow, wxWindow )
BEGIN_EVENT_TABLE( wxGridCornerLabelWindow, wxWindow )
- EVT_MOUSEWHEEL( wxGridCornerLabelWindow::OnMouseWheel)
+ EVT_MOUSEWHEEL( wxGridCornerLabelWindow::OnMouseWheel )
EVT_MOUSE_EVENTS( wxGridCornerLabelWindow::OnMouseEvent )
- EVT_PAINT( wxGridCornerLabelWindow::OnPaint)
+ EVT_PAINT( wxGridCornerLabelWindow::OnPaint )
EVT_KEY_DOWN( wxGridCornerLabelWindow::OnKeyDown )
EVT_KEY_UP( wxGridCornerLabelWindow::OnKeyUp )
- EVT_CHAR ( wxGridCornerLabelWindow::OnChar )
+ EVT_CHAR( wxGridCornerLabelWindow::OnChar )
END_EVENT_TABLE()
wxGridCornerLabelWindow::wxGridCornerLabelWindow( wxGrid *parent,
BEGIN_EVENT_TABLE( wxGridWindow, wxWindow )
EVT_PAINT( wxGridWindow::OnPaint )
- EVT_MOUSEWHEEL( wxGridWindow::OnMouseWheel)
+ EVT_MOUSEWHEEL( wxGridWindow::OnMouseWheel )
EVT_MOUSE_EVENTS( wxGridWindow::OnMouseEvent )
EVT_KEY_DOWN( wxGridWindow::OnKeyDown )
EVT_KEY_UP( wxGridWindow::OnKeyUp )
- EVT_CHAR ( wxGridWindow::OnChar )
+ EVT_CHAR( wxGridWindow::OnChar )
EVT_SET_FOCUS( wxGridWindow::OnFocus )
EVT_KILL_FOCUS( wxGridWindow::OnFocus )
EVT_ERASE_BACKGROUND( wxGridWindow::OnEraseBackground )
void wxGridWindow::OnMouseWheel( wxMouseEvent& event )
{
- m_owner->GetEventHandler()->ProcessEvent(event);
+ m_owner->GetEventHandler()->ProcessEvent( event );
}
// This seems to be required for wxMotif/wxGTK otherwise the mouse
{
if ( m_selectingKeyboard == wxGridNoCellCoords)
m_selectingKeyboard = coords;
- HighlightBlock ( m_selectingKeyboard, coords );
+ HighlightBlock( m_selectingKeyboard, coords );
}
else if ( CanDragCell() )
{
dc.SetLogicalFunction(wxINVERT);
if ( m_dragLastPos >= 0 )
{
- dc.DrawLine( m_dragLastPos, top, m_dragLastPos, top+ch );
+ dc.DrawLine( m_dragLastPos, top, m_dragLastPos, top + ch );
}
- dc.DrawLine( x, top, x, top+ch );
+ dc.DrawLine( x, top, x, top + ch );
m_dragLastPos = x;
}
}
}
-
// ------------ Left double click
//
else if ( event.LeftDClick() && coords != wxGridNoCellCoords )
}
}
-
// ------------ Left button released
//
else if ( event.LeftUp() )
wxClientDC dc( m_gridWin );
PrepareDC( dc );
dc.SetLogicalFunction( wxINVERT );
- dc.DrawLine( left, m_dragLastPos, left+cw, m_dragLastPos );
+ dc.DrawLine( left, m_dragLastPos, left + cw, m_dragLastPos );
HideCellEditControl();
SaveEditControlValue();
{
int i, cell_rows, cell_cols, subtract_rows = 0;
int leftCol = XToCol(left);
- int rightCol = internalXToCol(left+cw);
+ int rightCol = internalXToCol(left + cw);
if (leftCol >= 0)
{
for (i=leftCol; i<rightCol; i++)
wxClientDC dc( m_gridWin );
PrepareDC( dc );
dc.SetLogicalFunction( wxINVERT );
- dc.DrawLine( m_dragLastPos, top, m_dragLastPos, top+ch );
+ dc.DrawLine( m_dragLastPos, top, m_dragLastPos, top + ch );
HideCellEditControl();
SaveEditControlValue();
{
int i, cell_rows, cell_cols, subtract_cols = 0;
int topRow = YToRow(top);
- int bottomRow = internalYToRow(top+cw);
+ int bottomRow = internalYToRow(top + cw);
if (topRow >= 0)
{
for (i=topRow; i<bottomRow; i++)
if (cell_cols < subtract_cols)
subtract_cols = cell_cols;
}
+
rect.x = GetColLeft(m_dragRowOrCol + subtract_cols);
CalcScrolledPosition(rect.x, 0, &rect.x, &dummy);
rect.width = cw - rect.x;
DisableCellEditControl();
m_table->Clear();
- if ( !GetBatchCount() ) m_gridWin->Refresh();
+ if ( !GetBatchCount()
+ m_gridWin->Refresh();
}
}
// the table will have sent the results of the insert row
// operation to this view object as a grid table message
}
+
return false;
}
{
bool done = m_table && m_table->AppendRows( numRows );
return done;
+
// the table will have sent the results of the append row
// operation to this view object as a grid table message
}
+
return false;
}
// the table will have sent the results of the delete row
// operation to this view object as a grid table message
}
+
return false;
}
int wxGrid::SendEvent( const wxEventType type,
int row, int col )
{
- bool claimed;
- bool vetoed;
+ bool claimed, vetoed;
if ( type == wxEVT_GRID_ROW_SIZE || type == wxEVT_GRID_COL_SIZE )
{
int rowOrCol = (row == -1 ? col : row);
- wxGridSizeEvent gridEvt( GetId(),
- type,
- this,
- rowOrCol );
+ wxGridSizeEvent gridEvt( GetId(), type, this, rowOrCol );
claimed = GetEventHandler()->ProcessEvent(gridEvt);
vetoed = !gridEvt.IsAllowed();
}
else
{
- wxGridEvent gridEvt( GetId(),
- type,
- this,
- row, col );
+ wxGridEvent gridEvt( GetId(), type, this, row, col );
claimed = GetEventHandler()->ProcessEvent(gridEvt);
vetoed = !gridEvt.IsAllowed();
width_label = rectWidth;
height_label = m_colLabelHeight - rect_y;
- if (height_label > rectHeight) height_label = rectHeight;
+ if (height_label > rectHeight)
+ height_label = rectHeight;
if (rect_x > m_rowLabelWidth)
{
m_inOnKeyDown = true;
// propagate the event up and see if it gets processed
- //
wxWindow *parent = GetParent();
wxKeyEvent keyEvt( event );
keyEvt.SetEventObject( parent );
if ( !parent->GetEventHandler()->ProcessEvent( keyEvt ) )
{
// try local handlers
- //
switch ( event.GetKeyCode() )
{
case WXK_UP:
case WXK_END:
if ( event.ControlDown() )
{
- MakeCellVisible( m_numRows-1, m_numCols - 1 );
- SetCurrentCell( m_numRows-1, m_numCols - 1 );
+ MakeCellVisible( m_numRows - 1, m_numCols - 1 );
+ SetCurrentCell( m_numRows - 1, m_numCols - 1 );
}
else
{
{
if ( m_selection )
{
- m_selection->ToggleCellSelection( m_currentCellCoords.GetRow(),
- m_currentCellCoords.GetCol(),
- event.ControlDown(),
- event.ShiftDown(),
- event.AltDown(),
- event.MetaDown() );
+ m_selection->ToggleCellSelection(
+ m_currentCellCoords.GetRow(),
+ m_currentCellCoords.GetCol(),
+ event.ControlDown(),
+ event.ShiftDown(),
+ event.AltDown(),
+ event.MetaDown() );
}
break;
}
{
if ( m_selection )
{
- m_selection->SelectBlock( m_selectingTopLeft.GetRow(),
- m_selectingTopLeft.GetCol(),
- m_selectingBottomRight.GetRow(),
- m_selectingBottomRight.GetCol(),
- event.ControlDown(),
- true,
- event.AltDown(),
- event.MetaDown() );
+ m_selection->SelectBlock(
+ m_selectingTopLeft.GetRow(),
+ m_selectingTopLeft.GetCol(),
+ m_selectingBottomRight.GetRow(),
+ m_selectingBottomRight.GetCol(),
+ event.ControlDown(),
+ true,
+ event.AltDown(),
+ event.MetaDown() );
}
}
int i;
// Store intermediate values
- wxCoord oldLeft = m_selectingTopLeft.GetCol();
- wxCoord oldTop = m_selectingTopLeft.GetRow();
- wxCoord oldRight = m_selectingBottomRight.GetCol();
+ wxCoord oldLeft = m_selectingTopLeft.GetCol();
+ wxCoord oldTop = m_selectingTopLeft.GetRow();
+ wxCoord oldRight = m_selectingBottomRight.GetCol();
wxCoord oldBottom = m_selectingBottomRight.GetRow();
// Determine the outer/inner coordinates.
// Refresh the newly selected or deselected
// area to the left of the old or new selection.
need_refresh[0] = true;
- rect[0] = BlockToDeviceRect( wxGridCellCoords ( oldTop,
- oldLeft ),
- wxGridCellCoords ( oldBottom,
- leftCol - 1 ) );
+ rect[0] = BlockToDeviceRect(
+ wxGridCellCoords( oldTop, oldLeft ),
+ wxGridCellCoords( oldBottom, leftCol - 1 ) );
}
if ( oldTop < topRow )
// area to the right of the old or new selection.
need_refresh[2] = true;
rect[2] = BlockToDeviceRect(
- wxGridCellCoords ( oldTop, rightCol + 1 ),
- wxGridCellCoords ( oldBottom, oldRight ) );
+ wxGridCellCoords( oldTop, rightCol + 1 ),
+ wxGridCellCoords( oldBottom, oldRight ) );
}
if ( oldBottom > bottomRow )
// area below the old or new selection.
need_refresh[3] = true;
rect[3] = BlockToDeviceRect(
- wxGridCellCoords ( bottomRow + 1, leftCol ),
- wxGridCellCoords ( oldBottom, rightCol ) );
+ wxGridCellCoords( bottomRow + 1, leftCol ),
+ wxGridCellCoords( oldBottom, rightCol ) );
}
// various Refresh() calls
int row, col, cell_rows, cell_cols;
wxGridCellCoordsArray redrawCells;
- for ( i = numCells-1; i >= 0; i-- )
+ for ( i = numCells - 1; i >= 0; i-- )
{
row = cells[i].GetRow();
col = cells[i].GetCol();
// If this cell is part of a multicell block, find owner for repaint
if ( cell_rows <= 0 || cell_cols <= 0 )
{
- wxGridCellCoords cell(row+cell_rows, col+cell_cols);
+ wxGridCellCoords cell( row + cell_rows, col + cell_cols );
bool marked = false;
- for ( int j = 0; j < numCells; j++ )
+ for ( int j = 0; j < numCells; j++ )
{
if ( cell == cells[j] )
{
if ( right > rightCol )
{
- dc.DrawRectangle( rightCol, top, right - rightCol, ch);
+ dc.DrawRectangle( rightCol, top, right - rightCol, ch );
}
if ( bottom > bottomRow )
{
- dc.DrawRectangle( left, bottomRow, cw, bottom - bottomRow);
+ dc.DrawRectangle( left, bottomRow, cw, bottom - bottomRow );
}
}
}
// Note: However, only if it is really _shown_, i.e. not hidden!
if ( isCurrent && IsCellEditControlShown() )
{
- // OSAF NB: this "#if..." is temporary and fixes a problem where the
+ // NB: this "#if..." is temporary and fixes a problem where the
// edit control is erased by this code after being rendered.
// On wxMac (QD build only), the cell editor is a wxTextCntl and is rendered
// implicitly, causing this out-of order render.
}
else
{
- // but all the rest is drawn by the cell renderer and hence may be
- // customized
+ // but all the rest is drawn by the cell renderer and hence may be customized
wxGridCellRenderer *renderer = attr->GetRenderer(this, row, col);
renderer->Draw(*this, *attr, dc, rect, row, col, IsInSelection(coords));
renderer->DecRef();
if (penWidth > 0)
{
// The center of th drawn line is where the position/width/height of
- // the rectangle is actually at, (on wxMSW atr least,) so we will
+ // the rectangle is actually at, (on wxMSW at least,) so we will
// reduce the size of the rectangle to compensate for the thickness of
- // the line. If this is too strange on non wxMSW platforms then
+ // the line. If this is too strange on non wxMSW platforms then
// please #ifdef this appropriately.
rect.x += penWidth / 2;
rect.y += penWidth / 2;
dc.SetPen(*wxBLACK_PEN);
dc.DrawLine(x1, y2, x2, y2);
dc.DrawLine(x2, y1, x2, y2 + 1);
-#endif // 0
+#endif
}
void wxGrid::DrawCellBorder( wxDC& dc, const wxGridCellCoords& coords )
wxRect rect = CellToRect( row, col );
// right hand border
- //
dc.DrawLine( rect.x + rect.width, rect.y,
rect.x + rect.width, rect.y + rect.height + 1 );
// bottom border
- //
dc.DrawLine( rect.x, rect.y + rect.height,
rect.x + rect.width, rect.y + rect.height);
}
bottom = wxMin( bottom, GetRowBottom(m_numRows - 1) );
// no gridlines inside multicells, clip them out
- int leftCol = internalXToCol(left);
- int topRow = internalYToRow(top);
- int rightCol = internalXToCol(right);
+ int leftCol = internalXToCol(left);
+ int topRow = internalYToRow(top);
+ int rightCol = internalXToCol(right);
int bottomRow = internalYToRow(bottom);
#ifndef __WXMAC__
}
else if ((cell_rows < 0) || (cell_cols < 0))
{
- rect = CellToRect(j+cell_rows, i+cell_cols);
+ rect = CellToRect(j + cell_rows, i + cell_cols);
CalcScrolledPosition( rect.x, rect.y, &rect.x, &rect.y );
clippedcells.Subtract(rect);
}
}
}
#endif
+
dc.SetClippingRegion( clippedcells );
dc.SetPen( wxPen(GetGridLineColour(), 1, wxSOLID) );
dc.DrawLine( colRight, top, colRight, bottom );
}
}
+
dc.DestroyClippingRegion();
}
int rowTop = GetRowTop(row),
rowBottom = GetRowBottom(row) - 1;
- dc.SetPen( wxPen(wxSystemSettings::GetColour(wxSYS_COLOUR_3DDKSHADOW),1, wxSOLID) );
- dc.DrawLine( m_rowLabelWidth-1, rowTop,
- m_rowLabelWidth-1, rowBottom );
-
+ dc.SetPen( wxPen(wxSystemSettings::GetColour(wxSYS_COLOUR_3DDKSHADOW), 1, wxSOLID) );
+ dc.DrawLine( m_rowLabelWidth - 1, rowTop, m_rowLabelWidth - 1, rowBottom );
dc.DrawLine( 0, rowTop, 0, rowBottom );
-
dc.DrawLine( 0, rowBottom, m_rowLabelWidth, rowBottom );
dc.SetPen( *wxWHITE_PEN );
dc.DrawLine( 1, rowTop, 1, rowBottom );
- dc.DrawLine( 1, rowTop, m_rowLabelWidth-1, rowTop );
+ dc.DrawLine( 1, rowTop, m_rowLabelWidth - 1, rowTop );
#endif
dc.SetBackgroundMode( wxTRANSPARENT );
dc.SetPen( wxPen(wxSystemSettings::GetColour(wxSYS_COLOUR_3DDKSHADOW), 1, wxSOLID) );
dc.DrawLine( colRight, 0, colRight, m_colLabelHeight - 1 );
-
dc.DrawLine( colLeft, 0, colRight, 0 );
-
dc.DrawLine( colLeft, m_colLabelHeight - 1,
colRight + 1, m_colLabelHeight - 1 );
StringToLines( value, lines );
// Forward to new API.
- DrawTextRectangle( dc,
+ DrawTextRectangle( dc,
lines,
rect,
horizAlign,
float x = 0.0, y = 0.0;
if ( textOrientation == wxHORIZONTAL )
- GetTextBoxSize(dc, lines, &textWidth, &textHeight);
+ GetTextBoxSize( dc, lines, &textWidth, &textHeight );
else
GetTextBoxSize( dc, lines, &textHeight, &textWidth );
case wxALIGN_CENTRE:
if ( textOrientation == wxHORIZONTAL )
- y = rect.y + ((rect.height - textHeight)/2);
+ y = rect.y + ((rect.height - textHeight) / 2);
else
- x = rect.x + ((rect.width - textWidth)/2);
+ x = rect.x + ((rect.width - textWidth) / 2);
break;
case wxALIGN_TOP:
{
lines.Add( value.Mid(startPos, pos) );
}
+
startPos += pos + 1;
}
return;
// this should be checked by the caller!
- wxASSERT_MSG( CanEnableCellControl(),
- _T("can't enable editing for this cell!") );
+ wxASSERT_MSG( CanEnableCellControl(), _T("can't enable editing for this cell!") );
// do it before ShowCellEditControl()
m_cellEditCtrlEnabled = enable;
else
{
//FIXME:add veto support
- SendEvent( wxEVT_GRID_EDITOR_HIDDEN);
+ SendEvent( wxEVT_GRID_EDITOR_HIDDEN );
HideCellEditControl();
SaveEditControlValue();
{
return m_editable && (m_currentCellCoords != wxGridNoCellCoords) &&
!IsCurrentCellReadOnly();
-
}
bool wxGrid::IsCellEditControlEnabled() const
}
// convert to scrolled coords
- //
CalcScrolledPosition( rect.x, rect.y, &rect.x, &rect.y );
int nXMove = 0;
if (rect.x < 0)
nXMove = rect.x;
- // done in PaintBackground()
+ // performed in PaintBackground()
#if 0
// erase the highlight and the cell contents because the editor
// might not cover the entire cell
dc.SetBrush(*wxLIGHT_GREY_BRUSH); //wxBrush(attr->GetBackgroundColour(), wxSOLID));
dc.SetPen(*wxTRANSPARENT_PEN);
dc.DrawRectangle(rect);
-#endif // 0
+#endif
// cell is shifted by one pixel
// However, don't allow x or y to become negative
int row = YToRow(y);
int col = XToCol(x);
- if ( row == -1 || col == -1 )
+ if ( row == -1 || col == -1 )
{
coords = wxGridNoCellCoords;
}
if ( GetColWidth(i) > WXGRID_LABEL_EDGE_ZONE )
{
- // We know that we are in column i, test whether we are
+ // We know that we are in column i; test whether we are
// close enough to right or left border, respectively.
if ( abs(GetColRight(i) - x) < WXGRID_LABEL_EDGE_ZONE )
return i;
if ( wholeCellVisible )
{
// is the cell wholly visible ?
- //
return ( left >= 0 && right <= cw &&
top >= 0 && bottom <= ch );
}
{
int h = r.GetHeight();
ypos = r.GetTop();
- for ( i = row-1; i >= 0; i-- )
+ for ( i = row - 1; i >= 0; i-- )
{
int rowHeight = GetRowHeight(i);
if ( h + rowHeight > ch )
else if ( m_colLabelHeight == 0 )
{
m_colLabelWin->Show( true );
- if ( m_rowLabelWidth > 0 ) m_cornerLabelWin->Show( true );
+ if ( m_rowLabelWidth > 0 )
+ m_cornerLabelWin->Show( true );
}
m_colLabelHeight = height;
void wxGrid::SetColLabelTextOrientation( int textOrientation )
{
if ( textOrientation == wxHORIZONTAL || textOrientation == wxVERTICAL )
- {
m_colLabelTextOrientation = textOrientation;
- }
if ( !GetBatchCount() )
- {
m_colLabelWin->Refresh();
- }
}
void wxGrid::SetRowLabelValue( int row, const wxString& s )
}
-wxGridCellEditor* wxGrid::GetDefaultEditorForCell(int row, int col) const
+wxGridCellEditor * wxGrid::GetDefaultEditorForCell(int row, int col) const
{
wxString typeName = m_table->GetTypeName(row, col);
return GetDefaultEditorForType(typeName);
}
-wxGridCellRenderer* wxGrid::GetDefaultRendererForCell(int row, int col) const
+wxGridCellRenderer * wxGrid::GetDefaultRendererForCell(int row, int col) const
{
wxString typeName = m_table->GetTypeName(row, col);
return GetDefaultRendererForType(typeName);
}
-wxGridCellEditor* wxGrid::GetDefaultEditorForType(const wxString& typeName) const
+wxGridCellEditor * wxGrid::GetDefaultEditorForType(const wxString& typeName) const
{
int index = m_typeRegistry->FindOrCloneDataType(typeName);
if ( index == wxNOT_FOUND )
return m_typeRegistry->GetEditor(index);
}
-wxGridCellRenderer* wxGrid::GetDefaultRendererForType(const wxString& typeName) const
+wxGridCellRenderer * wxGrid::GetDefaultRendererForType(const wxString& typeName) const
{
int index = m_typeRegistry->FindOrCloneDataType(typeName);
if ( index == wxNOT_FOUND )
// scrollbar steps
wxSize sizeFit(
GetScrollX(size.x + m_extraWidth + 1) * m_scrollLineX,
- GetScrollY(size.y + m_extraHeight + 1) * m_scrollLineY);
+ GetScrollY(size.y + m_extraHeight + 1) * m_scrollLineY );
// distribute the extra space between the columns/rows to avoid having
// extra white space