]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/brush.cpp
wxRTC: fixed guidelines overwriting adjacent cell borders; corrected capitalisation...
[wxWidgets.git] / src / gtk / brush.cpp
index a57855a31ef8ec3fc4f006a93afa842d6c91d2f6..2c29ba5cbac53268402a52aff2e1432517227228 100644 (file)
@@ -2,7 +2,6 @@
 // Name:        src/gtk/brush.cpp
 // Purpose:
 // Author:      Robert Roebling
 // Name:        src/gtk/brush.cpp
 // Purpose:
 // Author:      Robert Roebling
-// Id:          $Id$
 // Copyright:   (c) 1998 Robert Roebling
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 // Copyright:   (c) 1998 Robert Roebling
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -61,6 +60,13 @@ wxBrush::wxBrush( const wxColour &colour, wxBrushStyle style )
     m_refData = new wxBrushRefData(colour, 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;
 wxBrush::wxBrush( const wxBitmap &stippleBitmap )
 {
     wxBrushStyle style = wxBRUSHSTYLE_STIPPLE;
@@ -97,33 +103,21 @@ bool wxBrush::operator==(const wxBrush& brush) const
 
 wxBrushStyle wxBrush::GetStyle() 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;
 }
 
 
     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
 {
 
     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;
 }
 
     return &M_BRUSHDATA->m_stipple;
 }