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