]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk1/pen.h
Add wxActivateEvent::GetActivationReason().
[wxWidgets.git] / include / wx / gtk1 / pen.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk1/pen.h
3 // Purpose:
4 // Author: Robert Roebling
5 // Copyright: (c) 1998 Robert Roebling
6 // Licence: wxWindows licence
7 /////////////////////////////////////////////////////////////////////////////
8
9 #ifndef __GTKPENH__
10 #define __GTKPENH__
11
12 #include "wx/defs.h"
13 #include "wx/object.h"
14 #include "wx/string.h"
15 #include "wx/gdiobj.h"
16 #include "wx/gdicmn.h"
17
18 //-----------------------------------------------------------------------------
19 // classes
20 //-----------------------------------------------------------------------------
21
22 class WXDLLIMPEXP_FWD_CORE wxPen;
23
24 #if defined(__WXGTK127__)
25 typedef signed char wxGTKDash;
26 #else
27 typedef char wxGTKDash;
28 #endif
29
30 //-----------------------------------------------------------------------------
31 // wxPen
32 //-----------------------------------------------------------------------------
33
34 class WXDLLIMPEXP_CORE wxPen: public wxPenBase
35 {
36 public:
37 wxPen() { }
38
39 wxPen( const wxColour &colour, int width = 1, wxPenStyle style = wxPENSTYLE_SOLID );
40 #if FUTURE_WXWIN_COMPATIBILITY_3_0
41 wxDEPRECATED_FUTURE( wxPen(const wxColour& col, int width, int style) );
42 #endif
43
44 bool operator==(const wxPen& pen) const;
45 bool operator!=(const wxPen& pen) const { return !(*this == pen); }
46
47 void SetColour( const wxColour &colour );
48 void SetColour( unsigned char red, unsigned char green, unsigned char blue );
49 void SetCap( wxPenCap capStyle );
50 void SetJoin( wxPenJoin joinStyle );
51 void SetStyle( wxPenStyle style );
52 void SetWidth( int width );
53 void SetDashes( int number_of_dashes, const wxDash *dash );
54 void SetStipple(const wxBitmap& stipple);
55
56 wxColour GetColour() const;
57 wxPenCap GetCap() const;
58 wxPenJoin GetJoin() const;
59 wxPenStyle GetStyle() const;
60 int GetWidth() const;
61 int GetDashes(wxDash **ptr) const;
62 int GetDashCount() const;
63 wxDash* GetDash() const;
64 wxBitmap *GetStipple() const;
65
66 #if FUTURE_WXWIN_COMPATIBILITY_3_0
67 wxDEPRECATED_FUTURE( void SetStyle(int style) )
68 { SetStyle((wxPenStyle)style); }
69 #endif
70
71 private:
72 virtual wxGDIRefData *CreateGDIRefData() const;
73 virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
74
75 DECLARE_DYNAMIC_CLASS(wxPen)
76 };
77
78 #endif // __GTKPENH__