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