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