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