]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/x11/pen.h
Fix so OGL can build without wxBuffer
[wxWidgets.git] / include / wx / x11 / pen.h
... / ...
CommitLineData
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#ifdef __GNUG__
16#pragma interface "pen.h"
17#endif
18
19#include "wx/gdiobj.h"
20#include "wx/colour.h"
21#include "wx/bitmap.h"
22
23//-----------------------------------------------------------------------------
24// classes
25//-----------------------------------------------------------------------------
26
27class wxPen;
28
29typedef char wxX11Dash;
30
31//-----------------------------------------------------------------------------
32// wxPen
33//-----------------------------------------------------------------------------
34
35class wxPen: public wxGDIObject
36{
37public:
38 wxPen() { }
39
40 wxPen( const wxColour &colour, int width, int style );
41 ~wxPen();
42
43 wxPen( const wxPen& pen ) { Ref(pen); }
44 wxPen& operator = ( const wxPen& pen ) { Ref(pen); return *this; }
45
46 bool Ok() const { return m_refData != NULL; }
47
48 bool operator == ( const wxPen& pen ) const;
49 bool operator != (const wxPen& pen) const { return !(*this == pen); }
50
51 void SetColour( const wxColour &colour );
52 void SetColour( int red, int green, int blue );
53 void SetCap( int capStyle );
54 void SetJoin( int joinStyle );
55 void SetStyle( int style );
56 void SetWidth( int width );
57 void SetDashes( int number_of_dashes, const wxDash *dash );
58
59 wxColour &GetColour() const;
60 int GetCap() const;
61 int GetJoin() const;
62 int GetStyle() const;
63 int GetWidth() const;
64 int GetDashes(wxDash **ptr) const;
65 int GetDashCount() const;
66 wxDash* GetDash() const;
67
68private:
69 // ref counting code
70 virtual wxObjectRefData *CreateRefData() const;
71 virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;
72
73 DECLARE_DYNAMIC_CLASS(wxPen)
74};
75
76#endif
77// _WX_PEN_H_