// wxBrush
//-----------------------------------------------------------------------------
-class wxBrushRefData: public wxObjectRefData
+class wxBrushRefData : public wxGDIRefData
{
public:
wxBrushRefData(const wxColour& clr = wxNullColour, int style = wxSOLID)
m_style = data.m_style;
}
+ virtual bool IsOk() const { return m_colour.IsOk(); }
+
void SetStyle(int style)
{
- if ( m_style != wxSOLID && m_style == wxTRANSPARENT )
+ 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;
}
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);
}
return m_refData == brush.m_refData;
}
-bool wxBrush::Ok() const
-{
- return ((m_refData) && M_BRUSHDATA->m_colour.Ok());
-}
-
int wxBrush::GetStyle() const
{
if (m_refData == NULL)
wxBitmap *wxBrush::GetStipple() const
{
- wxFAIL_MSG( "brushes with stipple bitmaps not implemented" );
+ wxFAIL_MSG( wxT("brushes with stipple bitmaps not implemented") );
return &wxNullBitmap;
}
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);
}