]> git.saurik.com Git - wxWidgets.git/blame - include/wx/cocoa/pen.h
PCH-less compilation fix
[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// ========================================================================
a24aff65
DE
24class WXDLLEXPORT wxPen: public wxGDIObject
25{
8e517013 26 DECLARE_DYNAMIC_CLASS(wxPen)
a24aff65 27public:
8e517013
DE
28 wxPen();
29 wxPen(const wxColour& col, int width = 1, int style = wxSOLID);
30 wxPen(const wxBitmap& stipple, int width);
d3c7fc99 31 virtual ~wxPen();
8e517013
DE
32
33 // wxObjectRefData
34 wxObjectRefData *CreateRefData() const;
35 wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;
36
fbfb8bcc 37 inline bool operator == (const wxPen& pen) const
8e517013 38 { return m_refData == pen.m_refData; }
fbfb8bcc 39 inline bool operator != (const wxPen& pen) const
8e517013
DE
40 { return m_refData != pen.m_refData; }
41
b7cacb43
VZ
42 virtual bool Ok() const { return IsOk(); }
43 virtual bool IsOk() const { return (m_refData != NULL) ; }
8e517013
DE
44
45 void SetColour(const wxColour& col) ;
1a1498c0 46 void SetColour(unsigned char r, unsigned char g, unsigned char b) ;
8e517013
DE
47
48 void SetWidth(int width);
49 void SetStyle(int style);
50 void SetStipple(const wxBitmap& stipple);
51 void SetDashes(int nb_dashes, const wxDash *dash);
52 void SetJoin(int join);
53 void SetCap(int cap);
54
55 wxColour& GetColour() const;
56 int GetWidth() const;
57 int GetStyle() const;
58 int GetJoin() const;
59 int GetCap() const;
60 int GetDashes(wxDash **ptr) const;
61 wxBitmap *GetStipple() const;
62
63 WX_NSColor GetNSColor();
4799f3ba 64 int GetCocoaLineDash(const CGFloat **pattern);
a24aff65
DE
65};
66
8e517013 67#endif // __WX_COCOA_PEN_H__