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