]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/cocoa/pen.h
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 WXDLLEXPORT wxColour
;
19 class WXDLLEXPORT wxBitmap
;
21 // ========================================================================
23 // ========================================================================
24 class WXDLLEXPORT wxPen
: public wxGDIObject
26 DECLARE_DYNAMIC_CLASS(wxPen
)
29 wxPen(const wxColour
& col
, int width
= 1, int style
= wxSOLID
);
30 wxPen(const wxBitmap
& stipple
, int width
);
31 wxPen(const wxPen
& pen
)
37 wxObjectRefData
*CreateRefData() const;
38 wxObjectRefData
*CloneRefData(const wxObjectRefData
*data
) const;
40 inline wxPen
& operator = (const wxPen
& pen
)
41 { if (*this == pen
) return (*this); Ref(pen
); return *this; }
42 inline bool operator == (const wxPen
& pen
)
43 { return m_refData
== pen
.m_refData
; }
44 inline bool operator != (const wxPen
& pen
)
45 { return m_refData
!= pen
.m_refData
; }
47 virtual bool Ok() const { return (m_refData
!= NULL
) ; }
49 void SetColour(const wxColour
& col
) ;
50 void SetColour(unsigned char r
, unsigned char g
, unsigned char b
) ;
52 void SetWidth(int width
);
53 void SetStyle(int style
);
54 void SetStipple(const wxBitmap
& stipple
);
55 void SetDashes(int nb_dashes
, const wxDash
*dash
);
56 void SetJoin(int join
);
59 wxColour
& GetColour() const;
64 int GetDashes(wxDash
**ptr
) const;
65 wxBitmap
*GetStipple() const;
67 WX_NSColor
GetNSColor();
68 int GetCocoaLineDash(const float **pattern
);
71 #endif // __WX_COCOA_PEN_H__