]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk1/pen.h
removed wxABI_VERSION checks
[wxWidgets.git] / include / wx / gtk1 / 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 __GTKPENH__
11 #define __GTKPENH__
12
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
23 class WXDLLIMPEXP_CORE wxPen;
24
25 #if defined(__WXGTK127__) || defined(__WXGTK20__)
26 typedef gint8 wxGTKDash;
27 #else
28 typedef gchar wxGTKDash;
29 #endif
30
31 //-----------------------------------------------------------------------------
32 // wxPen
33 //-----------------------------------------------------------------------------
34
35 class WXDLLIMPEXP_CORE wxPen: public wxGDIObject
36 {
37 public:
38 wxPen() { }
39
40 wxPen( const wxColour &colour, int width = 1, int style = wxSOLID );
41 ~wxPen();
42
43 wxPen( const wxPen& pen )
44 : wxGDIObject()
45 { Ref(pen); }
46 wxPen& operator = ( const wxPen& pen ) { Ref(pen); return *this; }
47
48 bool Ok() const { return m_refData != NULL; }
49
50 bool operator == ( const wxPen& pen ) const;
51 bool operator != (const wxPen& pen) const { return !(*this == pen); }
52
53 void SetColour( const wxColour &colour );
54 void SetColour( int red, int green, int blue );
55 void SetCap( int capStyle );
56 void SetJoin( int joinStyle );
57 void SetStyle( int style );
58 void SetWidth( int width );
59 void SetDashes( int number_of_dashes, const wxDash *dash );
60
61 wxColour &GetColour() const;
62 int GetCap() const;
63 int GetJoin() const;
64 int GetStyle() const;
65 int GetWidth() const;
66 int GetDashes(wxDash **ptr) const;
67 int GetDashCount() const;
68 wxDash* GetDash() const;
69
70 private:
71 // ref counting code
72 virtual wxObjectRefData *CreateRefData() const;
73 virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;
74
75 DECLARE_DYNAMIC_CLASS(wxPen)
76 };
77
78 #endif // __GTKPENH__