1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
5 // Copyright: (c) 1998 Robert Roebling
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
13 #include "wx/object.h"
14 #include "wx/string.h"
15 #include "wx/gdiobj.h"
16 #include "wx/gdicmn.h"
18 //-----------------------------------------------------------------------------
20 //-----------------------------------------------------------------------------
22 class WXDLLIMPEXP_FWD_CORE wxPen
;
24 #if defined(__WXGTK127__)
25 typedef signed char wxGTKDash
;
27 typedef char wxGTKDash
;
30 //-----------------------------------------------------------------------------
32 //-----------------------------------------------------------------------------
34 class WXDLLIMPEXP_CORE wxPen
: public wxPenBase
39 wxPen( const wxColour
&colour
, int width
= 1, wxPenStyle style
= wxPENSTYLE_SOLID
);
40 #if FUTURE_WXWIN_COMPATIBILITY_3_0
41 wxDEPRECATED_FUTURE( wxPen(const wxColour
& col
, int width
, int style
) );
44 bool operator==(const wxPen
& pen
) const;
45 bool operator!=(const wxPen
& pen
) const { return !(*this == pen
); }
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
);
56 wxColour
GetColour() const;
57 wxPenCap
GetCap() const;
58 wxPenJoin
GetJoin() const;
59 wxPenStyle
GetStyle() const;
61 int GetDashes(wxDash
**ptr
) const;
62 int GetDashCount() const;
63 wxDash
* GetDash() const;
64 wxBitmap
*GetStipple() const;
66 #if FUTURE_WXWIN_COMPATIBILITY_3_0
67 wxDEPRECATED_FUTURE( void SetStyle(int style
) )
68 { SetStyle((wxPenStyle
)style
); }
72 virtual wxGDIRefData
*CreateGDIRefData() const;
73 virtual wxGDIRefData
*CloneGDIRefData(const wxGDIRefData
*data
) const;
75 DECLARE_DYNAMIC_CLASS(wxPen
)