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)
8 // Copyright: (c) 2003 David Elliott
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef __WX_COCOA_PEN_H__
13 #define __WX_COCOA_PEN_H__
15 #include "wx/gdiobj.h"
16 #include "wx/gdicmn.h"
18 class WXDLLIMPEXP_FWD_CORE wxColour
;
19 class WXDLLIMPEXP_FWD_CORE wxBitmap
;
21 // ========================================================================
23 // ========================================================================
24 class WXDLLEXPORT wxPen
: public wxGDIObject
28 wxPen(const wxColour
& col
, int width
= 1, int style
= wxSOLID
);
29 wxPen(const wxBitmap
& stipple
, int width
);
32 // FIXME: operator==() is wrong
33 bool operator==(const wxPen
& pen
) const { return m_refData
== pen
.m_refData
; }
34 bool operator!=(const wxPen
& pen
) const { return !(*this == pen
); }
36 void SetColour(const wxColour
& col
) ;
37 void SetColour(unsigned char r
, unsigned char g
, unsigned char b
) ;
39 void SetWidth(int width
);
40 void SetStyle(int style
);
41 void SetStipple(const wxBitmap
& stipple
);
42 void SetDashes(int nb_dashes
, const wxDash
*dash
);
43 void SetJoin(int join
);
46 wxColour
& GetColour() const;
51 int GetDashes(wxDash
**ptr
) const;
52 wxBitmap
*GetStipple() const;
54 WX_NSColor
GetNSColor();
55 int GetCocoaLineDash(const CGFloat
**pattern
);
58 wxGDIRefData
*CreateGDIRefData() const;
59 wxGDIRefData
*CloneGDIRefData(const wxGDIRefData
*data
) const;
61 DECLARE_DYNAMIC_CLASS(wxPen
)
64 #endif // __WX_COCOA_PEN_H__