]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/gtk/pen.h
fixing 'id' objc.h collisions, listbox rewrite
[wxWidgets.git] / include / wx / gtk / pen.h
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/gtk/pen.h
3// Purpose:
4// Author: Robert Roebling
5// Id: $Id$
6// Copyright: (c) 1998 Robert Roebling
7// Licence: wxWindows licence
8/////////////////////////////////////////////////////////////////////////////
9
10#ifndef __GTKPENH__
11#define __GTKPENH__
12
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
23class WXDLLIMPEXP_CORE wxPen;
24
25typedef gint8 wxGTKDash;
26
27//-----------------------------------------------------------------------------
28// wxPen
29//-----------------------------------------------------------------------------
30
31class WXDLLIMPEXP_CORE wxPen: public wxGDIObject
32{
33public:
34 wxPen() { }
35
36 wxPen( const wxColour &colour, int width = 1, int style = wxSOLID );
37 ~wxPen();
38
39 bool Ok() const { return m_refData != NULL; }
40
41 bool operator == ( const wxPen& pen ) const;
42 bool operator != (const wxPen& pen) const { return !(*this == pen); }
43
44 void SetColour( const wxColour &colour );
45 void SetColour( unsigned char red, unsigned char green, unsigned char blue );
46 void SetCap( int capStyle );
47 void SetJoin( int joinStyle );
48 void SetStyle( int style );
49 void SetWidth( int width );
50 void SetDashes( int number_of_dashes, const wxDash *dash );
51
52 wxColour &GetColour() const;
53 int GetCap() const;
54 int GetJoin() const;
55 int GetStyle() const;
56 int GetWidth() const;
57 int GetDashes(wxDash **ptr) const;
58 int GetDashCount() const;
59 wxDash* GetDash() const;
60
61protected:
62 // ref counting code
63 virtual wxObjectRefData *CreateRefData() const;
64 virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;
65
66 DECLARE_DYNAMIC_CLASS(wxPen)
67};
68
69#endif // __GTKPENH__