]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/pen.h
fix also wxPen to use wxPenStyle,wxPenJoin,wxPenCap enums instead of plain int; remov...
[wxWidgets.git] / include / wx / gtk / pen.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk/pen.h
3 // Purpose:
4 // Author: Robert Roebling
5 // Id: $Id$
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
9
10 #ifndef _WX_GTK_PEN_H_
11 #define _WX_GTK_PEN_H_
12
13 #include "wx/gdiobj.h"
14 #include "wx/gdicmn.h"
15
16 typedef gint8 wxGTKDash;
17
18 //-----------------------------------------------------------------------------
19 // wxPen
20 //-----------------------------------------------------------------------------
21
22 class WXDLLIMPEXP_CORE wxPen: public wxPenBase
23 {
24 public:
25 wxPen() { }
26
27 wxPen( const wxColour &colour, int width = 1, wxPenStyle style = wxPENSTYLE_SOLID );
28 #if WXWIN_COMPATIBILITY_2_8
29 wxDEPRECATED( wxPen(const wxColour& col, int width, wxBrushStyle style) );
30 #endif
31
32 virtual ~wxPen();
33
34 bool operator==(const wxPen& pen) const;
35 bool operator!=(const wxPen& pen) const { return !(*this == pen); }
36
37 void SetColour( const wxColour &colour );
38 void SetColour( unsigned char red, unsigned char green, unsigned char blue );
39 void SetCap( wxPenCap capStyle );
40 void SetJoin( wxPenJoin joinStyle );
41 void SetStyle( wxPenStyle style );
42 void SetWidth( int width );
43 void SetDashes( int number_of_dashes, const wxDash *dash );
44 void SetStipple(const wxBitmap& stipple);
45
46 wxColour &GetColour() const;
47 wxPenCap GetCap() const;
48 wxPenJoin GetJoin() const;
49 wxPenStyle GetStyle() const;
50 int GetWidth() const;
51 int GetDashes(wxDash **ptr) const;
52 int GetDashCount() const;
53 wxDash* GetDash() const;
54 wxBitmap *GetStipple() const;
55
56 protected:
57 virtual wxGDIRefData *CreateGDIRefData() const;
58 virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
59
60 DECLARE_DYNAMIC_CLASS(wxPen)
61 };
62
63 #endif // _WX_GTK_PEN_H_