compilation fix after wxBrushStyle changes (closes #9593)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59746 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -23,7 +23,8 @@
|
|||||||
class WXDLLEXPORT wxBrushRefData: public wxGDIRefData
|
class WXDLLEXPORT wxBrushRefData: public wxGDIRefData
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxBrushRefData(const wxColour& colour = wxNullColour, int style = wxSOLID);
|
wxBrushRefData(const wxColour& colour = wxNullColour,
|
||||||
|
wxBrushStyle style = wxBRUSHSTYLE_SOLID);
|
||||||
wxBrushRefData(const wxBitmap& stipple);
|
wxBrushRefData(const wxBitmap& stipple);
|
||||||
wxBrushRefData(const wxBrushRefData& data);
|
wxBrushRefData(const wxBrushRefData& data);
|
||||||
virtual ~wxBrushRefData();
|
virtual ~wxBrushRefData();
|
||||||
@@ -35,18 +36,18 @@ public:
|
|||||||
|
|
||||||
// accessors
|
// accessors
|
||||||
const wxColour& GetColour() const { return m_colour; }
|
const wxColour& GetColour() const { return m_colour; }
|
||||||
int GetStyle() const { return m_style; }
|
wxBrushStyle GetStyle() const { return m_style; }
|
||||||
wxBitmap *GetStipple() { return &m_stipple; }
|
wxBitmap *GetStipple() { return &m_stipple; }
|
||||||
|
|
||||||
void SetColour(const wxColour& colour) { Free(); m_colour = colour; }
|
void SetColour(const wxColour& colour) { Free(); m_colour = colour; }
|
||||||
void SetStyle(int style) { Free(); m_style = style; }
|
void SetStyle(wxBrushStyle style) { Free(); m_style = style; }
|
||||||
void SetStipple(const wxBitmap& stipple) { Free(); DoSetStipple(stipple); }
|
void SetStipple(const wxBitmap& stipple) { Free(); DoSetStipple(stipple); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void DoSetStipple(const wxBitmap& stipple);
|
void DoSetStipple(const wxBitmap& stipple);
|
||||||
|
|
||||||
WX_NSColor m_cocoaNSColor;
|
WX_NSColor m_cocoaNSColor;
|
||||||
int m_style;
|
wxBrushStyle m_style;
|
||||||
wxBitmap m_stipple;
|
wxBitmap m_stipple;
|
||||||
wxColour m_colour;
|
wxColour m_colour;
|
||||||
|
|
||||||
@@ -58,7 +59,7 @@ private:
|
|||||||
#define M_BRUSHDATA ((wxBrushRefData *)m_refData)
|
#define M_BRUSHDATA ((wxBrushRefData *)m_refData)
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxBrush, wxGDIObject)
|
IMPLEMENT_DYNAMIC_CLASS(wxBrush, wxGDIObject)
|
||||||
|
|
||||||
wxBrushRefData::wxBrushRefData(const wxColour& colour, int style)
|
wxBrushRefData::wxBrushRefData(const wxColour& colour, wxBrushStyle style)
|
||||||
{
|
{
|
||||||
m_cocoaNSColor = NULL;
|
m_cocoaNSColor = NULL;
|
||||||
m_style = style;
|
m_style = style;
|
||||||
@@ -102,7 +103,8 @@ bool wxBrushRefData::operator==(const wxBrushRefData& data) const
|
|||||||
void wxBrushRefData::DoSetStipple(const wxBitmap& stipple)
|
void wxBrushRefData::DoSetStipple(const wxBitmap& stipple)
|
||||||
{
|
{
|
||||||
m_stipple = stipple;
|
m_stipple = stipple;
|
||||||
m_style = stipple.GetMask() ? wxSTIPPLE_MASK_OPAQUE : wxSTIPPLE;
|
m_style = stipple.GetMask() ? wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE
|
||||||
|
: wxBRUSHSTYLE_STIPPLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
WX_NSColor wxBrushRefData::GetNSColor()
|
WX_NSColor wxBrushRefData::GetNSColor()
|
||||||
@@ -149,11 +151,16 @@ wxBrush::~wxBrush()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
wxBrush::wxBrush(const wxColour& col, int style)
|
wxBrush::wxBrush(const wxColour& col, wxBrushStyle style)
|
||||||
{
|
{
|
||||||
m_refData = new wxBrushRefData(col, style);
|
m_refData = new wxBrushRefData(col, style);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxBrush::wxBrush(const wxColour& col, int style)
|
||||||
|
{
|
||||||
|
m_refData = new wxBrushRefData(col, (wxBrushStyle)style);
|
||||||
|
}
|
||||||
|
|
||||||
wxBrush::wxBrush(const wxBitmap& stipple)
|
wxBrush::wxBrush(const wxBitmap& stipple)
|
||||||
{
|
{
|
||||||
m_refData = new wxBrushRefData(stipple);
|
m_refData = new wxBrushRefData(stipple);
|
||||||
@@ -181,7 +188,7 @@ void wxBrush::SetColour(unsigned char r, unsigned char g, unsigned char b)
|
|||||||
M_BRUSHDATA->SetColour(wxColour(r,g,b));
|
M_BRUSHDATA->SetColour(wxColour(r,g,b));
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxBrush::SetStyle(int style)
|
void wxBrush::SetStyle(wxBrushStyle style)
|
||||||
{
|
{
|
||||||
AllocExclusive();
|
AllocExclusive();
|
||||||
M_BRUSHDATA->SetStyle(style);
|
M_BRUSHDATA->SetStyle(style);
|
||||||
@@ -199,9 +206,9 @@ wxColour wxBrush::GetColour() const
|
|||||||
return M_BRUSHDATA->GetColour();
|
return M_BRUSHDATA->GetColour();
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxBrush::GetStyle() const
|
wxBrushStyle wxBrush::GetStyle() const
|
||||||
{
|
{
|
||||||
wxCHECK_MSG( Ok(), 0, _T("invalid brush") );
|
wxCHECK_MSG( Ok(), wxBRUSHSTYLE_INVALID, _T("invalid brush") );
|
||||||
return M_BRUSHDATA->GetStyle();
|
return M_BRUSHDATA->GetStyle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user