]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/mac/carbon/pen.h
set wxUSE_IOSTREAMH to 0 by default, we're in 2008, not 1988
[wxWidgets.git] / include / wx / mac / carbon / pen.h
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/mac/carbon/pen.h
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 WXDLLEXPORT wxPen : public wxGDIObject
21{
22public:
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); }
30
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) ;
34
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) ;
41
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;
48
49 wxBitmap *GetStipple() const ;
50
51 // Implementation
52
53 // Useful helper: create the brush resource
54 bool RealizeResource();
55
56protected:
57 virtual wxGDIRefData *CreateGDIRefData() const;
58 virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
59
60private:
61 void Unshare();
62
63 DECLARE_DYNAMIC_CLASS(wxPen)
64};
65
66#endif
67 // _WX_PEN_H_