]>
Commit | Line | Data |
---|---|---|
c801d85f | 1 | ///////////////////////////////////////////////////////////////////////////// |
8ef94bfc | 2 | // Name: wx/gtk1/pen.h |
c801d85f KB |
3 | // Purpose: |
4 | // Author: Robert Roebling | |
58614078 | 5 | // Copyright: (c) 1998 Robert Roebling |
65571936 | 6 | // Licence: wxWindows licence |
c801d85f KB |
7 | ///////////////////////////////////////////////////////////////////////////// |
8 | ||
c801d85f KB |
9 | #ifndef __GTKPENH__ |
10 | #define __GTKPENH__ | |
11 | ||
c801d85f KB |
12 | #include "wx/defs.h" |
13 | #include "wx/object.h" | |
14 | #include "wx/string.h" | |
15 | #include "wx/gdiobj.h" | |
16 | #include "wx/gdicmn.h" | |
17 | ||
18 | //----------------------------------------------------------------------------- | |
19 | // classes | |
20 | //----------------------------------------------------------------------------- | |
21 | ||
b5dbe15d | 22 | class WXDLLIMPEXP_FWD_CORE wxPen; |
c801d85f | 23 | |
8ef94bfc | 24 | #if defined(__WXGTK127__) |
29e461a2 | 25 | typedef signed char wxGTKDash; |
2eca425d | 26 | #else |
29e461a2 | 27 | typedef char wxGTKDash; |
2eca425d | 28 | #endif |
112c5086 | 29 | |
c801d85f KB |
30 | //----------------------------------------------------------------------------- |
31 | // wxPen | |
32 | //----------------------------------------------------------------------------- | |
33 | ||
82cddbd9 | 34 | class WXDLLIMPEXP_CORE wxPen: public wxPenBase |
c801d85f | 35 | { |
20e05ffb | 36 | public: |
c89f5c02 | 37 | wxPen() { } |
46562151 | 38 | |
82cddbd9 | 39 | wxPen( const wxColour &colour, int width = 1, wxPenStyle style = wxPENSTYLE_SOLID ); |
ac3688c0 FM |
40 | #if FUTURE_WXWIN_COMPATIBILITY_3_0 |
41 | wxDEPRECATED_FUTURE( wxPen(const wxColour& col, int width, int style) ); | |
82cddbd9 FM |
42 | #endif |
43 | ||
8f884a0d VZ |
44 | bool operator==(const wxPen& pen) const; |
45 | bool operator!=(const wxPen& pen) const { return !(*this == pen); } | |
8bbe427f | 46 | |
c801d85f | 47 | void SetColour( const wxColour &colour ); |
1a1498c0 | 48 | void SetColour( unsigned char red, unsigned char green, unsigned char blue ); |
82cddbd9 FM |
49 | void SetCap( wxPenCap capStyle ); |
50 | void SetJoin( wxPenJoin joinStyle ); | |
51 | void SetStyle( wxPenStyle style ); | |
c801d85f | 52 | void SetWidth( int width ); |
112c5086 | 53 | void SetDashes( int number_of_dashes, const wxDash *dash ); |
1d57de48 | 54 | void SetStipple(const wxBitmap& stipple); |
46562151 | 55 | |
231b9591 | 56 | wxColour GetColour() const; |
82cddbd9 FM |
57 | wxPenCap GetCap() const; |
58 | wxPenJoin GetJoin() const; | |
59 | wxPenStyle GetStyle() const; | |
8bbe427f | 60 | int GetWidth() const; |
112c5086 RR |
61 | int GetDashes(wxDash **ptr) const; |
62 | int GetDashCount() const; | |
63 | wxDash* GetDash() const; | |
1d57de48 | 64 | wxBitmap *GetStipple() const; |
8bbe427f | 65 | |
bc735a68 VZ |
66 | #if FUTURE_WXWIN_COMPATIBILITY_3_0 |
67 | wxDEPRECATED_FUTURE( void SetStyle(int style) ) | |
68 | { SetStyle((wxPenStyle)style); } | |
69 | #endif | |
70 | ||
46562151 | 71 | private: |
8f884a0d VZ |
72 | virtual wxGDIRefData *CreateGDIRefData() const; |
73 | virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; | |
46562151 | 74 | |
20e05ffb | 75 | DECLARE_DYNAMIC_CLASS(wxPen) |
c801d85f KB |
76 | }; |
77 | ||
78 | #endif // __GTKPENH__ |