]> git.saurik.com Git - wxWidgets.git/blob - include/wx/mgl/pen.h
add IsOk() to all classes having Ok() method (patch 1570985)
[wxWidgets.git] / include / wx / mgl / pen.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/mgl/pen.h
3 // Purpose:
4 // Author: Vaclav Slavik
5 // Id: $Id$
6 // Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com)
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
9
10 #ifndef __WX_PEN_H__
11 #define __WX_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 WXDLLEXPORT wxBitmap;
24 class WXDLLEXPORT wxPen;
25
26 //-----------------------------------------------------------------------------
27 // wxPen
28 //-----------------------------------------------------------------------------
29
30 class WXDLLEXPORT wxPen: public wxGDIObject
31 {
32 public:
33 wxPen() {}
34 wxPen(const wxColour &colour, int width = 1, int style = wxSOLID);
35 wxPen(const wxBitmap& stipple, int width);
36 virtual ~wxPen() {}
37 bool operator == (const wxPen& pen) const;
38 bool operator != (const wxPen& pen) const;
39
40 void SetColour(const wxColour &colour);
41 void SetColour(unsigned char red, unsigned char green, unsigned char blue);
42 void SetCap(int capStyle);
43 void SetJoin(int joinStyle);
44 void SetStyle(int style);
45 void SetWidth(int width);
46 void SetDashes(int number_of_dashes, const wxDash *dash);
47 void SetStipple(const wxBitmap& stipple);
48
49 wxColour &GetColour() const;
50 int GetCap() const;
51 int GetJoin() const;
52 int GetStyle() const;
53 int GetWidth() const;
54 int GetDashes(wxDash **ptr) const;
55 int GetDashCount() const;
56 wxDash* GetDash() const;
57 wxBitmap *GetStipple() const;
58
59 bool Ok() const { return IsOk(); }
60 bool IsOk() const;
61
62 // implementation:
63 void* GetPixPattern() const;
64
65 protected:
66 // ref counting code
67 virtual wxObjectRefData *CreateRefData() const;
68 virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;
69
70 private:
71 DECLARE_DYNAMIC_CLASS(wxPen)
72 };
73
74 #endif // __WX_PEN_H__