]>
Commit | Line | Data |
---|---|---|
83df96d6 | 1 | ///////////////////////////////////////////////////////////////////////////// |
46562151 | 2 | // Name: wx/x11/pen.h |
83df96d6 JS |
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 | |
46562151 | 9 | // Licence: wxWindows licence |
83df96d6 JS |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
12 | #ifndef _WX_PEN_H_ | |
13 | #define _WX_PEN_H_ | |
14 | ||
69c44812 | 15 | #include "wx/gdicmn.h" |
83df96d6 | 16 | #include "wx/gdiobj.h" |
83df96d6 | 17 | |
74dc5eb6 RR |
18 | //----------------------------------------------------------------------------- |
19 | // classes | |
20 | //----------------------------------------------------------------------------- | |
83df96d6 | 21 | |
b5dbe15d VS |
22 | class WXDLLIMPEXP_FWD_CORE wxPen; |
23 | class WXDLLIMPEXP_FWD_CORE wxColour; | |
24 | class WXDLLIMPEXP_FWD_CORE wxBitmap; | |
83df96d6 | 25 | |
74dc5eb6 | 26 | typedef char wxX11Dash; |
83df96d6 | 27 | |
74dc5eb6 RR |
28 | //----------------------------------------------------------------------------- |
29 | // wxPen | |
30 | //----------------------------------------------------------------------------- | |
83df96d6 | 31 | |
82cddbd9 | 32 | class WXDLLIMPEXP_CORE wxPen: public wxPenBase |
83df96d6 | 33 | { |
83df96d6 | 34 | public: |
74dc5eb6 | 35 | wxPen() { } |
46562151 | 36 | |
82cddbd9 | 37 | wxPen( const wxColour &colour, int width = 1, wxPenStyle style = wxPENSTYLE_SOLID ); |
ac3688c0 FM |
38 | #if FUTURE_WXWIN_COMPATIBILITY_3_0 |
39 | wxDEPRECATED_FUTURE( wxPen(const wxColour& col, int width, int style) ); | |
82cddbd9 FM |
40 | #endif |
41 | ||
69c44812 | 42 | wxPen( const wxBitmap &stipple, int width ); |
d3c7fc99 | 43 | virtual ~wxPen(); |
46562151 | 44 | |
74dc5eb6 RR |
45 | bool operator == ( const wxPen& pen ) const; |
46 | bool operator != (const wxPen& pen) const { return !(*this == pen); } | |
47 | ||
48 | void SetColour( const wxColour &colour ); | |
1a1498c0 | 49 | void SetColour( unsigned char red, unsigned char green, unsigned char blue ); |
82cddbd9 FM |
50 | void SetCap( wxPenCap capStyle ); |
51 | void SetJoin( wxPenJoin joinStyle ); | |
52 | void SetStyle( wxPenStyle style ); | |
74dc5eb6 RR |
53 | void SetWidth( int width ); |
54 | void SetDashes( int number_of_dashes, const wxDash *dash ); | |
2051c39f | 55 | void SetStipple( const wxBitmap& stipple ); |
69c44812 | 56 | |
231b9591 | 57 | wxColour GetColour() const; |
82cddbd9 FM |
58 | wxPenCap GetCap() const; |
59 | wxPenJoin GetJoin() const; | |
60 | wxPenStyle GetStyle() const; | |
74dc5eb6 RR |
61 | int GetWidth() const; |
62 | int GetDashes(wxDash **ptr) const; | |
63 | int GetDashCount() const; | |
64 | wxDash* GetDash() const; | |
69c44812 | 65 | wxBitmap* GetStipple() const; |
74dc5eb6 | 66 | |
6f02a879 | 67 | protected: |
8f884a0d VZ |
68 | virtual wxGDIRefData *CreateGDIRefData() const; |
69 | virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; | |
46562151 | 70 | |
74dc5eb6 | 71 | DECLARE_DYNAMIC_CLASS(wxPen) |
83df96d6 JS |
72 | }; |
73 | ||
8f884a0d | 74 | #endif // _WX_PEN_H_ |