]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk1/brush.h
Warning fix (instead of silencing int->short with typecast, have the same type intern...
[wxWidgets.git] / include / wx / gtk1 / 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
11 #ifndef __GTKBRUSHH__
12 #define __GTKBRUSHH__
13
14 #include "wx/defs.h"
15 #include "wx/object.h"
16 #include "wx/string.h"
17 #include "wx/gdiobj.h"
18 #include "wx/bitmap.h"
19
20 //-----------------------------------------------------------------------------
21 // classes
22 //-----------------------------------------------------------------------------
23
24 class WXDLLIMPEXP_CORE wxBrush;
25
26 //-----------------------------------------------------------------------------
27 // wxBrush
28 //-----------------------------------------------------------------------------
29
30 class WXDLLIMPEXP_CORE wxBrush: public wxBrushBase
31 {
32 public:
33 wxBrush() { }
34
35 wxBrush( const wxColour &colour, int style = wxSOLID );
36 wxBrush( const wxBitmap &stippleBitmap );
37 ~wxBrush();
38
39 wxBrush( const wxBrush &brush )
40 : wxBrushBase()
41 { Ref(brush); }
42 wxBrush& operator = ( const wxBrush& brush ) { Ref(brush); return *this; }
43
44 bool Ok() const { return m_refData != NULL; }
45
46 bool operator == ( const wxBrush& brush ) const;
47 bool operator != (const wxBrush& brush) const { return !(*this == brush); }
48
49 virtual int GetStyle() const;
50 wxColour &GetColour() const;
51 wxBitmap *GetStipple() const;
52
53 void SetColour( const wxColour& col );
54 void SetColour( unsigned char r, unsigned char g, unsigned char b );
55 void SetStyle( int style );
56 void SetStipple( const wxBitmap& stipple );
57
58 private:
59 // ref counting code
60 virtual wxObjectRefData *CreateRefData() const;
61 virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;
62
63 DECLARE_DYNAMIC_CLASS(wxBrush)
64 };
65
66 #endif // __GTKBRUSHH__