]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/brush.h
avoid GCC warning about type-punned pointer breaking strict aliasing rules
[wxWidgets.git] / include / wx / gtk / brush.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk/brush.h
3 // Purpose:
4 // Author: Robert Roebling
5 // Id: $Id$
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
9
10 #ifndef _WX_GTK_BRUSH_H_
11 #define _WX_GTK_BRUSH_H_
12
13 class WXDLLIMPEXP_FWD_CORE wxBitmap;
14 class WXDLLIMPEXP_FWD_CORE wxColour;
15
16 //-----------------------------------------------------------------------------
17 // wxBrush
18 //-----------------------------------------------------------------------------
19
20 class WXDLLIMPEXP_CORE wxBrush: public wxBrushBase
21 {
22 public:
23 wxBrush() { }
24
25 wxBrush( const wxColour &colour, int style = wxSOLID );
26 wxBrush( const wxBitmap &stippleBitmap );
27 virtual ~wxBrush();
28
29 bool operator==(const wxBrush& brush) const;
30 bool operator!=(const wxBrush& brush) const { return !(*this == brush); }
31
32 virtual int GetStyle() const;
33 wxColour &GetColour() const;
34 wxBitmap *GetStipple() const;
35
36 void SetColour( const wxColour& col );
37 void SetColour( unsigned char r, unsigned char g, unsigned char b );
38 void SetStyle( int style );
39 void SetStipple( const wxBitmap& stipple );
40
41 protected:
42 virtual wxGDIRefData *CreateGDIRefData() const;
43 virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
44
45 DECLARE_DYNAMIC_CLASS(wxBrush)
46 };
47
48 #endif // _WX_GTK_BRUSH_H_