]> git.saurik.com Git - wxWidgets.git/blame - include/wx/x11/pen.h
fixes to static box borders calculations and significant code cleanup (finalizes...
[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
65571936 9// Licence: wxWindows licence
83df96d6
JS
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_PEN_H_
13#define _WX_PEN_H_
14
12028905 15#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
83df96d6
JS
16#pragma interface "pen.h"
17#endif
18
69c44812 19#include "wx/gdicmn.h"
83df96d6 20#include "wx/gdiobj.h"
83df96d6 21
74dc5eb6
RR
22//-----------------------------------------------------------------------------
23// classes
24//-----------------------------------------------------------------------------
83df96d6 25
74dc5eb6 26class wxPen;
69c44812
MB
27class wxColour;
28class wxBitmap;
83df96d6 29
74dc5eb6 30typedef char wxX11Dash;
83df96d6 31
74dc5eb6
RR
32//-----------------------------------------------------------------------------
33// wxPen
34//-----------------------------------------------------------------------------
83df96d6 35
74dc5eb6 36class wxPen: public wxGDIObject
83df96d6 37{
83df96d6 38public:
74dc5eb6 39 wxPen() { }
83df96d6 40
4f535231 41 wxPen( const wxColour &colour, int width = 1, int style = wxSOLID );
69c44812 42 wxPen( const wxBitmap &stipple, int width );
74dc5eb6 43 ~wxPen();
83df96d6 44
74dc5eb6
RR
45 wxPen( const wxPen& pen ) { Ref(pen); }
46 wxPen& operator = ( const wxPen& pen ) { Ref(pen); return *this; }
83df96d6 47
74dc5eb6 48 bool Ok() const { return m_refData != NULL; }
83df96d6 49
74dc5eb6
RR
50 bool operator == ( const wxPen& pen ) const;
51 bool operator != (const wxPen& pen) const { return !(*this == pen); }
52
53 void SetColour( const wxColour &colour );
54 void SetColour( int red, int green, int blue );
55 void SetCap( int capStyle );
56 void SetJoin( int joinStyle );
57 void SetStyle( int style );
58 void SetWidth( int width );
59 void SetDashes( int number_of_dashes, const wxDash *dash );
69c44812
MB
60 void SetStipple( wxBitmap *stipple );
61
74dc5eb6
RR
62 wxColour &GetColour() const;
63 int GetCap() const;
64 int GetJoin() const;
65 int GetStyle() const;
66 int GetWidth() const;
67 int GetDashes(wxDash **ptr) const;
68 int GetDashCount() const;
69 wxDash* GetDash() const;
69c44812 70 wxBitmap* GetStipple() const;
74dc5eb6
RR
71
72private:
73 // ref counting code
74 virtual wxObjectRefData *CreateRefData() const;
75 virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;
83df96d6 76
74dc5eb6 77 DECLARE_DYNAMIC_CLASS(wxPen)
83df96d6
JS
78};
79
80#endif
81// _WX_PEN_H_