]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/pen.h
separated wxDash type from platform specific wxGTKDash type
[wxWidgets.git] / include / wx / gtk / pen.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: pen.h
3 // Purpose:
4 // Author: Robert Roebling
5 // Id: $Id$
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
9
10
11 #ifndef __GTKPENH__
12 #define __GTKPENH__
13
14 #ifdef __GNUG__
15 #pragma interface
16 #endif
17
18 #include "wx/defs.h"
19 #include "wx/object.h"
20 #include "wx/string.h"
21 #include "wx/gdiobj.h"
22 #include "wx/gdicmn.h"
23
24 #include <gtk/gtk.h>
25
26 //-----------------------------------------------------------------------------
27 // classes
28 //-----------------------------------------------------------------------------
29
30 class wxPen;
31
32 typedef wxInt8 wxDash;
33
34 #if GTK_CHECK_VERSION(1,2,7)
35 typedef gint8 wxGTKDash;
36 #else
37 typedef gchar wxGTKDash;
38 #endif
39
40 //-----------------------------------------------------------------------------
41 // wxPen
42 //-----------------------------------------------------------------------------
43
44 class wxPen: public wxGDIObject
45 {
46 public:
47 wxPen();
48 wxPen( const wxColour &colour, int width, int style );
49 wxPen( const wxPen& pen );
50 ~wxPen();
51 wxPen& operator = ( const wxPen& pen );
52 bool operator == ( const wxPen& pen );
53 bool operator != ( const wxPen& pen );
54
55 void SetColour( const wxColour &colour );
56 void SetColour( int red, int green, int blue );
57 void SetCap( int capStyle );
58 void SetJoin( int joinStyle );
59 void SetStyle( int style );
60 void SetWidth( int width );
61 void SetDashes( int number_of_dashes, const wxDash *dash );
62
63 wxColour &GetColour() const;
64 int GetCap() const;
65 int GetJoin() const;
66 int GetStyle() const;
67 int GetWidth() const;
68 int GetDashes(wxDash **ptr) const;
69 int GetDashCount() const;
70 wxDash* GetDash() const;
71
72 bool Ok() const;
73
74 void Unshare();
75
76 private:
77 DECLARE_DYNAMIC_CLASS(wxPen)
78 };
79
80 #endif // __GTKPENH__