]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/cocoa/pen.h
tell user to define _USE_OLD_RW_STL for BC5.6 instead of refusing to compile with...
[wxWidgets.git] / include / wx / cocoa / pen.h
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/cocoa/pen.h
3// Purpose: wxPen class
4// Author: David Elliott
5// Modified by:
6// Created: 2003/08/02 (stubs from 22.03.2003)
7// RCS-ID: $Id$
8// Copyright: (c) 2003 David Elliott
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef __WX_COCOA_PEN_H__
13#define __WX_COCOA_PEN_H__
14
15#include "wx/gdiobj.h"
16#include "wx/gdicmn.h"
17
18class WXDLLIMPEXP_FWD_CORE wxColour;
19class WXDLLIMPEXP_FWD_CORE wxBitmap;
20
21// ========================================================================
22// wxPen
23// ========================================================================
24class WXDLLEXPORT wxPen: public wxGDIObject
25{
26public:
27 wxPen();
28 wxPen(const wxColour& col, int width = 1, int style = wxSOLID);
29 wxPen(const wxBitmap& stipple, int width);
30 virtual ~wxPen();
31
32 // FIXME: operator==() is wrong
33 bool operator==(const wxPen& pen) const { return m_refData == pen.m_refData; }
34 bool operator!=(const wxPen& pen) const { return !(*this == pen); }
35
36 void SetColour(const wxColour& col) ;
37 void SetColour(unsigned char r, unsigned char g, unsigned char b) ;
38
39 void SetWidth(int width);
40 void SetStyle(int style);
41 void SetStipple(const wxBitmap& stipple);
42 void SetDashes(int nb_dashes, const wxDash *dash);
43 void SetJoin(int join);
44 void SetCap(int cap);
45
46 wxColour& GetColour() const;
47 int GetWidth() const;
48 int GetStyle() const;
49 int GetJoin() const;
50 int GetCap() const;
51 int GetDashes(wxDash **ptr) const;
52 wxBitmap *GetStipple() const;
53
54 WX_NSColor GetNSColor();
55 int GetCocoaLineDash(const CGFloat **pattern);
56
57protected:
58 wxGDIRefData *CreateGDIRefData() const;
59 wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
60
61 DECLARE_DYNAMIC_CLASS(wxPen)
62};
63
64#endif // __WX_COCOA_PEN_H__