]> git.saurik.com Git - wxWidgets.git/blob - include/wx/x11/brush.h
wxLogFatalError() now always aborts the program and doesn't use the active log target...
[wxWidgets.git] / include / wx / x11 / brush.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: brush.h
3 // Purpose: wxBrush class
4 // Author: Julian Smart, Robert Roebling
5 // Modified by:
6 // Created: 17/09/98
7 // RCS-ID: $Id$
8 // Copyright: (c) Julian Smart, Robert Roebling
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_BRUSH_H_
13 #define _WX_BRUSH_H_
14
15 #ifdef __GNUG__
16 #pragma interface "brush.h"
17 #endif
18
19 #include "wx/gdicmn.h"
20 #include "wx/gdiobj.h"
21 #include "wx/bitmap.h"
22
23 //-----------------------------------------------------------------------------
24 // classes
25 //-----------------------------------------------------------------------------
26
27 class wxBrush;
28
29 //-----------------------------------------------------------------------------
30 // wxBrush
31 //-----------------------------------------------------------------------------
32
33 class wxBrush: public wxGDIObject
34 {
35 public:
36 wxBrush() { }
37
38 wxBrush( const wxColour &colour, int style );
39 wxBrush( const wxBitmap &stippleBitmap );
40 ~wxBrush();
41
42 wxBrush( const wxBrush &brush ) { Ref(brush); }
43 wxBrush& operator = ( const wxBrush& brush ) { Ref(brush); return *this; }
44
45 bool Ok() const { return m_refData != NULL; }
46
47 bool operator == ( const wxBrush& brush ) const;
48 bool operator != (const wxBrush& brush) const { return !(*this == brush); }
49
50 int GetStyle() const;
51 wxColour &GetColour() const;
52 wxBitmap *GetStipple() const;
53
54 void SetColour( const wxColour& col );
55 void SetColour( unsigned char r, unsigned char g, unsigned char b );
56 void SetStyle( int style );
57 void SetStipple( const wxBitmap& stipple );
58
59 private:
60 // ref counting code
61 virtual wxObjectRefData *CreateRefData() const;
62 virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;
63
64 DECLARE_DYNAMIC_CLASS(wxBrush)
65 };
66
67 #endif
68 // _WX_BRUSH_H_