]> git.saurik.com Git - wxWidgets.git/blame - include/wx/x11/pen.h
A few tweaks and cleanups
[wxWidgets.git] / include / wx / x11 / pen.h
CommitLineData
83df96d6
JS
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
74dc5eb6
RR
23//-----------------------------------------------------------------------------
24// classes
25//-----------------------------------------------------------------------------
83df96d6 26
74dc5eb6 27class wxPen;
83df96d6 28
74dc5eb6 29typedef char wxX11Dash;
83df96d6 30
74dc5eb6
RR
31//-----------------------------------------------------------------------------
32// wxPen
33//-----------------------------------------------------------------------------
83df96d6 34
74dc5eb6 35class wxPen: public wxGDIObject
83df96d6 36{
83df96d6 37public:
74dc5eb6 38 wxPen() { }
83df96d6 39
74dc5eb6
RR
40 wxPen( const wxColour &colour, int width, int style );
41 ~wxPen();
83df96d6 42
74dc5eb6
RR
43 wxPen( const wxPen& pen ) { Ref(pen); }
44 wxPen& operator = ( const wxPen& pen ) { Ref(pen); return *this; }
83df96d6 45
74dc5eb6 46 bool Ok() const { return m_refData != NULL; }
83df96d6 47
74dc5eb6
RR
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 );
83df96d6 58
74dc5eb6
RR
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;
83df96d6 72
74dc5eb6 73 DECLARE_DYNAMIC_CLASS(wxPen)
83df96d6
JS
74};
75
76#endif
77// _WX_PEN_H_