]>
Commit | Line | Data |
---|---|---|
1 | ///////////////////////////////////////////////////////////////////////////// | |
2 | // Name: wx/cocoa/brush.h | |
3 | // Purpose: wxBrush class | |
4 | // Author: David Elliott <dfe@cox.net> | |
5 | // Modified by: | |
6 | // Created: 2003/07/03 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) 2003 David Elliott | |
9 | // Licence: wxWindows licence | |
10 | ///////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | #ifndef __WX_COCOA_BRUSH_H__ | |
13 | #define __WX_COCOA_BRUSH_H__ | |
14 | ||
15 | #include "wx/gdicmn.h" | |
16 | #include "wx/gdiobj.h" | |
17 | #include "wx/bitmap.h" | |
18 | ||
19 | class WXDLLIMPEXP_FWD_CORE wxBrush; | |
20 | ||
21 | // ======================================================================== | |
22 | // wxBrush | |
23 | // ======================================================================== | |
24 | class WXDLLEXPORT wxBrush: public wxBrushBase | |
25 | { | |
26 | DECLARE_DYNAMIC_CLASS(wxBrush) | |
27 | // ------------------------------------------------------------------------ | |
28 | // initialization | |
29 | // ------------------------------------------------------------------------ | |
30 | public: | |
31 | wxBrush(); | |
32 | wxBrush(const wxColour& col, int style = wxSOLID); | |
33 | wxBrush(const wxBitmap& stipple); | |
34 | virtual ~wxBrush(); | |
35 | ||
36 | // ------------------------------------------------------------------------ | |
37 | // Implementation | |
38 | // ------------------------------------------------------------------------ | |
39 | virtual void SetColour(const wxColour& col) ; | |
40 | virtual void SetColour(unsigned char r, unsigned char g, unsigned char b) ; | |
41 | virtual void SetStyle(int style) ; | |
42 | virtual void SetStipple(const wxBitmap& stipple) ; | |
43 | ||
44 | // comparison | |
45 | bool operator == (const wxBrush& brush) const | |
46 | { return m_refData == brush.m_refData; } | |
47 | bool operator != (const wxBrush& brush) const | |
48 | { return m_refData != brush.m_refData; } | |
49 | ||
50 | // accessors | |
51 | wxColour GetColour() const; | |
52 | virtual int GetStyle() const; | |
53 | wxBitmap *GetStipple() const; | |
54 | ||
55 | // wxCocoa | |
56 | WX_NSColor GetNSColor(); | |
57 | ||
58 | protected: | |
59 | wxGDIRefData *CreateGDIRefData() const; | |
60 | wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; | |
61 | }; | |
62 | ||
63 | #endif // __WX_COCOA_BRUSH_H__ |