]>
Commit | Line | Data |
---|---|---|
1 | ///////////////////////////////////////////////////////////////////////////// | |
2 | // Name: wx/dfb/pen.h | |
3 | // Purpose: wxPen class declaration | |
4 | // Author: Vaclav Slavik | |
5 | // Created: 2006-08-04 | |
6 | // Copyright: (c) 2006 REA Elektronik GmbH | |
7 | // Licence: wxWindows licence | |
8 | ///////////////////////////////////////////////////////////////////////////// | |
9 | ||
10 | #ifndef _WX_DFB_PEN_H_ | |
11 | #define _WX_DFB_PEN_H_ | |
12 | ||
13 | #include "wx/defs.h" | |
14 | #include "wx/object.h" | |
15 | #include "wx/string.h" | |
16 | #include "wx/gdiobj.h" | |
17 | #include "wx/gdicmn.h" | |
18 | ||
19 | //----------------------------------------------------------------------------- | |
20 | // classes | |
21 | //----------------------------------------------------------------------------- | |
22 | ||
23 | class WXDLLIMPEXP_FWD_CORE wxBitmap; | |
24 | class WXDLLIMPEXP_FWD_CORE wxPen; | |
25 | ||
26 | //----------------------------------------------------------------------------- | |
27 | // wxPen | |
28 | //----------------------------------------------------------------------------- | |
29 | ||
30 | class WXDLLIMPEXP_CORE wxPen: public wxPenBase | |
31 | { | |
32 | public: | |
33 | wxPen() {} | |
34 | wxPen(const wxColour &colour, int width = 1, wxPenStyle style = wxPENSTYLE_SOLID); | |
35 | #if FUTURE_WXWIN_COMPATIBILITY_3_0 | |
36 | wxDEPRECATED_FUTURE( wxPen(const wxColour& col, int width, int style) ); | |
37 | #endif | |
38 | ||
39 | wxPen(const wxBitmap& stipple, int width); | |
40 | ||
41 | bool operator==(const wxPen& pen) const; | |
42 | bool operator!=(const wxPen& pen) const { return !(*this == pen); } | |
43 | ||
44 | void SetColour(const wxColour &colour); | |
45 | void SetColour(unsigned char red, unsigned char green, unsigned char blue); | |
46 | void SetCap(wxPenCap capStyle); | |
47 | void SetJoin(wxPenJoin joinStyle); | |
48 | void SetStyle(wxPenStyle style); | |
49 | void SetWidth(int width); | |
50 | void SetDashes(int number_of_dashes, const wxDash *dash); | |
51 | void SetStipple(const wxBitmap& stipple); | |
52 | ||
53 | wxColour GetColour() const; | |
54 | wxPenCap GetCap() const; | |
55 | wxPenJoin GetJoin() const; | |
56 | wxPenStyle GetStyle() const; | |
57 | int GetWidth() const; | |
58 | int GetDashes(wxDash **ptr) const; | |
59 | int GetDashCount() const; | |
60 | wxDash* GetDash() const; | |
61 | wxBitmap *GetStipple() const; | |
62 | ||
63 | #if FUTURE_WXWIN_COMPATIBILITY_3_0 | |
64 | wxDEPRECATED_FUTURE( void SetStyle(int style) ) | |
65 | { SetStyle((wxPenStyle)style); } | |
66 | #endif | |
67 | ||
68 | protected: | |
69 | virtual wxGDIRefData *CreateGDIRefData() const; | |
70 | virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; | |
71 | ||
72 | DECLARE_DYNAMIC_CLASS(wxPen) | |
73 | }; | |
74 | ||
75 | #endif // _WX_DFB_PEN_H_ |