]>
Commit | Line | Data |
---|---|---|
a24aff65 | 1 | ///////////////////////////////////////////////////////////////////////////// |
cfbef359 | 2 | // Name: wx/cocoa/pen.h |
a24aff65 | 3 | // Purpose: wxPen class |
cfbef359 | 4 | // Author: David Elliott |
a24aff65 | 5 | // Modified by: |
8e517013 | 6 | // Created: 2003/08/02 (stubs from 22.03.2003) |
cfbef359 | 7 | // Copyright: (c) 2003 David Elliott |
46562151 | 8 | // Licence: wxWindows licence |
a24aff65 DE |
9 | ///////////////////////////////////////////////////////////////////////////// |
10 | ||
8e517013 DE |
11 | #ifndef __WX_COCOA_PEN_H__ |
12 | #define __WX_COCOA_PEN_H__ | |
a24aff65 DE |
13 | |
14 | #include "wx/gdiobj.h" | |
8e517013 | 15 | #include "wx/gdicmn.h" |
a24aff65 | 16 | |
b5dbe15d VS |
17 | class WXDLLIMPEXP_FWD_CORE wxColour; |
18 | class WXDLLIMPEXP_FWD_CORE wxBitmap; | |
a24aff65 | 19 | |
8e517013 DE |
20 | // ======================================================================== |
21 | // wxPen | |
22 | // ======================================================================== | |
53a2db12 | 23 | class WXDLLIMPEXP_CORE wxPen: public wxGDIObject |
a24aff65 | 24 | { |
a24aff65 | 25 | public: |
8e517013 | 26 | wxPen(); |
82cddbd9 | 27 | wxPen(const wxColour& col, int width = 1, wxPenStyle style = wxPENSTYLE_SOLID); |
ac3688c0 FM |
28 | #if FUTURE_WXWIN_COMPATIBILITY_3_0 |
29 | wxDEPRECATED_FUTURE( wxPen(const wxColour& col, int width, int style) ); | |
82cddbd9 | 30 | #endif |
8e517013 | 31 | wxPen(const wxBitmap& stipple, int width); |
d3c7fc99 | 32 | virtual ~wxPen(); |
8e517013 | 33 | |
8f884a0d VZ |
34 | // FIXME: operator==() is wrong |
35 | bool operator==(const wxPen& pen) const { return m_refData == pen.m_refData; } | |
36 | bool operator!=(const wxPen& pen) const { return !(*this == pen); } | |
8e517013 DE |
37 | |
38 | void SetColour(const wxColour& col) ; | |
1a1498c0 | 39 | void SetColour(unsigned char r, unsigned char g, unsigned char b) ; |
8e517013 DE |
40 | |
41 | void SetWidth(int width); | |
82cddbd9 | 42 | void SetStyle(wxPenStyle style); |
8e517013 DE |
43 | void SetStipple(const wxBitmap& stipple); |
44 | void SetDashes(int nb_dashes, const wxDash *dash); | |
82cddbd9 FM |
45 | void SetJoin(wxPenJoin join); |
46 | void SetCap(wxPenCap cap); | |
8e517013 | 47 | |
231b9591 | 48 | wxColour GetColour() const; |
8e517013 | 49 | int GetWidth() const; |
82cddbd9 FM |
50 | wxPenStyle GetStyle() const; |
51 | wxPenJoin GetJoin() const; | |
52 | wxPenCap GetCap() const; | |
8e517013 DE |
53 | int GetDashes(wxDash **ptr) const; |
54 | wxBitmap *GetStipple() const; | |
55 | ||
bc735a68 VZ |
56 | #if FUTURE_WXWIN_COMPATIBILITY_3_0 |
57 | wxDEPRECATED_FUTURE( void SetStyle(int style) ) | |
58 | { SetStyle((wxPenStyle)style); } | |
59 | #endif | |
60 | ||
61 | // Cocoa-specific | |
8e517013 | 62 | WX_NSColor GetNSColor(); |
4799f3ba | 63 | int GetCocoaLineDash(const CGFloat **pattern); |
8f884a0d VZ |
64 | |
65 | protected: | |
66 | wxGDIRefData *CreateGDIRefData() const; | |
67 | wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; | |
68 | ||
69 | DECLARE_DYNAMIC_CLASS(wxPen) | |
a24aff65 DE |
70 | }; |
71 | ||
8e517013 | 72 | #endif // __WX_COCOA_PEN_H__ |