make pen/brush parameters const

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38927 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Paul Cornett 2006-04-26 16:27:20 +00:00
parent 90daa6cd4a
commit d0363d3d2d
4 changed files with 10 additions and 10 deletions

View File

@ -126,17 +126,17 @@ protected:
virtual void DrawRombShades( wxPoint& p1, wxPoint& p2, wxPoint& p3, wxPoint& p4, wxDC& dc );
// Implements 'hard-coded metafile' for Netscape Navigator look.
virtual void DrawOrtoRomb( wxRect& inRect, wxDC& dc, wxBrush& bkBrush );
virtual void DrawOrtoRomb( wxRect& inRect, wxDC& dc, const wxBrush& bkBrush );
// Implements 'hard-coded metafile' for Netscape Navigator look.
virtual void DrawRomb( wxRect& inRect, wxDC& dc, wxBrush& bkBrush );
virtual void DrawRomb( wxRect& inRect, wxDC& dc, const wxBrush& bkBrush );
// Implements 'hard-coded metafile' for Netscape Navigator look.
virtual void Draw3DRect( wxRect& inRect, wxDC& dc, wxBrush& bkBrush );
virtual void Draw3DRect( wxRect& inRect, wxDC& dc, const wxBrush& bkBrush );
// Implements 'hard-coded metafile' for Netscape Navigator look.
virtual void DrawRectShade( wxRect& inRect, wxDC& dc,
int level, wxPen& upperPen, wxPen& lowerPen );
int level, const wxPen& upperPen, const wxPen& lowerPen );
// Helper for drag and drop.
virtual void GetRowHintRect( cbRowInfo* pRow, wxRect& rect );

View File

@ -96,7 +96,7 @@ public:
bool SetColumnWidth(int column, int colSize = 5, bool expandable = false);
bool SetRowHeight(int row, int rowSize = 5, bool expandable = false);
bool EnableGridLines(wxWindow *win);
bool SetGridPen(wxPen *pen);
bool SetGridPen(const wxPen *pen);
void OnPaint(wxDC& dc);
private:

View File

@ -1044,7 +1044,7 @@ void cbRowDragPlugin::DrawRombShades( wxPoint& p1, wxPoint& p2,
dc.DrawLine( p4.x, p4.y, p1.x, p1.y );
}
void cbRowDragPlugin::DrawOrtoRomb( wxRect& inRect, wxDC& dc, wxBrush& bkBrush )
void cbRowDragPlugin::DrawOrtoRomb( wxRect& inRect, wxDC& dc, const wxBrush& bkBrush )
{
dc.SetBrush( bkBrush );
dc.SetPen( mpLayout->mBlackPen );
@ -1105,7 +1105,7 @@ void cbRowDragPlugin::DrawOrtoRomb( wxRect& inRect, wxDC& dc, wxBrush& bkBrush )
dc.SetBrush( wxNullBrush );
}
void cbRowDragPlugin::DrawRomb( wxRect& inRect, wxDC& dc, wxBrush& bkBrush )
void cbRowDragPlugin::DrawRomb( wxRect& inRect, wxDC& dc, const wxBrush& bkBrush )
{
wxPoint points[4];
@ -1167,7 +1167,7 @@ void cbRowDragPlugin::DrawRomb( wxRect& inRect, wxDC& dc, wxBrush& bkBrush )
}
void cbRowDragPlugin::DrawRectShade( wxRect& inRect, wxDC& dc,
int level, wxPen& upperPen, wxPen& lowerPen )
int level, const wxPen& upperPen, const wxPen& lowerPen )
{
// upper shade
dc.SetPen( upperPen );
@ -1192,7 +1192,7 @@ void cbRowDragPlugin::DrawRectShade( wxRect& inRect, wxDC& dc,
dc.SetBrush( wxNullBrush );
}
void cbRowDragPlugin::Draw3DRect( wxRect& inRect, wxDC& dc, wxBrush& bkBrush )
void cbRowDragPlugin::Draw3DRect( wxRect& inRect, wxDC& dc, const wxBrush& bkBrush )
{
dc.SetPen( mpLayout->mNullPen );
dc.SetBrush( bkBrush );

View File

@ -198,7 +198,7 @@ bool wxMultiCellSizer::EnableGridLines(wxWindow *win)
return true;
}
//---------------------------------------------------------------------------
bool wxMultiCellSizer::SetGridPen(wxPen *pen)
bool wxMultiCellSizer::SetGridPen(const wxPen *pen)
{
m_pen = pen;
return true;