]>
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 | // Copyright: (c) 2003 David Elliott | |
8 | // Licence: wxWindows licence | |
9 | ///////////////////////////////////////////////////////////////////////////// | |
10 | ||
11 | #ifndef __WX_COCOA_BRUSH_H__ | |
12 | #define __WX_COCOA_BRUSH_H__ | |
13 | ||
14 | #include "wx/gdicmn.h" | |
15 | #include "wx/gdiobj.h" | |
16 | #include "wx/bitmap.h" | |
17 | ||
18 | class WXDLLIMPEXP_FWD_CORE wxBrush; | |
19 | ||
20 | // ======================================================================== | |
21 | // wxBrush | |
22 | // ======================================================================== | |
23 | class WXDLLIMPEXP_CORE wxBrush: public wxBrushBase | |
24 | { | |
25 | DECLARE_DYNAMIC_CLASS(wxBrush) | |
26 | // ------------------------------------------------------------------------ | |
27 | // initialization | |
28 | // ------------------------------------------------------------------------ | |
29 | public: | |
30 | wxBrush(); | |
31 | wxBrush(const wxColour& col, wxBrushStyle style = wxBRUSHSTYLE_SOLID); | |
32 | #if FUTURE_WXWIN_COMPATIBILITY_3_0 | |
33 | wxDEPRECATED_FUTURE( wxBrush(const wxColour& col, int style) ); | |
34 | #endif | |
35 | wxBrush(const wxBitmap& stipple); | |
36 | virtual ~wxBrush(); | |
37 | ||
38 | // ------------------------------------------------------------------------ | |
39 | // Implementation | |
40 | // ------------------------------------------------------------------------ | |
41 | virtual void SetColour(const wxColour& col) ; | |
42 | virtual void SetColour(unsigned char r, unsigned char g, unsigned char b) ; | |
43 | virtual void SetStyle(wxBrushStyle style) ; | |
44 | virtual void SetStipple(const wxBitmap& stipple) ; | |
45 | ||
46 | // comparison | |
47 | bool operator == (const wxBrush& brush) const | |
48 | { return m_refData == brush.m_refData; } | |
49 | bool operator != (const wxBrush& brush) const | |
50 | { return m_refData != brush.m_refData; } | |
51 | ||
52 | // accessors | |
53 | wxColour GetColour() const; | |
54 | virtual wxBrushStyle GetStyle() const; | |
55 | wxBitmap *GetStipple() const; | |
56 | ||
57 | #if FUTURE_WXWIN_COMPATIBILITY_3_0 | |
58 | wxDEPRECATED_FUTURE( void SetStyle(int style) ) | |
59 | { SetStyle((wxBrushStyle)style); } | |
60 | #endif | |
61 | ||
62 | // wxCocoa | |
63 | WX_NSColor GetNSColor(); | |
64 | ||
65 | protected: | |
66 | wxGDIRefData *CreateGDIRefData() const; | |
67 | wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; | |
68 | }; | |
69 | ||
70 | #endif // __WX_COCOA_BRUSH_H__ |