]>
Commit | Line | Data |
---|---|---|
2bda0e17 | 1 | ///////////////////////////////////////////////////////////////////////////// |
cafbad8f | 2 | // Name: wx/msw/brush.h |
2bda0e17 KB |
3 | // Purpose: wxBrush class |
4 | // Author: Julian Smart | |
5 | // Modified by: | |
6 | // Created: 01/02/97 | |
7 | // RCS-ID: $Id$ | |
bbcdf8bc | 8 | // Copyright: (c) Julian Smart |
cafbad8f | 9 | // Licence: wxWindows licence |
2bda0e17 KB |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
bbcdf8bc JS |
12 | #ifndef _WX_BRUSH_H_ |
13 | #define _WX_BRUSH_H_ | |
2bda0e17 KB |
14 | |
15 | #ifdef __GNUG__ | |
cafbad8f | 16 | #pragma interface "brush.h" |
2bda0e17 KB |
17 | #endif |
18 | ||
19 | #include "wx/gdicmn.h" | |
20 | #include "wx/gdiobj.h" | |
21 | #include "wx/bitmap.h" | |
22 | ||
23 | class WXDLLEXPORT wxBrush; | |
24 | ||
cafbad8f VZ |
25 | // ---------------------------------------------------------------------------- |
26 | // wxBrush | |
27 | // ---------------------------------------------------------------------------- | |
28 | ||
29 | class WXDLLEXPORT wxBrush : public wxGDIObject | |
2bda0e17 | 30 | { |
2bda0e17 | 31 | public: |
cafbad8f VZ |
32 | wxBrush(); |
33 | wxBrush(const wxColour& col, int style); | |
34 | wxBrush(const wxBitmap& stipple); | |
35 | wxBrush(const wxBrush& brush) { Ref(brush); } | |
36 | virtual ~wxBrush(); | |
2bda0e17 | 37 | |
cafbad8f VZ |
38 | virtual void SetColour(const wxColour& col); |
39 | virtual void SetColour(unsigned char r, unsigned char g, unsigned char b); | |
40 | virtual void SetStyle(int style); | |
41 | virtual void SetStipple(const wxBitmap& stipple); | |
2bda0e17 | 42 | |
cafbad8f VZ |
43 | wxBrush& operator=(const wxBrush& brush); |
44 | bool operator==(const wxBrush& brush) const; | |
45 | bool operator!=(const wxBrush& brush) const { return !(*this == brush); } | |
2bda0e17 | 46 | |
cafbad8f VZ |
47 | wxColour GetColour() const; |
48 | int GetStyle() const; | |
49 | wxBitmap *GetStipple() const; | |
2bda0e17 | 50 | |
cafbad8f | 51 | bool Ok() const { return m_refData != NULL; } |
2bda0e17 | 52 | |
cafbad8f VZ |
53 | // create (if necessary) and return the HBRUSH for this brush |
54 | WXHBRUSH GetResourceHandle() const; | |
2bda0e17 | 55 | |
cafbad8f VZ |
56 | protected: |
57 | virtual wxObjectRefData *CreateRefData() const; | |
58 | virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const; | |
2bda0e17 | 59 | |
cafbad8f VZ |
60 | private: |
61 | DECLARE_DYNAMIC_CLASS(wxBrush) | |
2bda0e17 KB |
62 | }; |
63 | ||
64 | #endif | |
bbcdf8bc | 65 | // _WX_BRUSH_H_ |