]> git.saurik.com Git - wxWidgets.git/blame - include/wx/msw/pen.h
add size parameter to the generic wxFileDialog ctor
[wxWidgets.git] / include / wx / msw / pen.h
CommitLineData
2bda0e17 1/////////////////////////////////////////////////////////////////////////////
46562151 2// Name: wx/msw/pen.h
2bda0e17
KB
3// Purpose: wxPen class
4// Author: Julian Smart
5c57bf07 5// Modified by: Vadim Zeitlin: fixed operator=(), ==(), !=()
2bda0e17
KB
6// Created: 01/02/97
7// RCS-ID: $Id$
bbcdf8bc 8// Copyright: (c) Julian Smart
078cf5cb 9// Licence: wxWindows licence
2bda0e17
KB
10/////////////////////////////////////////////////////////////////////////////
11
bbcdf8bc
JS
12#ifndef _WX_PEN_H_
13#define _WX_PEN_H_
2bda0e17 14
2bda0e17 15#include "wx/gdiobj.h"
ce3b4b90 16#include "wx/gdicmn.h"
2bda0e17 17
5c57bf07 18// ----------------------------------------------------------------------------
2bda0e17 19// Pen
5c57bf07
VZ
20// ----------------------------------------------------------------------------
21
53a2db12 22class WXDLLIMPEXP_CORE wxPen : public wxPenBase
2bda0e17 23{
2bda0e17 24public:
8c583381 25 wxPen() { }
82cddbd9 26 wxPen(const wxColour& col, int width = 1, wxPenStyle style = wxPENSTYLE_SOLID);
ac3688c0
FM
27#if FUTURE_WXWIN_COMPATIBILITY_3_0
28 wxDEPRECATED_FUTURE( wxPen(const wxColour& col, int width, int style) );
82cddbd9
FM
29#endif
30
5c57bf07 31 wxPen(const wxBitmap& stipple, int width);
8c583381 32 virtual ~wxPen() { }
5c57bf07 33
ce3b4b90 34 bool operator==(const wxPen& pen) const;
5c57bf07
VZ
35 bool operator!=(const wxPen& pen) const { return !(*this == pen); }
36
5c57bf07
VZ
37 // Override in order to recreate the pen
38 void SetColour(const wxColour& col);
1a1498c0 39 void SetColour(unsigned char r, unsigned char g, unsigned char b);
5c57bf07
VZ
40
41 void SetWidth(int width);
82cddbd9 42 void SetStyle(wxPenStyle style);
5c57bf07
VZ
43 void SetStipple(const wxBitmap& stipple);
44 void SetDashes(int nb_dashes, const wxDash *dash);
82cddbd9
FM
45 void SetJoin(wxPenJoin join);
46 void SetCap(wxPenCap cap);
5c57bf07 47
231b9591 48 wxColour GetColour() const;
ce3b4b90 49 int GetWidth() const;
82cddbd9
FM
50 wxPenStyle GetStyle() const;
51 wxPenJoin GetJoin() const;
52 wxPenCap GetCap() const;
ce3b4b90
PC
53 int GetDashes(wxDash** ptr) const;
54 wxDash* GetDash() const;
55 int GetDashCount() const;
56 wxBitmap* GetStipple() const;
5c57bf07 57
bc735a68
VZ
58#if FUTURE_WXWIN_COMPATIBILITY_3_0
59 wxDEPRECATED_FUTURE( void SetStyle(int style) )
60 { SetStyle((wxPenStyle)style); }
61#endif
62
8c583381
VZ
63 // internal: wxGDIObject methods
64 virtual bool RealizeResource();
65 virtual bool FreeResource(bool force = false);
66 virtual WXHANDLE GetResourceHandle() const;
67 virtual bool IsFree() const;
5c57bf07 68
7c310bc8 69protected:
8f884a0d
VZ
70 virtual wxGDIRefData* CreateGDIRefData() const;
71 virtual wxGDIRefData* CloneGDIRefData(const wxGDIRefData* data) const;
7c310bc8 72
8c583381
VZ
73 // same as FreeResource() + RealizeResource()
74 bool Recreate();
75
5c57bf07 76 DECLARE_DYNAMIC_CLASS(wxPen)
2bda0e17
KB
77};
78
5c57bf07 79#endif // _WX_PEN_H_