]> git.saurik.com Git - wxWidgets.git/blob - include/wx/x11/pen.h
Use the correct WXDLLEXPORT declaration.
[wxWidgets.git] / include / wx / x11 / pen.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: pen.h
3 // Purpose: wxPen class
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 17/09/98
7 // RCS-ID: $Id$
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_PEN_H_
13 #define _WX_PEN_H_
14
15 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
16 #pragma interface "pen.h"
17 #endif
18
19 #include "wx/gdicmn.h"
20 #include "wx/gdiobj.h"
21
22 //-----------------------------------------------------------------------------
23 // classes
24 //-----------------------------------------------------------------------------
25
26 class wxPen;
27 class wxColour;
28 class wxBitmap;
29
30 typedef char wxX11Dash;
31
32 //-----------------------------------------------------------------------------
33 // wxPen
34 //-----------------------------------------------------------------------------
35
36 class wxPen: public wxGDIObject
37 {
38 public:
39 wxPen() { }
40
41 wxPen( const wxColour &colour, int width = 1, int style = wxSOLID );
42 wxPen( const wxBitmap &stipple, int width );
43 ~wxPen();
44
45 wxPen( const wxPen& pen ) { 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 void SetStipple( wxBitmap *stipple );
61
62 wxColour &GetColour() const;
63 int GetCap() const;
64 int GetJoin() const;
65 int GetStyle() const;
66 int GetWidth() const;
67 int GetDashes(wxDash **ptr) const;
68 int GetDashCount() const;
69 wxDash* GetDash() const;
70 wxBitmap* GetStipple() const;
71
72 private:
73 // ref counting code
74 virtual wxObjectRefData *CreateRefData() const;
75 virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;
76
77 DECLARE_DYNAMIC_CLASS(wxPen)
78 };
79
80 #endif
81 // _WX_PEN_H_