1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/cocoa/pen.h
3 // Purpose: wxPen class
4 // Author: David Elliott
6 // Created: 2003/08/02 (stubs from 22.03.2003)
7 // Copyright: (c) 2003 David Elliott
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #ifndef __WX_COCOA_PEN_H__
12 #define __WX_COCOA_PEN_H__
14 #include "wx/gdiobj.h"
15 #include "wx/gdicmn.h"
17 class WXDLLIMPEXP_FWD_CORE wxColour
;
18 class WXDLLIMPEXP_FWD_CORE wxBitmap
;
20 // ========================================================================
22 // ========================================================================
23 class WXDLLIMPEXP_CORE wxPen
: public wxGDIObject
27 wxPen(const wxColour
& col
, int width
= 1, wxPenStyle style
= wxPENSTYLE_SOLID
);
28 #if FUTURE_WXWIN_COMPATIBILITY_3_0
29 wxDEPRECATED_FUTURE( wxPen(const wxColour
& col
, int width
, int style
) );
31 wxPen(const wxBitmap
& stipple
, int width
);
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
); }
38 void SetColour(const wxColour
& col
) ;
39 void SetColour(unsigned char r
, unsigned char g
, unsigned char b
) ;
41 void SetWidth(int width
);
42 void SetStyle(wxPenStyle style
);
43 void SetStipple(const wxBitmap
& stipple
);
44 void SetDashes(int nb_dashes
, const wxDash
*dash
);
45 void SetJoin(wxPenJoin join
);
46 void SetCap(wxPenCap cap
);
48 wxColour
GetColour() const;
50 wxPenStyle
GetStyle() const;
51 wxPenJoin
GetJoin() const;
52 wxPenCap
GetCap() const;
53 int GetDashes(wxDash
**ptr
) const;
54 wxBitmap
*GetStipple() const;
56 #if FUTURE_WXWIN_COMPATIBILITY_3_0
57 wxDEPRECATED_FUTURE( void SetStyle(int style
) )
58 { SetStyle((wxPenStyle
)style
); }
62 WX_NSColor
GetNSColor();
63 int GetCocoaLineDash(const CGFloat
**pattern
);
66 wxGDIRefData
*CreateGDIRefData() const;
67 wxGDIRefData
*CloneGDIRefData(const wxGDIRefData
*data
) const;
69 DECLARE_DYNAMIC_CLASS(wxPen
)
72 #endif // __WX_COCOA_PEN_H__