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