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