make the Pen/Brush code backward compatible as discussed on wx-dev; marked the blocks of code to deprecate in future with FUTURE_WXWIN_COMPATIBILITY_3_0; add wxCHECK_MSG in all ports to block Get*() calls on invalid objects (as already is for all other refcounted objects and for most ports)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52636 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -73,6 +73,20 @@ wxBrush::wxBrush(
|
||||
RealizeResource();
|
||||
} // end of wxBrush::wxBrush
|
||||
|
||||
#if FUTURE_WXWIN_COMPATIBILITY_3_0
|
||||
wxBrush::wxBrush(const wxColour& col, int style)
|
||||
{
|
||||
m_refData = new wxBrushRefData;
|
||||
|
||||
M_BRUSHDATA->m_vColour = col;
|
||||
M_BRUSHDATA->m_nStyle = (wxBrushStyle)style;
|
||||
M_BRUSHDATA->m_hBrush = 0;
|
||||
memset(&M_BRUSHDATA->m_vBundle, '\0', sizeof(AREABUNDLE));
|
||||
|
||||
RealizeResource();
|
||||
}
|
||||
#endif
|
||||
|
||||
wxBrush::wxBrush(const wxBitmap& rStipple)
|
||||
{
|
||||
m_refData = new wxBrushRefData;
|
||||
|
@@ -86,7 +86,8 @@ wxPen::wxPen(
|
||||
RealizeResource();
|
||||
} // end of wxPen::wxPen
|
||||
|
||||
wxPen::wxPen(const wxColour& colour, int width, wxBrushStyle style)
|
||||
#if FUTURE_WXWIN_COMPATIBILITY_3_0
|
||||
wxPen::wxPen(const wxColour& colour, int width, int style)
|
||||
{
|
||||
m_refData = new wxPenRefData;
|
||||
|
||||
@@ -99,6 +100,7 @@ wxPen::wxPen(const wxColour& colour, int width, wxBrushStyle style)
|
||||
|
||||
RealizeResource();
|
||||
}
|
||||
#endif
|
||||
|
||||
wxPen::wxPen(
|
||||
const wxBitmap& rStipple
|
||||
|
Reference in New Issue
Block a user