X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3e6858cdcb9278b36446466c346d984e7e306553..fb8d7eb7a880f1f2e32d8830f9c5e12b2536e05f:/src/gtk/brush.cpp?ds=sidebyside diff --git a/src/gtk/brush.cpp b/src/gtk/brush.cpp index a57855a31e..667c6df8e4 100644 --- a/src/gtk/brush.cpp +++ b/src/gtk/brush.cpp @@ -61,6 +61,13 @@ wxBrush::wxBrush( const wxColour &colour, wxBrushStyle style ) m_refData = new wxBrushRefData(colour, style); } +#if FUTURE_WXWIN_COMPATIBILITY_3_0 +wxBrush::wxBrush(const wxColour& col, int style) +{ + m_refData = new wxBrushRefData(col, (wxBrushStyle)style); +} +#endif + wxBrush::wxBrush( const wxBitmap &stippleBitmap ) { wxBrushStyle style = wxBRUSHSTYLE_STIPPLE; @@ -97,33 +104,21 @@ bool wxBrush::operator==(const wxBrush& brush) const wxBrushStyle wxBrush::GetStyle() const { - if (m_refData == NULL) - { - wxFAIL_MSG( wxT("invalid brush") ); - return wxBRUSHSTYLE_MAX; - } + wxCHECK_MSG( IsOk(), wxBRUSHSTYLE_INVALID, wxT("invalid brush") ); return M_BRUSHDATA->m_style; } -wxColour &wxBrush::GetColour() const +wxColour wxBrush::GetColour() const { - if (m_refData == NULL) - { - wxFAIL_MSG( wxT("invalid brush") ); - return wxNullColour; - } + wxCHECK_MSG( IsOk(), wxNullColour, wxT("invalid brush") ); return M_BRUSHDATA->m_colour; } wxBitmap *wxBrush::GetStipple() const { - if (m_refData == NULL) - { - wxFAIL_MSG( wxT("invalid brush") ); - return &wxNullBitmap; - } + wxCHECK_MSG( IsOk(), NULL, wxT("invalid brush") ); return &M_BRUSHDATA->m_stipple; }