]>
Commit | Line | Data |
---|---|---|
c801d85f | 1 | ///////////////////////////////////////////////////////////////////////////// |
46562151 | 2 | // Name: wx/gtk/brush.h |
c801d85f KB |
3 | // Purpose: |
4 | // Author: Robert Roebling | |
dbf858b5 | 5 | // Id: $Id$ |
01111366 | 6 | // Copyright: (c) 1998 Robert Roebling |
65571936 | 7 | // Licence: wxWindows licence |
c801d85f KB |
8 | ///////////////////////////////////////////////////////////////////////////// |
9 | ||
10 | ||
11 | #ifndef __GTKBRUSHH__ | |
12 | #define __GTKBRUSHH__ | |
13 | ||
c801d85f KB |
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 | ||
20123d49 | 24 | class WXDLLIMPEXP_CORE wxBrush; |
c801d85f KB |
25 | |
26 | //----------------------------------------------------------------------------- | |
27 | // wxBrush | |
28 | //----------------------------------------------------------------------------- | |
29 | ||
20123d49 | 30 | class WXDLLIMPEXP_CORE wxBrush: public wxBrushBase |
c801d85f | 31 | { |
738f9e5a | 32 | public: |
c89f5c02 | 33 | wxBrush() { } |
ab9d0a8c | 34 | |
5b36366c | 35 | wxBrush( const wxColour &colour, int style = wxSOLID ); |
c801d85f | 36 | wxBrush( const wxBitmap &stippleBitmap ); |
8bbe427f | 37 | ~wxBrush(); |
ab9d0a8c | 38 | |
d84afea9 | 39 | wxBrush( const wxBrush &brush ) |
cb9d5bd0 | 40 | : wxBrushBase() |
d84afea9 | 41 | { Ref(brush); } |
c89f5c02 | 42 | wxBrush& operator = ( const wxBrush& brush ) { Ref(brush); return *this; } |
ab9d0a8c | 43 | |
c89f5c02 | 44 | bool Ok() const { return m_refData != NULL; } |
ab9d0a8c | 45 | |
f6bcfd97 | 46 | bool operator == ( const wxBrush& brush ) const; |
c89f5c02 | 47 | bool operator != (const wxBrush& brush) const { return !(*this == brush); } |
8bbe427f | 48 | |
cb9d5bd0 | 49 | virtual int GetStyle() const; |
8bbe427f VZ |
50 | wxColour &GetColour() const; |
51 | wxBitmap *GetStipple() const; | |
52 | ||
e55ad60e | 53 | void SetColour( const wxColour& col ); |
1a1498c0 | 54 | void SetColour( unsigned char r, unsigned char g, unsigned char b ); |
e55ad60e RR |
55 | void SetStyle( int style ); |
56 | void SetStipple( const wxBitmap& stipple ); | |
8bbe427f | 57 | |
738f9e5a | 58 | private: |
c89f5c02 RR |
59 | // ref counting code |
60 | virtual wxObjectRefData *CreateRefData() const; | |
61 | virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const; | |
ab9d0a8c | 62 | |
738f9e5a | 63 | DECLARE_DYNAMIC_CLASS(wxBrush) |
c801d85f KB |
64 | }; |
65 | ||
66 | #endif // __GTKBRUSHH__ |