X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b7cacb43db1e69b87b257a67912b4d52995b070a..3f20f7d8a388424e6f519a18019e070725d18503:/src/dfb/brush.cpp diff --git a/src/dfb/brush.cpp b/src/dfb/brush.cpp index 475491621f..6d310fc0bd 100644 --- a/src/dfb/brush.cpp +++ b/src/dfb/brush.cpp @@ -26,7 +26,7 @@ // wxBrush //----------------------------------------------------------------------------- -class wxBrushRefData: public wxObjectRefData +class wxBrushRefData : public wxGDIRefData { public: wxBrushRefData(const wxColour& clr = wxNullColour, int style = wxSOLID) @@ -41,11 +41,13 @@ public: m_style = data.m_style; } + virtual bool IsOk() const { return m_colour.IsOk(); } + void SetStyle(int style) { if ( style != wxSOLID && style != wxTRANSPARENT ) { - wxFAIL_MSG( _T("only wxSOLID and wxTRANSPARENT styles are supported") ); + wxFAIL_MSG( wxT("only wxSOLID and wxTRANSPARENT styles are supported") ); style = wxSOLID; } @@ -69,7 +71,7 @@ wxBrush::wxBrush(const wxColour &colour, int style) wxBrush::wxBrush(const wxBitmap &stippleBitmap) { - wxFAIL_MSG( "brushes with stipple bitmaps not implemented" ); + wxFAIL_MSG( wxT("brushes with stipple bitmaps not implemented") ); m_refData = new wxBrushRefData(*wxBLACK); } @@ -80,11 +82,6 @@ bool wxBrush::operator==(const wxBrush& brush) const return m_refData == brush.m_refData; } -bool wxBrush::IsOk() const -{ - return ((m_refData) && M_BRUSHDATA->m_colour.Ok()); -} - int wxBrush::GetStyle() const { if (m_refData == NULL) @@ -109,7 +106,7 @@ wxColour& wxBrush::GetColour() const wxBitmap *wxBrush::GetStipple() const { - wxFAIL_MSG( "brushes with stipple bitmaps not implemented" ); + wxFAIL_MSG( wxT("brushes with stipple bitmaps not implemented") ); return &wxNullBitmap; } @@ -133,15 +130,15 @@ void wxBrush::SetStyle(int style) void wxBrush::SetStipple(const wxBitmap& WXUNUSED(stipple)) { - wxFAIL_MSG( "brushes with stipple bitmaps not implemented" ); + wxFAIL_MSG( wxT("brushes with stipple bitmaps not implemented") ); } -wxObjectRefData *wxBrush::CreateRefData() const +wxGDIRefData *wxBrush::CreateGDIRefData() const { return new wxBrushRefData; } -wxObjectRefData *wxBrush::CloneRefData(const wxObjectRefData *data) const +wxGDIRefData *wxBrush::CloneGDIRefData(const wxGDIRefData *data) const { return new wxBrushRefData(*(wxBrushRefData *)data); }