]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/pen.h
added wxSemaphore (with docs), new version of wxCondition and bug fixes to wxThread...
[wxWidgets.git] / include / wx / gtk / pen.h
CommitLineData
c801d85f
KB
1/////////////////////////////////////////////////////////////////////////////
2// Name: pen.h
3// Purpose:
4// Author: Robert Roebling
58614078
RR
5// Id: $Id$
6// Copyright: (c) 1998 Robert Roebling
8bbe427f 7// Licence: wxWindows licence
c801d85f
KB
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//-----------------------------------------------------------------------------
25// classes
26//-----------------------------------------------------------------------------
27
28class wxPen;
29
8a667305 30#if defined(__WXGTK127__) || defined(__WXGTK20__)
2eca425d
RL
31typedef gint8 wxGTKDash;
32#else
33typedef gchar wxGTKDash;
34#endif
112c5086 35
c801d85f
KB
36//-----------------------------------------------------------------------------
37// wxPen
38//-----------------------------------------------------------------------------
39
40class wxPen: public wxGDIObject
41{
20e05ffb 42public:
c89f5c02
RR
43 wxPen() { }
44
c801d85f 45 wxPen( const wxColour &colour, int width, int style );
8bbe427f 46 ~wxPen();
c89f5c02
RR
47
48 wxPen( const wxPen& pen ) { Ref(pen); }
49 wxPen& operator = ( const wxPen& pen ) { Ref(pen); return *this; }
50
51 bool Ok() const { return m_refData != NULL; }
52
f6bcfd97 53 bool operator == ( const wxPen& pen ) const;
c89f5c02 54 bool operator != (const wxPen& pen) const { return !(*this == pen); }
8bbe427f 55
c801d85f 56 void SetColour( const wxColour &colour );
debe6624 57 void SetColour( int red, int green, int blue );
c801d85f
KB
58 void SetCap( int capStyle );
59 void SetJoin( int joinStyle );
60 void SetStyle( int style );
61 void SetWidth( int width );
112c5086
RR
62 void SetDashes( int number_of_dashes, const wxDash *dash );
63
8bbe427f
VZ
64 wxColour &GetColour() const;
65 int GetCap() const;
66 int GetJoin() const;
67 int GetStyle() const;
68 int GetWidth() const;
112c5086
RR
69 int GetDashes(wxDash **ptr) const;
70 int GetDashCount() const;
71 wxDash* GetDash() const;
8bbe427f 72
20e05ffb 73private:
c89f5c02
RR
74 // ref counting code
75 virtual wxObjectRefData *CreateRefData() const;
76 virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;
77
20e05ffb 78 DECLARE_DYNAMIC_CLASS(wxPen)
c801d85f
KB
79};
80
81#endif // __GTKPENH__