]> git.saurik.com Git - wxWidgets.git/blame - include/wx/mac/carbon/pen.h
don't leak wxImageList if wxHF_CONTENTS is not used in wxHtmlHelpWindow
[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
b5dbe15d 19class WXDLLIMPEXP_FWD_CORE wxPen;
8cf73271 20
8cf73271
SC
21// Pen
22class WXDLLEXPORT wxPen: public wxGDIObject
23{
24 DECLARE_DYNAMIC_CLASS(wxPen)
25public:
26 wxPen();
27 wxPen(const wxColour& col, int width = 1, int style = wxSOLID);
28 wxPen(const wxBitmap& stipple, int width);
d3c7fc99 29 virtual ~wxPen();
8cf73271 30
05b735af
SC
31 bool operator == (const wxPen& pen) const;
32 bool operator != (const wxPen& pen) const { return !(*this == pen); }
8cf73271
SC
33
34 // Override in order to recreate the pen
35 void SetColour(const wxColour& col) ;
1a1498c0 36 void SetColour(unsigned char r, unsigned char g, unsigned char b) ;
8cf73271
SC
37
38 void SetWidth(int width) ;
39 void SetStyle(int style) ;
40 void SetStipple(const wxBitmap& stipple) ;
41 void SetDashes(int nb_dashes, const wxDash *dash) ;
42 void SetJoin(int join) ;
43 void SetCap(int cap) ;
44
05b735af
SC
45 wxColour& GetColour() const ;
46 int GetWidth() const;
47 int GetStyle() const;
48 int GetJoin() const;
49 int GetCap() const;
50 int GetDashes(wxDash **ptr) const;
8cf73271 51
05b735af 52 wxBitmap *GetStipple() const ;
8cf73271
SC
53
54// Implementation
55
56 // Useful helper: create the brush resource
57 bool RealizeResource();
58
83dcd781
PC
59private:
60 void Unshare();
8cf73271
SC
61};
62
63#endif
64 // _WX_PEN_H_