]>
Commit | Line | Data |
---|---|---|
83df96d6 JS |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: brush.h | |
3 | // Purpose: wxBrush class | |
74dc5eb6 | 4 | // Author: Julian Smart, Robert Roebling |
83df96d6 JS |
5 | // Modified by: |
6 | // Created: 17/09/98 | |
7 | // RCS-ID: $Id$ | |
74dc5eb6 | 8 | // Copyright: (c) Julian Smart, Robert Roebling |
ab9d0a8c | 9 | // Licence: wxWindows licence |
83df96d6 JS |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
12 | #ifndef _WX_BRUSH_H_ | |
13 | #define _WX_BRUSH_H_ | |
14 | ||
12028905 | 15 | #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) |
83df96d6 JS |
16 | #pragma interface "brush.h" |
17 | #endif | |
18 | ||
83df96d6 | 19 | #include "wx/gdiobj.h" |
83df96d6 | 20 | |
74dc5eb6 RR |
21 | //----------------------------------------------------------------------------- |
22 | // classes | |
23 | //----------------------------------------------------------------------------- | |
83df96d6 | 24 | |
968eb2ef MW |
25 | class WXDLLIMPEXP_CORE wxBrush; |
26 | class WXDLLIMPEXP_CORE wxColour; | |
27 | class WXDLLIMPEXP_CORE wxBitmap; | |
83df96d6 | 28 | |
74dc5eb6 RR |
29 | //----------------------------------------------------------------------------- |
30 | // wxBrush | |
31 | //----------------------------------------------------------------------------- | |
83df96d6 | 32 | |
968eb2ef | 33 | class WXDLLIMPEXP_CORE wxBrush: public wxBrushBase |
83df96d6 | 34 | { |
83df96d6 | 35 | public: |
74dc5eb6 | 36 | wxBrush() { } |
ab9d0a8c | 37 | |
5b36366c | 38 | wxBrush( const wxColour &colour, int style = wxSOLID ); |
74dc5eb6 RR |
39 | wxBrush( const wxBitmap &stippleBitmap ); |
40 | ~wxBrush(); | |
ab9d0a8c | 41 | |
74dc5eb6 RR |
42 | wxBrush( const wxBrush &brush ) { Ref(brush); } |
43 | wxBrush& operator = ( const wxBrush& brush ) { Ref(brush); return *this; } | |
ab9d0a8c | 44 | |
74dc5eb6 | 45 | bool Ok() const { return m_refData != NULL; } |
ab9d0a8c | 46 | |
74dc5eb6 RR |
47 | bool operator == ( const wxBrush& brush ) const; |
48 | bool operator != (const wxBrush& brush) const { return !(*this == brush); } | |
49 | ||
cb9d5bd0 | 50 | virtual int GetStyle() const; |
74dc5eb6 RR |
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; | |
ab9d0a8c | 63 | |
74dc5eb6 | 64 | DECLARE_DYNAMIC_CLASS(wxBrush) |
83df96d6 JS |
65 | }; |
66 | ||
67 | #endif | |
68 | // _WX_BRUSH_H_ |