]> git.saurik.com Git - wxWidgets.git/blob - include/wx/mac/carbon/pen.h
don't leak wxImageList if wxHF_CONTENTS is not used in wxHtmlHelpWindow
[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 class WXDLLIMPEXP_FWD_CORE wxPen;
20
21 // Pen
22 class WXDLLEXPORT wxPen: public wxGDIObject
23 {
24 DECLARE_DYNAMIC_CLASS(wxPen)
25 public:
26 wxPen();
27 wxPen(const wxColour& col, int width = 1, int style = wxSOLID);
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(int style) ;
40 void SetStipple(const wxBitmap& stipple) ;
41 void SetDashes(int nb_dashes, const wxDash *dash) ;
42 void SetJoin(int join) ;
43 void SetCap(int cap) ;
44
45 wxColour& GetColour() const ;
46 int GetWidth() const;
47 int GetStyle() const;
48 int GetJoin() const;
49 int GetCap() const;
50 int GetDashes(wxDash **ptr) const;
51
52 wxBitmap *GetStipple() const ;
53
54 // Implementation
55
56 // Useful helper: create the brush resource
57 bool RealizeResource();
58
59 private:
60 void Unshare();
61 };
62
63 #endif
64 // _WX_PEN_H_