]>
Commit | Line | Data |
---|---|---|
1 | ///////////////////////////////////////////////////////////////////////////// | |
2 | // Name: wx/gtk1/pen.h | |
3 | // Purpose: | |
4 | // Author: Robert Roebling | |
5 | // Id: $Id$ | |
6 | // Copyright: (c) 1998 Robert Roebling | |
7 | // Licence: wxWindows licence | |
8 | ///////////////////////////////////////////////////////////////////////////// | |
9 | ||
10 | #ifndef __GTKPENH__ | |
11 | #define __GTKPENH__ | |
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 wxPen; | |
24 | ||
25 | #if defined(__WXGTK127__) | |
26 | typedef gint8 wxGTKDash; | |
27 | #else | |
28 | typedef gchar wxGTKDash; | |
29 | #endif | |
30 | ||
31 | //----------------------------------------------------------------------------- | |
32 | // wxPen | |
33 | //----------------------------------------------------------------------------- | |
34 | ||
35 | class WXDLLIMPEXP_CORE wxPen: public wxGDIObject | |
36 | { | |
37 | public: | |
38 | wxPen() { } | |
39 | ||
40 | wxPen( const wxColour &colour, int width = 1, int style = wxSOLID ); | |
41 | virtual ~wxPen(); | |
42 | ||
43 | bool operator==(const wxPen& pen) const; | |
44 | bool operator!=(const wxPen& pen) const { return !(*this == pen); } | |
45 | ||
46 | void SetColour( const wxColour &colour ); | |
47 | void SetColour( unsigned char red, unsigned char green, unsigned char blue ); | |
48 | void SetCap( int capStyle ); | |
49 | void SetJoin( int joinStyle ); | |
50 | void SetStyle( int style ); | |
51 | void SetWidth( int width ); | |
52 | void SetDashes( int number_of_dashes, const wxDash *dash ); | |
53 | ||
54 | wxColour &GetColour() const; | |
55 | int GetCap() const; | |
56 | int GetJoin() const; | |
57 | int GetStyle() const; | |
58 | int GetWidth() const; | |
59 | int GetDashes(wxDash **ptr) const; | |
60 | int GetDashCount() const; | |
61 | wxDash* GetDash() const; | |
62 | ||
63 | private: | |
64 | virtual wxGDIRefData *CreateGDIRefData() const; | |
65 | virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; | |
66 | ||
67 | DECLARE_DYNAMIC_CLASS(wxPen) | |
68 | }; | |
69 | ||
70 | #endif // __GTKPENH__ |