]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/msw/pen.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxPen class
4 // Author: Julian Smart
5 // Modified by: Vadim Zeitlin: fixed operator=(), ==(), !=()
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
15 #include "wx/gdiobj.h"
16 #include "wx/gdicmn.h"
18 // ----------------------------------------------------------------------------
20 // ----------------------------------------------------------------------------
22 class WXDLLEXPORT wxPen
: public wxGDIObject
26 wxPen(const wxColour
& col
, int width
= 1, int style
= wxSOLID
);
27 wxPen(const wxBitmap
& stipple
, int width
);
30 bool operator==(const wxPen
& pen
) const;
31 bool operator!=(const wxPen
& pen
) const { return !(*this == pen
); }
33 // Override in order to recreate the pen
34 void SetColour(const wxColour
& col
);
35 void SetColour(unsigned char r
, unsigned char g
, unsigned char b
);
37 void SetWidth(int width
);
38 void SetStyle(int style
);
39 void SetStipple(const wxBitmap
& stipple
);
40 void SetDashes(int nb_dashes
, const wxDash
*dash
);
41 void SetJoin(int join
);
44 wxColour
& GetColour() const;
49 int GetDashes(wxDash
** ptr
) const;
50 wxDash
* GetDash() const;
51 int GetDashCount() const;
52 wxBitmap
* GetStipple() const;
54 // internal: wxGDIObject methods
55 virtual bool RealizeResource();
56 virtual bool FreeResource(bool force
= false);
57 virtual WXHANDLE
GetResourceHandle() const;
58 virtual bool IsFree() const;
61 virtual wxGDIRefData
* CreateGDIRefData() const;
62 virtual wxGDIRefData
* CloneGDIRefData(const wxGDIRefData
* data
) const;
64 // same as FreeResource() + RealizeResource()
67 DECLARE_DYNAMIC_CLASS(wxPen
)