]> git.saurik.com Git - wxWidgets.git/blob - include/wx/x11/pen.h
undo accidental change of r57233
[wxWidgets.git] / include / wx / x11 / pen.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/x11/pen.h
3 // Purpose: wxPen class
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 17/09/98
7 // RCS-ID: $Id$
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_PEN_H_
13 #define _WX_PEN_H_
14
15 #include "wx/gdicmn.h"
16 #include "wx/gdiobj.h"
17
18 //-----------------------------------------------------------------------------
19 // classes
20 //-----------------------------------------------------------------------------
21
22 class WXDLLIMPEXP_FWD_CORE wxPen;
23 class WXDLLIMPEXP_FWD_CORE wxColour;
24 class WXDLLIMPEXP_FWD_CORE wxBitmap;
25
26 typedef char wxX11Dash;
27
28 //-----------------------------------------------------------------------------
29 // wxPen
30 //-----------------------------------------------------------------------------
31
32 class WXDLLIMPEXP_CORE wxPen: public wxPenBase
33 {
34 public:
35 wxPen() { }
36
37 wxPen( const wxColour &colour, int width = 1, wxPenStyle style = wxPENSTYLE_SOLID );
38 #if FUTURE_WXWIN_COMPATIBILITY_3_0
39 wxDEPRECATED_FUTURE( wxPen(const wxColour& col, int width, int style) );
40 #endif
41
42 wxPen( const wxBitmap &stipple, int width );
43 virtual ~wxPen();
44
45 bool operator == ( const wxPen& pen ) const;
46 bool operator != (const wxPen& pen) const { return !(*this == pen); }
47
48 void SetColour( const wxColour &colour );
49 void SetColour( unsigned char red, unsigned char green, unsigned char blue );
50 void SetCap( wxPenCap capStyle );
51 void SetJoin( wxPenJoin joinStyle );
52 void SetStyle( wxPenStyle style );
53 void SetWidth( int width );
54 void SetDashes( int number_of_dashes, const wxDash *dash );
55 void SetStipple( const wxBitmap& stipple );
56
57 wxColour GetColour() const;
58 wxPenCap GetCap() const;
59 wxPenJoin GetJoin() const;
60 wxPenStyle GetStyle() const;
61 int GetWidth() const;
62 int GetDashes(wxDash **ptr) const;
63 int GetDashCount() const;
64 wxDash* GetDash() const;
65 wxBitmap* GetStipple() const;
66
67 #if FUTURE_WXWIN_COMPATIBILITY_3_0
68 wxDEPRECATED_FUTURE( void SetStyle(int style) )
69 { SetStyle((wxPenStyle)style); }
70 #endif
71
72 protected:
73 virtual wxGDIRefData *CreateGDIRefData() const;
74 virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
75
76 DECLARE_DYNAMIC_CLASS(wxPen)
77 };
78
79 #endif // _WX_PEN_H_