]> git.saurik.com Git - wxWidgets.git/blob - include/wx/osx/pen.h
Add wxDEPRECATED_MSG() and use it in a couple of places.
[wxWidgets.git] / include / wx / osx / pen.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/osx/pen.h
3 // Purpose: wxPen class
4 // Author: Stefan Csomor
5 // Modified by:
6 // Created: 1998-01-01
7 // Copyright: (c) Stefan Csomor
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11 #ifndef _WX_PEN_H_
12 #define _WX_PEN_H_
13
14 #include "wx/gdiobj.h"
15 #include "wx/colour.h"
16 #include "wx/bitmap.h"
17
18 // Pen
19 class WXDLLIMPEXP_CORE wxPen : public wxPenBase
20 {
21 public:
22 wxPen();
23 wxPen(const wxColour& col, int width = 1, wxPenStyle style = wxPENSTYLE_SOLID);
24 #if FUTURE_WXWIN_COMPATIBILITY_3_0
25 wxDEPRECATED_FUTURE( wxPen(const wxColour& col, int width, int style) );
26 #endif
27
28 wxPen(const wxBitmap& stipple, int width);
29 virtual ~wxPen();
30
31 bool operator==(const wxPen& pen) const;
32 bool operator!=(const wxPen& pen) const { return !(*this == pen); }
33
34 // Override in order to recreate the pen
35 void SetColour(const wxColour& col) ;
36 void SetColour(unsigned char r, unsigned char g, unsigned char b) ;
37
38 void SetWidth(int width) ;
39 void SetStyle(wxPenStyle style) ;
40 void SetStipple(const wxBitmap& stipple) ;
41 void SetDashes(int nb_dashes, const wxDash *dash) ;
42 void SetJoin(wxPenJoin join) ;
43 void SetCap(wxPenCap cap) ;
44
45 wxColour GetColour() const ;
46 int GetWidth() const;
47 wxPenStyle GetStyle() const;
48 wxPenJoin GetJoin() const;
49 wxPenCap GetCap() const;
50 int GetDashes(wxDash **ptr) const;
51 int GetDashCount() const;
52
53 wxBitmap *GetStipple() const ;
54
55 #if FUTURE_WXWIN_COMPATIBILITY_3_0
56 wxDEPRECATED_FUTURE( void SetStyle(int style) )
57 { SetStyle((wxPenStyle)style); }
58 #endif
59
60 // Implementation
61
62 // Useful helper: create the brush resource
63 bool RealizeResource();
64
65 protected:
66 virtual wxGDIRefData *CreateGDIRefData() const;
67 virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
68
69 private:
70 void Unshare();
71
72 DECLARE_DYNAMIC_CLASS(wxPen)
73 };
74
75 #endif
76 // _WX_PEN_H_