]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/pen.h
wxMDIChildFrame::Maximize() should have default value for its argument just as wxFram...
[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
10
11#ifndef __GTKPENH__
12#define __GTKPENH__
13
12028905 14#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
c801d85f
KB
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
4f535231 45 wxPen( const wxColour &colour, int width = 1, int style = wxSOLID );
8bbe427f 46 ~wxPen();
c89f5c02 47
d84afea9
GD
48 wxPen( const wxPen& pen )
49 : wxGDIObject()
50 { Ref(pen); }
c89f5c02
RR
51 wxPen& operator = ( const wxPen& pen ) { Ref(pen); return *this; }
52
53 bool Ok() const { return m_refData != NULL; }
54
f6bcfd97 55 bool operator == ( const wxPen& pen ) const;
c89f5c02 56 bool operator != (const wxPen& pen) const { return !(*this == pen); }
8bbe427f 57
c801d85f 58 void SetColour( const wxColour &colour );
debe6624 59 void SetColour( int red, int green, int blue );
c801d85f
KB
60 void SetCap( int capStyle );
61 void SetJoin( int joinStyle );
62 void SetStyle( int style );
63 void SetWidth( int width );
112c5086
RR
64 void SetDashes( int number_of_dashes, const wxDash *dash );
65
8bbe427f
VZ
66 wxColour &GetColour() const;
67 int GetCap() const;
68 int GetJoin() const;
69 int GetStyle() const;
70 int GetWidth() const;
112c5086
RR
71 int GetDashes(wxDash **ptr) const;
72 int GetDashCount() const;
73 wxDash* GetDash() const;
8bbe427f 74
20e05ffb 75private:
c89f5c02
RR
76 // ref counting code
77 virtual wxObjectRefData *CreateRefData() const;
78 virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;
79
20e05ffb 80 DECLARE_DYNAMIC_CLASS(wxPen)
c801d85f
KB
81};
82
83#endif // __GTKPENH__