]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk1/pen.h
simplify wxEVT_MENU_OPEN/CLOSE generation
[wxWidgets.git] / include / wx / gtk1 / pen.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk1/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_FWD_CORE wxPen;
24
25 #if defined(__WXGTK127__)
26 typedef gint8 wxGTKDash;
27 #else
28 typedef gchar wxGTKDash;
29 #endif
30
31 //-----------------------------------------------------------------------------
32 // wxPen
33 //-----------------------------------------------------------------------------
34
35 class WXDLLIMPEXP_CORE wxPen: public wxPenBase
36 {
37 public:
38 wxPen() { }
39
40 wxPen( const wxColour &colour, int width = 1, wxPenStyle style = wxPENSTYLE_SOLID );
41 #if WXWIN_COMPATIBILITY_2_8
42 wxDEPRECATED( wxPen(const wxColour& col, int width, wxBrushStyle style) );
43 #endif
44
45 virtual ~wxPen();
46
47 bool operator==(const wxPen& pen) const;
48 bool operator!=(const wxPen& pen) const { return !(*this == pen); }
49
50 void SetColour( const wxColour &colour );
51 void SetColour( unsigned char red, unsigned char green, unsigned char blue );
52 void SetCap( wxPenCap capStyle );
53 void SetJoin( wxPenJoin joinStyle );
54 void SetStyle( wxPenStyle style );
55 void SetWidth( int width );
56 void SetDashes( int number_of_dashes, const wxDash *dash );
57
58 wxColour &GetColour() const;
59 wxPenCap GetCap() const;
60 wxPenJoin GetJoin() const;
61 wxPenStyle GetStyle() const;
62 int GetWidth() const;
63 int GetDashes(wxDash **ptr) const;
64 int GetDashCount() const;
65 wxDash* GetDash() const;
66
67 private:
68 virtual wxGDIRefData *CreateGDIRefData() const;
69 virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
70
71 DECLARE_DYNAMIC_CLASS(wxPen)
72 };
73
74 #endif // __GTKPENH__