]> git.saurik.com Git - wxWidgets.git/blob - include/wx/cocoa/pen.h
wxFrameNameStr was already delivered by #include one line earlier.
[wxWidgets.git] / include / wx / cocoa / pen.h
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
18 class WXDLLEXPORT wxColour;
19 class WXDLLEXPORT wxBitmap;
20
21 // ========================================================================
22 // wxPen
23 // ========================================================================
24 class WXDLLEXPORT wxPen: public wxGDIObject
25 {
26 DECLARE_DYNAMIC_CLASS(wxPen)
27 public:
28 wxPen();
29 wxPen(const wxColour& col, int width = 1, int style = wxSOLID);
30 wxPen(const wxBitmap& stipple, int width);
31 ~wxPen();
32
33 // wxObjectRefData
34 wxObjectRefData *CreateRefData() const;
35 wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;
36
37 inline bool operator == (const wxPen& pen) const
38 { return m_refData == pen.m_refData; }
39 inline bool operator != (const wxPen& pen) const
40 { return m_refData != pen.m_refData; }
41
42 virtual bool Ok() const { return (m_refData != NULL) ; }
43
44 void SetColour(const wxColour& col) ;
45 void SetColour(unsigned char r, unsigned char g, unsigned char b) ;
46
47 void SetWidth(int width);
48 void SetStyle(int style);
49 void SetStipple(const wxBitmap& stipple);
50 void SetDashes(int nb_dashes, const wxDash *dash);
51 void SetJoin(int join);
52 void SetCap(int cap);
53
54 wxColour& GetColour() const;
55 int GetWidth() const;
56 int GetStyle() const;
57 int GetJoin() const;
58 int GetCap() const;
59 int GetDashes(wxDash **ptr) const;
60 wxBitmap *GetStipple() const;
61
62 WX_NSColor GetNSColor();
63 int GetCocoaLineDash(const float **pattern);
64 };
65
66 #endif // __WX_COCOA_PEN_H__