]> git.saurik.com Git - wxWidgets.git/blame - include/wx/osx/pen.h
using 10.5 API for cursor updates as well
[wxWidgets.git] / include / wx / osx / pen.h
CommitLineData
3d0b488b 1/////////////////////////////////////////////////////////////////////////////
97c5b168 2// Name: wx/osx/pen.h
3d0b488b
SC
3// Purpose: wxPen class
4// Author: Stefan Csomor
5// Modified by:
6// Created: 1998-01-01
7// RCS-ID: $Id$
8// Copyright: (c) Stefan Csomor
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_PEN_H_
13#define _WX_PEN_H_
14
15#include "wx/gdiobj.h"
16#include "wx/colour.h"
17#include "wx/bitmap.h"
18
19// Pen
20class WXDLLIMPEXP_CORE wxPen : public wxPenBase
21{
22public:
23 wxPen();
24 wxPen(const wxColour& col, int width = 1, wxPenStyle style = wxPENSTYLE_SOLID);
25#if FUTURE_WXWIN_COMPATIBILITY_3_0
26 wxDEPRECATED_FUTURE( wxPen(const wxColour& col, int width, int style) );
27#endif
28
29 wxPen(const wxBitmap& stipple, int width);
30 virtual ~wxPen();
31
32 bool operator==(const wxPen& pen) const;
33 bool operator!=(const wxPen& pen) const { return !(*this == pen); }
34
35 // Override in order to recreate the pen
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(wxPenStyle style) ;
41 void SetStipple(const wxBitmap& stipple) ;
42 void SetDashes(int nb_dashes, const wxDash *dash) ;
43 void SetJoin(wxPenJoin join) ;
44 void SetCap(wxPenCap cap) ;
45
46 wxColour GetColour() const ;
47 int GetWidth() const;
48 wxPenStyle GetStyle() const;
49 wxPenJoin GetJoin() const;
50 wxPenCap GetCap() const;
51 int GetDashes(wxDash **ptr) const;
e2cb366f 52 int GetDashCount() const;
3d0b488b
SC
53
54 wxBitmap *GetStipple() const ;
55
56#if FUTURE_WXWIN_COMPATIBILITY_3_0
57 wxDEPRECATED_FUTURE( void SetStyle(int style) )
58 { SetStyle((wxPenStyle)style); }
59#endif
60
61 // Implementation
62
63 // Useful helper: create the brush resource
64 bool RealizeResource();
65
66protected:
67 virtual wxGDIRefData *CreateGDIRefData() const;
68 virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
69
70private:
71 void Unshare();
72
73 DECLARE_DYNAMIC_CLASS(wxPen)
74};
75
76#endif
77 // _WX_PEN_H_