]>
Commit | Line | Data |
---|---|---|
c801d85f KB |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: brush.h | |
3 | // Purpose: | |
4 | // Author: Robert Roebling | |
dbf858b5 | 5 | // Id: $Id$ |
01111366 | 6 | // Copyright: (c) 1998 Robert Roebling |
8bbe427f | 7 | // Licence: wxWindows licence |
c801d85f KB |
8 | ///////////////////////////////////////////////////////////////////////////// |
9 | ||
10 | ||
11 | #ifndef __GTKBRUSHH__ | |
12 | #define __GTKBRUSHH__ | |
13 | ||
12028905 | 14 | #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) |
c801d85f KB |
15 | #pragma interface |
16 | #endif | |
17 | ||
18 | #include "wx/defs.h" | |
19 | #include "wx/object.h" | |
20 | #include "wx/string.h" | |
21 | #include "wx/gdiobj.h" | |
22 | #include "wx/bitmap.h" | |
23 | ||
24 | //----------------------------------------------------------------------------- | |
25 | // classes | |
26 | //----------------------------------------------------------------------------- | |
27 | ||
28 | class wxBrush; | |
29 | ||
30 | //----------------------------------------------------------------------------- | |
31 | // wxBrush | |
32 | //----------------------------------------------------------------------------- | |
33 | ||
34 | class wxBrush: public wxGDIObject | |
35 | { | |
738f9e5a | 36 | public: |
c89f5c02 RR |
37 | wxBrush() { } |
38 | ||
5b36366c | 39 | wxBrush( const wxColour &colour, int style = wxSOLID ); |
c801d85f | 40 | wxBrush( const wxBitmap &stippleBitmap ); |
8bbe427f | 41 | ~wxBrush(); |
c89f5c02 | 42 | |
d84afea9 GD |
43 | wxBrush( const wxBrush &brush ) |
44 | : wxGDIObject() | |
45 | { Ref(brush); } | |
c89f5c02 RR |
46 | wxBrush& operator = ( const wxBrush& brush ) { Ref(brush); return *this; } |
47 | ||
48 | bool Ok() const { return m_refData != NULL; } | |
49 | ||
f6bcfd97 | 50 | bool operator == ( const wxBrush& brush ) const; |
c89f5c02 | 51 | bool operator != (const wxBrush& brush) const { return !(*this == brush); } |
8bbe427f VZ |
52 | |
53 | int GetStyle() const; | |
54 | wxColour &GetColour() const; | |
55 | wxBitmap *GetStipple() const; | |
56 | ||
e55ad60e | 57 | void SetColour( const wxColour& col ); |
e55ad60e RR |
58 | void SetColour( unsigned char r, unsigned char g, unsigned char b ); |
59 | void SetStyle( int style ); | |
60 | void SetStipple( const wxBitmap& stipple ); | |
8bbe427f | 61 | |
738f9e5a | 62 | private: |
c89f5c02 RR |
63 | // ref counting code |
64 | virtual wxObjectRefData *CreateRefData() const; | |
65 | virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const; | |
66 | ||
738f9e5a | 67 | DECLARE_DYNAMIC_CLASS(wxBrush) |
c801d85f KB |
68 | }; |
69 | ||
70 | #endif // __GTKBRUSHH__ |