]> git.saurik.com Git - wxWidgets.git/blob - include/wx/x11/pen.h
translate "Copy URL" string in the popup menu (feature request 1803958) (should have...
[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 wxGDIObject
33 {
34 public:
35 wxPen() { }
36
37 wxPen( const wxColour &colour, int width = 1, int style = wxSOLID );
38 wxPen( const wxBitmap &stipple, int width );
39 virtual ~wxPen();
40
41 bool operator == ( const wxPen& pen ) const;
42 bool operator != (const wxPen& pen) const { return !(*this == pen); }
43
44 void SetColour( const wxColour &colour );
45 void SetColour( unsigned char red, unsigned char green, unsigned char blue );
46 void SetCap( int capStyle );
47 void SetJoin( int joinStyle );
48 void SetStyle( int style );
49 void SetWidth( int width );
50 void SetDashes( int number_of_dashes, const wxDash *dash );
51 void SetStipple( wxBitmap *stipple );
52
53 wxColour &GetColour() const;
54 int GetCap() const;
55 int GetJoin() const;
56 int GetStyle() const;
57 int GetWidth() const;
58 int GetDashes(wxDash **ptr) const;
59 int GetDashCount() const;
60 wxDash* GetDash() const;
61 wxBitmap* GetStipple() const;
62
63 protected:
64 virtual wxGDIRefData *CreateGDIRefData() const;
65 virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
66
67 DECLARE_DYNAMIC_CLASS(wxPen)
68 };
69
70 #endif // _WX_PEN_H_