]> git.saurik.com Git - wxWidgets.git/blobdiff - src/dfb/brush.cpp
document On{Open,Save}Document()
[wxWidgets.git] / src / dfb / brush.cpp
index 51a295f9979be411cfa4d44f741edc38697abd8f..efbd60cbbce83df5b8736db6243f21b6f7891872 100644 (file)
@@ -69,6 +69,13 @@ wxBrush::wxBrush(const wxColour &colour, wxBrushStyle 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)
 {
     wxFAIL_MSG( wxT("brushes with stipple bitmaps not implemented") );
@@ -84,22 +91,14 @@ bool wxBrush::operator==(const wxBrush& brush) const
 
 wxBrushStyle wxBrush::GetStyle() const
 {
-    if (m_refData == NULL)
-    {
-        wxFAIL_MSG( wxT("invalid brush") );
-        return 0;
-    }
+    wxCHECK_MSG( Ok(), wxBRUSHSTYLE_INVALID, _T("invalid brush") );
 
     return M_BRUSHDATA->m_style;
 }
 
 wxColour& wxBrush::GetColour() const
 {
-    if (m_refData == NULL)
-    {
-        wxFAIL_MSG( wxT("invalid brush") );
-        return wxNullColour;
-    }
+    wxCHECK_MSG( Ok(), wxNullColour, _T("invalid brush") );
 
     return M_BRUSHDATA->m_colour;
 }