X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e4a81a2e96b5a349ee9430b91d36e7e8a21d7976..1a5e297c6b5b745afee30caf430ce62e9519a181:/src/motif/brush.cpp diff --git a/src/motif/brush.cpp b/src/motif/brush.cpp index 804bcaaa3e..1b8069646b 100644 --- a/src/motif/brush.cpp +++ b/src/motif/brush.cpp @@ -28,9 +28,9 @@ wxBrushRefData::wxBrushRefData() wxBrushRefData::wxBrushRefData(const wxBrushRefData& data) { - m_style = data.m_style; - m_stipple = data.m_stipple; - m_colour = data.m_colour; + m_style = data.m_style; + m_stipple = data.m_stipple; + m_colour = data.m_colour; } wxBrushRefData::~wxBrushRefData() @@ -53,12 +53,12 @@ wxBrush::~wxBrush() wxBrush::wxBrush(const wxColour& col, int Style) { m_refData = new wxBrushRefData; - + M_BRUSHDATA->m_colour = col; M_BRUSHDATA->m_style = Style; - + RealizeResource(); - + if ( wxTheBrushList ) wxTheBrushList->AddBrush(this); } @@ -66,64 +66,64 @@ wxBrush::wxBrush(const wxColour& col, int Style) wxBrush::wxBrush(const wxBitmap& stipple) { m_refData = new wxBrushRefData; - + M_BRUSHDATA->m_style = wxSTIPPLE; M_BRUSHDATA->m_stipple = stipple; - + RealizeResource(); - + if ( wxTheBrushList ) wxTheBrushList->AddBrush(this); } void wxBrush::Unshare() { - // Don't change shared data - if (!m_refData) + // Don't change shared data + if (!m_refData) { - m_refData = new wxBrushRefData(); - } + m_refData = new wxBrushRefData(); + } else { - wxBrushRefData* ref = new wxBrushRefData(*(wxBrushRefData*)m_refData); - UnRef(); - m_refData = ref; - } + wxBrushRefData* ref = new wxBrushRefData(*(wxBrushRefData*)m_refData); + UnRef(); + m_refData = ref; + } } void wxBrush::SetColour(const wxColour& col) { Unshare(); - + M_BRUSHDATA->m_colour = col; - + RealizeResource(); } void wxBrush::SetColour(unsigned char r, unsigned char g, unsigned char b) { Unshare(); - + M_BRUSHDATA->m_colour.Set(r, g, b); - + RealizeResource(); } void wxBrush::SetStyle(int Style) { Unshare(); - + M_BRUSHDATA->m_style = Style; - + RealizeResource(); } void wxBrush::SetStipple(const wxBitmap& Stipple) { Unshare(); - + M_BRUSHDATA->m_stipple = Stipple; - + RealizeResource(); }