]> git.saurik.com Git - wxWidgets.git/blame - include/wx/cocoa/pen.h
Add wxPreferencesEditor class.
[wxWidgets.git] / include / wx / cocoa / pen.h
CommitLineData
a24aff65 1/////////////////////////////////////////////////////////////////////////////
cfbef359 2// Name: wx/cocoa/pen.h
a24aff65 3// Purpose: wxPen class
cfbef359 4// Author: David Elliott
a24aff65 5// Modified by:
8e517013 6// Created: 2003/08/02 (stubs from 22.03.2003)
a24aff65 7// RCS-ID: $Id$
cfbef359 8// Copyright: (c) 2003 David Elliott
46562151 9// Licence: wxWindows licence
a24aff65
DE
10/////////////////////////////////////////////////////////////////////////////
11
8e517013
DE
12#ifndef __WX_COCOA_PEN_H__
13#define __WX_COCOA_PEN_H__
a24aff65
DE
14
15#include "wx/gdiobj.h"
8e517013 16#include "wx/gdicmn.h"
a24aff65 17
b5dbe15d
VS
18class WXDLLIMPEXP_FWD_CORE wxColour;
19class WXDLLIMPEXP_FWD_CORE wxBitmap;
a24aff65 20
8e517013
DE
21// ========================================================================
22// wxPen
23// ========================================================================
53a2db12 24class WXDLLIMPEXP_CORE wxPen: public wxGDIObject
a24aff65 25{
a24aff65 26public:
8e517013 27 wxPen();
82cddbd9 28 wxPen(const wxColour& col, int width = 1, wxPenStyle style = wxPENSTYLE_SOLID);
ac3688c0
FM
29#if FUTURE_WXWIN_COMPATIBILITY_3_0
30 wxDEPRECATED_FUTURE( wxPen(const wxColour& col, int width, int style) );
82cddbd9 31#endif
8e517013 32 wxPen(const wxBitmap& stipple, int width);
d3c7fc99 33 virtual ~wxPen();
8e517013 34
8f884a0d
VZ
35 // FIXME: operator==() is wrong
36 bool operator==(const wxPen& pen) const { return m_refData == pen.m_refData; }
37 bool operator!=(const wxPen& pen) const { return !(*this == pen); }
8e517013
DE
38
39 void SetColour(const wxColour& col) ;
1a1498c0 40 void SetColour(unsigned char r, unsigned char g, unsigned char b) ;
8e517013
DE
41
42 void SetWidth(int width);
82cddbd9 43 void SetStyle(wxPenStyle style);
8e517013
DE
44 void SetStipple(const wxBitmap& stipple);
45 void SetDashes(int nb_dashes, const wxDash *dash);
82cddbd9
FM
46 void SetJoin(wxPenJoin join);
47 void SetCap(wxPenCap cap);
8e517013 48
231b9591 49 wxColour GetColour() const;
8e517013 50 int GetWidth() const;
82cddbd9
FM
51 wxPenStyle GetStyle() const;
52 wxPenJoin GetJoin() const;
53 wxPenCap GetCap() const;
8e517013
DE
54 int GetDashes(wxDash **ptr) const;
55 wxBitmap *GetStipple() const;
56
bc735a68
VZ
57#if FUTURE_WXWIN_COMPATIBILITY_3_0
58 wxDEPRECATED_FUTURE( void SetStyle(int style) )
59 { SetStyle((wxPenStyle)style); }
60#endif
61
62 // Cocoa-specific
8e517013 63 WX_NSColor GetNSColor();
4799f3ba 64 int GetCocoaLineDash(const CGFloat **pattern);
8f884a0d
VZ
65
66protected:
67 wxGDIRefData *CreateGDIRefData() const;
68 wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
69
70 DECLARE_DYNAMIC_CLASS(wxPen)
a24aff65
DE
71};
72
8e517013 73#endif // __WX_COCOA_PEN_H__