]> git.saurik.com Git - wxWidgets.git/blame - include/wx/mac/carbon/pen.h
use wxWindowIDRef to transparently implement auto-generated ids ref-counting (slightl...
[wxWidgets.git] / include / wx / mac / carbon / pen.h
CommitLineData
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
8f884a0d 20class WXDLLEXPORT wxPen : public wxGDIObject
8cf73271 21{
8cf73271 22public:
8f884a0d
VZ
23 wxPen();
24 wxPen(const wxColour& col, int width = 1, int style = wxSOLID);
25 wxPen(const wxBitmap& stipple, int width);
26 virtual ~wxPen();
27
28 bool operator==(const wxPen& pen) const;
29 bool operator!=(const wxPen& pen) const { return !(*this == pen); }
8cf73271 30
8f884a0d
VZ
31 // Override in order to recreate the pen
32 void SetColour(const wxColour& col) ;
33 void SetColour(unsigned char r, unsigned char g, unsigned char b) ;
8cf73271 34
8f884a0d
VZ
35 void SetWidth(int width) ;
36 void SetStyle(int style) ;
37 void SetStipple(const wxBitmap& stipple) ;
38 void SetDashes(int nb_dashes, const wxDash *dash) ;
39 void SetJoin(int join) ;
40 void SetCap(int cap) ;
8cf73271 41
8f884a0d
VZ
42 wxColour& GetColour() const ;
43 int GetWidth() const;
44 int GetStyle() const;
45 int GetJoin() const;
46 int GetCap() const;
47 int GetDashes(wxDash **ptr) const;
8cf73271 48
8f884a0d 49 wxBitmap *GetStipple() const ;
8cf73271 50
8f884a0d 51 // Implementation
8cf73271 52
8f884a0d
VZ
53 // Useful helper: create the brush resource
54 bool RealizeResource();
8cf73271 55
8f884a0d
VZ
56protected:
57 virtual wxGDIRefData *CreateGDIRefData() const;
58 virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
8cf73271 59
83dcd781
PC
60private:
61 void Unshare();
8f884a0d
VZ
62
63 DECLARE_DYNAMIC_CLASS(wxPen)
8cf73271
SC
64};
65
66#endif
67 // _WX_PEN_H_