]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/brush.cpp
Fix Doxygen warnings due to documenting overloaded functions together.
[wxWidgets.git] / src / gtk1 / brush.cpp
index 908cfd933cb7bbd24731a41a7d59f0275715ddd0..ea2d852743c249eb8f5a04e735bed228fbc75988 100644 (file)
@@ -2,7 +2,6 @@
 // Name:        src/gtk1/brush.cpp
 // Purpose:
 // Author:      Robert Roebling
-// Id:          $Id$
 // Copyright:   (c) 1998 Robert Roebling
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -27,7 +26,7 @@ class wxBrushRefData: public wxGDIRefData
 public:
     wxBrushRefData()
     {
-        m_style = 0;
+        m_style = wxBRUSHSTYLE_INVALID;
     }
 
     wxBrushRefData( const wxBrushRefData& data )
@@ -63,6 +62,15 @@ wxBrush::wxBrush( const wxColour &colour, wxBrushStyle style )
     M_BRUSHDATA->m_colour = colour;
 }
 
+#if FUTURE_WXWIN_COMPATIBILITY_3_0
+wxBrush::wxBrush(const wxColour& col, int style)
+{
+    m_refData = new wxBrushRefData;
+    M_BRUSHDATA->m_style = (wxBrushStyle)style;
+    M_BRUSHDATA->m_colour = col;
+}
+#endif
+
 wxBrush::wxBrush( const wxBitmap &stippleBitmap )
 {
     m_refData = new wxBrushRefData();
@@ -71,9 +79,9 @@ wxBrush::wxBrush( const wxBitmap &stippleBitmap )
     M_BRUSHDATA->m_stipple = stippleBitmap;
 
     if (M_BRUSHDATA->m_stipple.GetMask())
-        M_BRUSHDATA->m_style = wxSTIPPLE_MASK_OPAQUE;
+        M_BRUSHDATA->m_style = wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE;
     else
-        M_BRUSHDATA->m_style = wxSTIPPLE;
+        M_BRUSHDATA->m_style = wxBRUSHSTYLE_STIPPLE_MASK;
 }
 
 wxBrush::~wxBrush()
@@ -102,33 +110,21 @@ bool wxBrush::operator == ( const wxBrush& brush ) const
 
 wxBrushStyle wxBrush::GetStyle() const
 {
-    if (m_refData == NULL)
-    {
-        wxFAIL_MSG( wxT("invalid brush") );
-        return 0;
-    }
+    wxCHECK_MSG( IsOk(), wxBRUSHSTYLE_INVALID, wxT("invalid brush") );
 
     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
 {
-    if (m_refData == NULL)
-    {
-        wxFAIL_MSG( wxT("invalid brush") );
-        return &wxNullBitmap;
-    }
+    wxCHECK_MSG( IsOk(), NULL, wxT("invalid brush") );
 
     return &M_BRUSHDATA->m_stipple;
 }
@@ -160,11 +156,7 @@ void wxBrush::SetStipple( const wxBitmap& stipple )
 
     M_BRUSHDATA->m_stipple = stipple;
     if (M_BRUSHDATA->m_stipple.GetMask())
-    {
-        M_BRUSHDATA->m_style = wxSTIPPLE_MASK_OPAQUE;
-    }
+        M_BRUSHDATA->m_style = wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE;
     else
-    {
-        M_BRUSHDATA->m_style = wxSTIPPLE;
-    }
+        M_BRUSHDATA->m_style = wxBRUSHSTYLE_STIPPLE_MASK;
 }