]>
Commit | Line | Data |
---|---|---|
1 | ///////////////////////////////////////////////////////////////////////////// | |
2 | // Name: wx/palmos/brush.h | |
3 | // Purpose: wxBrush class | |
4 | // Author: William Osborne | |
5 | // Modified by: | |
6 | // Created: 10/13/04 | |
7 | // RCS-ID: $Id: | |
8 | // Copyright: (c) William Osborne | |
9 | // Licence: wxWindows licence | |
10 | ///////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | #ifndef _WX_BRUSH_H_ | |
13 | #define _WX_BRUSH_H_ | |
14 | ||
15 | #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) | |
16 | #pragma interface "brush.h" | |
17 | #endif | |
18 | ||
19 | #include "wx/gdicmn.h" | |
20 | #include "wx/gdiobj.h" | |
21 | #include "wx/bitmap.h" | |
22 | ||
23 | class WXDLLEXPORT wxBrush; | |
24 | ||
25 | // ---------------------------------------------------------------------------- | |
26 | // wxBrush | |
27 | // ---------------------------------------------------------------------------- | |
28 | ||
29 | class WXDLLEXPORT wxBrush : public wxGDIObject | |
30 | { | |
31 | public: | |
32 | wxBrush(); | |
33 | wxBrush(const wxColour& col, int style = wxSOLID); | |
34 | wxBrush(const wxBitmap& stipple); | |
35 | wxBrush(const wxBrush& brush) { Ref(brush); } | |
36 | virtual ~wxBrush(); | |
37 | ||
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); | |
42 | ||
43 | wxBrush& operator=(const wxBrush& brush); | |
44 | bool operator==(const wxBrush& brush) const; | |
45 | bool operator!=(const wxBrush& brush) const { return !(*this == brush); } | |
46 | ||
47 | wxColour GetColour() const; | |
48 | int GetStyle() const; | |
49 | wxBitmap *GetStipple() const; | |
50 | ||
51 | bool Ok() const { return m_refData != NULL; } | |
52 | ||
53 | // return the HBRUSH for this brush | |
54 | virtual WXHANDLE GetResourceHandle() const; | |
55 | ||
56 | protected: | |
57 | virtual wxObjectRefData *CreateRefData() const; | |
58 | virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const; | |
59 | ||
60 | private: | |
61 | DECLARE_DYNAMIC_CLASS(wxBrush) | |
62 | }; | |
63 | ||
64 | #endif | |
65 | // _WX_BRUSH_H_ |