]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/pen.h
refactored wxGTK scrolling: it has now fully-functioning wxScrollHelper and a lot...
[wxWidgets.git] / include / wx / gtk / pen.h
CommitLineData
c801d85f 1/////////////////////////////////////////////////////////////////////////////
4f535231 2// Name: wx/gtk/pen.h
c801d85f
KB
3// Purpose:
4// Author: Robert Roebling
58614078
RR
5// Id: $Id$
6// Copyright: (c) 1998 Robert Roebling
65571936 7// Licence: wxWindows licence
c801d85f
KB
8/////////////////////////////////////////////////////////////////////////////
9
c801d85f
KB
10#ifndef __GTKPENH__
11#define __GTKPENH__
12
c801d85f
KB
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
20123d49 23class WXDLLIMPEXP_CORE wxPen;
c801d85f 24
8a667305 25#if defined(__WXGTK127__) || defined(__WXGTK20__)
2eca425d
RL
26typedef gint8 wxGTKDash;
27#else
28typedef gchar wxGTKDash;
29#endif
112c5086 30
c801d85f
KB
31//-----------------------------------------------------------------------------
32// wxPen
33//-----------------------------------------------------------------------------
34
20123d49 35class WXDLLIMPEXP_CORE wxPen: public wxGDIObject
c801d85f 36{
20e05ffb 37public:
c89f5c02 38 wxPen() { }
46562151 39
4f535231 40 wxPen( const wxColour &colour, int width = 1, int style = wxSOLID );
8bbe427f 41 ~wxPen();
46562151 42
d84afea9
GD
43 wxPen( const wxPen& pen )
44 : wxGDIObject()
45 { Ref(pen); }
c89f5c02 46 wxPen& operator = ( const wxPen& pen ) { Ref(pen); return *this; }
46562151 47
c89f5c02 48 bool Ok() const { return m_refData != NULL; }
46562151 49
f6bcfd97 50 bool operator == ( const wxPen& pen ) const;
c89f5c02 51 bool operator != (const wxPen& pen) const { return !(*this == pen); }
8bbe427f 52
c801d85f 53 void SetColour( const wxColour &colour );
1a1498c0 54 void SetColour( unsigned char red, unsigned char green, unsigned char blue );
c801d85f
KB
55 void SetCap( int capStyle );
56 void SetJoin( int joinStyle );
57 void SetStyle( int style );
58 void SetWidth( int width );
112c5086 59 void SetDashes( int number_of_dashes, const wxDash *dash );
46562151 60
8bbe427f
VZ
61 wxColour &GetColour() const;
62 int GetCap() const;
63 int GetJoin() const;
64 int GetStyle() const;
65 int GetWidth() const;
112c5086
RR
66 int GetDashes(wxDash **ptr) const;
67 int GetDashCount() const;
68 wxDash* GetDash() const;
8bbe427f 69
46562151 70private:
c89f5c02
RR
71 // ref counting code
72 virtual wxObjectRefData *CreateRefData() const;
73 virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;
46562151 74
20e05ffb 75 DECLARE_DYNAMIC_CLASS(wxPen)
c801d85f
KB
76};
77
78#endif // __GTKPENH__