]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/gtk/brush.h
Last part from weak ref patch for event sink disconnection
[wxWidgets.git] / include / wx / gtk / brush.h
index d42e564a814960b851841964d08fd200930b13c2..f733ecea5fa9c9c06e45c469f0b622938f4c04a8 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
 /////////////////////////////////////////////////////////////////////////////
-// Name:        brush.h
+// Name:        wx/gtk/brush.h
 // Purpose:
 // Author:      Robert Roebling
 // Id:          $Id$
 // Purpose:
 // Author:      Robert Roebling
 // Id:          $Id$
@@ -7,44 +7,29 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
+#ifndef _WX_GTK_BRUSH_H_
+#define _WX_GTK_BRUSH_H_
 
 
-#ifndef __GTKBRUSHH__
-#define __GTKBRUSHH__
-
-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "wx/defs.h"
-#include "wx/object.h"
-#include "wx/string.h"
-#include "wx/gdiobj.h"
-#include "wx/bitmap.h"
-
-//-----------------------------------------------------------------------------
-// classes
-//-----------------------------------------------------------------------------
-
-class wxBrush;
+class WXDLLIMPEXP_FWD_CORE wxBitmap;
+class WXDLLIMPEXP_FWD_CORE wxColour;
 
 //-----------------------------------------------------------------------------
 // wxBrush
 //-----------------------------------------------------------------------------
 
 
 //-----------------------------------------------------------------------------
 // wxBrush
 //-----------------------------------------------------------------------------
 
-class wxBrush: public wxGDIObject
+class WXDLLIMPEXP_CORE wxBrush: public wxBrushBase
 {
 public:
 {
 public:
-    wxBrush();
-    wxBrush( const wxColour &colour, int style );
+    wxBrush() { }
+
+    wxBrush( const wxColour &colour, int style = wxSOLID );
     wxBrush( const wxBitmap &stippleBitmap );
     wxBrush( const wxBitmap &stippleBitmap );
-    wxBrush( const wxBrush &brush );
-    ~wxBrush();
-    wxBrush& operator = ( const wxBrush& brush );
-    bool operator == ( const wxBrush& brush );
-    bool operator != ( const wxBrush& brush );
-    bool Ok() const;
-
-    int GetStyle() const;
+    virtual ~wxBrush();
+
+    bool operator==(const wxBrush& brush) const;
+    bool operator!=(const wxBrush& brush) const { return !(*this == brush); }
+
+    virtual int GetStyle() const;
     wxColour &GetColour() const;
     wxBitmap *GetStipple() const;
 
     wxColour &GetColour() const;
     wxBitmap *GetStipple() const;
 
@@ -53,10 +38,11 @@ public:
     void SetStyle( int style );
     void SetStipple( const wxBitmap& stipple );
 
     void SetStyle( int style );
     void SetStipple( const wxBitmap& stipple );
 
-    void Unshare();
+protected:
+    virtual wxGDIRefData *CreateGDIRefData() const;
+    virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
 
 
-private:
     DECLARE_DYNAMIC_CLASS(wxBrush)
 };
 
     DECLARE_DYNAMIC_CLASS(wxBrush)
 };
 
-#endif // __GTKBRUSHH__
+#endif // _WX_GTK_BRUSH_H_