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