]>
Commit | Line | Data |
---|---|---|
8cf73271 | 1 | ///////////////////////////////////////////////////////////////////////////// |
46562151 | 2 | // Name: wx/mac/carbon/pen.h |
8cf73271 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 | |
65571936 | 9 | // Licence: wxWindows licence |
8cf73271 SC |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
12 | #ifndef _WX_PEN_H_ | |
13 | #define _WX_PEN_H_ | |
14 | ||
8cf73271 SC |
15 | #include "wx/gdiobj.h" |
16 | #include "wx/colour.h" | |
17 | #include "wx/bitmap.h" | |
18 | ||
8cf73271 | 19 | // Pen |
53a2db12 | 20 | class WXDLLIMPEXP_CORE wxPen : public wxPenBase |
8cf73271 | 21 | { |
8cf73271 | 22 | public: |
8f884a0d | 23 | wxPen(); |
82cddbd9 | 24 | wxPen(const wxColour& col, int width = 1, wxPenStyle style = wxPENSTYLE_SOLID); |
ac3688c0 FM |
25 | #if FUTURE_WXWIN_COMPATIBILITY_3_0 |
26 | wxDEPRECATED_FUTURE( wxPen(const wxColour& col, int width, int style) ); | |
82cddbd9 FM |
27 | #endif |
28 | ||
8f884a0d VZ |
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); } | |
8cf73271 | 34 | |
8f884a0d VZ |
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) ; | |
8cf73271 | 38 | |
8f884a0d | 39 | void SetWidth(int width) ; |
82cddbd9 | 40 | void SetStyle(wxPenStyle style) ; |
8f884a0d VZ |
41 | void SetStipple(const wxBitmap& stipple) ; |
42 | void SetDashes(int nb_dashes, const wxDash *dash) ; | |
82cddbd9 FM |
43 | void SetJoin(wxPenJoin join) ; |
44 | void SetCap(wxPenCap cap) ; | |
8cf73271 | 45 | |
231b9591 | 46 | wxColour GetColour() const ; |
8f884a0d | 47 | int GetWidth() const; |
82cddbd9 FM |
48 | wxPenStyle GetStyle() const; |
49 | wxPenJoin GetJoin() const; | |
50 | wxPenCap GetCap() const; | |
8f884a0d | 51 | int GetDashes(wxDash **ptr) const; |
8cf73271 | 52 | |
8f884a0d | 53 | wxBitmap *GetStipple() const ; |
8cf73271 | 54 | |
8f884a0d | 55 | // Implementation |
8cf73271 | 56 | |
8f884a0d VZ |
57 | // Useful helper: create the brush resource |
58 | bool RealizeResource(); | |
8cf73271 | 59 | |
8f884a0d VZ |
60 | protected: |
61 | virtual wxGDIRefData *CreateGDIRefData() const; | |
62 | virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; | |
8cf73271 | 63 | |
83dcd781 PC |
64 | private: |
65 | void Unshare(); | |
8f884a0d VZ |
66 | |
67 | DECLARE_DYNAMIC_CLASS(wxPen) | |
8cf73271 SC |
68 | }; |
69 | ||
70 | #endif | |
71 | // _WX_PEN_H_ |