]> git.saurik.com Git - wxWidgets.git/blob - include/wx/cocoa/pen.h
Add wxActivateEvent::GetActivationReason().
[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 // Copyright: (c) 2003 David Elliott
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11 #ifndef __WX_COCOA_PEN_H__
12 #define __WX_COCOA_PEN_H__
13
14 #include "wx/gdiobj.h"
15 #include "wx/gdicmn.h"
16
17 class WXDLLIMPEXP_FWD_CORE wxColour;
18 class WXDLLIMPEXP_FWD_CORE wxBitmap;
19
20 // ========================================================================
21 // wxPen
22 // ========================================================================
23 class WXDLLIMPEXP_CORE wxPen: public wxGDIObject
24 {
25 public:
26 wxPen();
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) );
30 #endif
31 wxPen(const wxBitmap& stipple, int width);
32 virtual ~wxPen();
33
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); }
37
38 void SetColour(const wxColour& col) ;
39 void SetColour(unsigned char r, unsigned char g, unsigned char b) ;
40
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);
47
48 wxColour GetColour() const;
49 int GetWidth() const;
50 wxPenStyle GetStyle() const;
51 wxPenJoin GetJoin() const;
52 wxPenCap GetCap() const;
53 int GetDashes(wxDash **ptr) const;
54 wxBitmap *GetStipple() const;
55
56 #if FUTURE_WXWIN_COMPATIBILITY_3_0
57 wxDEPRECATED_FUTURE( void SetStyle(int style) )
58 { SetStyle((wxPenStyle)style); }
59 #endif
60
61 // Cocoa-specific
62 WX_NSColor GetNSColor();
63 int GetCocoaLineDash(const CGFloat **pattern);
64
65 protected:
66 wxGDIRefData *CreateGDIRefData() const;
67 wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
68
69 DECLARE_DYNAMIC_CLASS(wxPen)
70 };
71
72 #endif // __WX_COCOA_PEN_H__