]>
Commit | Line | Data |
---|---|---|
99d80019 JS |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: wx/brush.h | |
3 | // Purpose: Includes platform-specific wxBrush file | |
4 | // Author: Julian Smart | |
5 | // Modified by: | |
6 | // Created: | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: Julian Smart | |
9 | // Licence: wxWindows Licence | |
10 | ///////////////////////////////////////////////////////////////////////////// | |
11 | ||
34138703 JS |
12 | #ifndef _WX_BRUSH_H_BASE_ |
13 | #define _WX_BRUSH_H_BASE_ | |
c801d85f | 14 | |
c7dc7711 WS |
15 | #include "wx/defs.h" |
16 | #include "wx/object.h" | |
17 | #include "wx/gdiobj.h" | |
18 | ||
3e6858cd FM |
19 | // NOTE: these values cannot be combined together! |
20 | enum wxBrushStyle | |
21 | { | |
22 | #ifdef WXWIN_COMPATIBILITY_2_8 | |
23 | /* start of deprecated values */ | |
24 | wxSOLID = 100, | |
25 | wxDOT, | |
26 | wxLONG_DASH, | |
27 | wxSHORT_DASH, | |
28 | wxDOT_DASH, | |
29 | wxUSER_DASH, | |
30 | wxTRANSPARENT, | |
31 | wxSTIPPLE_MASK_OPAQUE, | |
32 | wxSTIPPLE_MASK, | |
33 | wxSTIPPLE, | |
34 | wxBDIAGONAL_HATCH, | |
35 | wxCROSSDIAG_HATCH, | |
36 | wxFDIAGONAL_HATCH, | |
37 | wxCROSS_HATCH, | |
38 | wxHORIZONTAL_HATCH, | |
39 | wxVERTICAL_HATCH, | |
40 | wxFIRST_HATCH = wxBDIAGONAL_HATCH, | |
41 | wxLAST_HATCH = wxVERTICAL_HATCH, | |
42 | /* end of deprecated values */ | |
43 | ||
44 | wxBRUSHSTYLE_SOLID = wxSOLID, | |
45 | wxBRUSHSTYLE_DOT = wxDOT, | |
46 | wxBRUSHSTYLE_LONG_DASH = wxLONG_DASH, | |
47 | wxBRUSHSTYLE_SHORT_DASH = wxSHORT_DASH, | |
48 | wxBRUSHSTYLE_DOT_DASH = wxDOT_DASH, | |
49 | wxBRUSHSTYLE_USER_DOT = wxUSER_DASH, | |
50 | ||
51 | wxBRUSHSTYLE_TRANSPARENT = wxTRANSPARENT, | |
52 | ||
53 | /* Brush Stippling. */ | |
54 | wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE = wxSTIPPLE_MASK_OPAQUE, | |
55 | /* mask is used for blitting monochrome using text fore and back ground colors */ | |
56 | ||
57 | wxBRUSHSTYLE_STIPPLE_MASK = wxSTIPPLE_MASK, | |
58 | /* mask is used for masking areas in the stipple bitmap (TO DO) */ | |
59 | ||
60 | wxBRUSHSTYLE_STIPPLE = wxSTIPPLE, | |
61 | /* drawn with a Pen, and without any Brush -- and it can be stippled. */ | |
62 | ||
63 | /* In wxWidgets < 2.6 use WX_HATCH macro */ | |
64 | /* to verify these wx*_HATCH are in style */ | |
65 | /* of wxBrush. In wxWidgets >= 2.6 use */ | |
66 | /* wxBrush::IsHatch() instead. */ | |
67 | wxBRUSHSTYLE_BDIAGONAL_HATCH = wxBDIAGONAL_HATCH, | |
68 | wxBRUSHSTYLE_CROSSDIAG_HATCH = wxCROSSDIAG_HATCH, | |
69 | wxBRUSHSTYLE_FDIAGONAL_HATCH = wxFDIAGONAL_HATCH, | |
70 | wxBRUSHSTYLE_CROSS_HATCH = wxCROSS_HATCH, | |
71 | wxBRUSHSTYLE_HORIZONTAL_HATCH = wxHORIZONTAL_HATCH, | |
72 | wxBRUSHSTYLE_VERTICAL_HATCH = wxVERTICAL_HATCH, | |
73 | ||
74 | wxBRUSHSTYLE_FIRST_HATCH = wxFIRST_HATCH, | |
75 | wxBRUSHSTYLE_LAST_HATCH = wxLAST_HATCH, | |
76 | ||
77 | wxBRUSHSTYLE_MAX | |
78 | #else | |
79 | wxBRUSHSTYLE_SOLID, | |
80 | wxBRUSHSTYLE_DOT, | |
81 | wxBRUSHSTYLE_LONG_DASH, | |
82 | wxBRUSHSTYLE_SHORT_DASH, | |
83 | wxBRUSHSTYLE_DOT_DASH, | |
84 | wxBRUSHSTYLE_USER_DOT, | |
85 | ||
86 | wxBRUSHSTYLE_TRANSPARENT, | |
87 | ||
88 | /* Brush Stippling. */ | |
89 | wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE, | |
90 | /* mask is used for blitting monochrome using text fore and back ground colors */ | |
91 | ||
92 | wxBRUSHSTYLE_STIPPLE_MASK, | |
93 | /* mask is used for masking areas in the stipple bitmap (TO DO) */ | |
94 | ||
95 | wxBRUSHSTYLE_STIPPLE, | |
96 | /* drawn with a Pen, and without any Brush -- and it can be stippled. */ | |
97 | ||
98 | /* In wxWidgets < 2.6 use WX_HATCH macro */ | |
99 | /* to verify these wx*_HATCH are in style */ | |
100 | /* of wxBrush. In wxWidgets >= 2.6 use */ | |
101 | /* wxBrush::IsHatch() instead. */ | |
102 | wxBRUSHSTYLE_BDIAGONAL_HATCH, | |
103 | wxBRUSHSTYLE_CROSSDIAG_HATCH, | |
104 | wxBRUSHSTYLE_FDIAGONAL_HATCH, | |
105 | wxBRUSHSTYLE_CROSS_HATCH, | |
106 | wxBRUSHSTYLE_HORIZONTAL_HATCH, | |
107 | wxBRUSHSTYLE_VERTICAL_HATCH, | |
108 | ||
109 | wxBRUSHSTYLE_FIRST_HATCH = wxBRUSHSTYLE_BDIAGONAL_HATCH, | |
110 | wxBRUSHSTYLE_LAST_HATCH = wxBRUSHSTYLE_VERTICAL_HATCH, | |
111 | ||
112 | wxBRUSHSTYLE_MAX | |
113 | #endif | |
114 | }; | |
115 | ||
116 | ||
cb9d5bd0 WS |
117 | // wxBrushBase |
118 | class WXDLLEXPORT wxBrushBase: public wxGDIObject | |
119 | { | |
120 | public: | |
121 | virtual ~wxBrushBase() { } | |
122 | ||
3e6858cd | 123 | virtual wxBrushStyle GetStyle() const = 0; |
cb9d5bd0 WS |
124 | |
125 | virtual bool IsHatch() const | |
3e6858cd | 126 | { return (GetStyle()>=wxBRUSHSTYLE_FIRST_HATCH) && (GetStyle()<=wxBRUSHSTYLE_LAST_HATCH); } |
cb9d5bd0 WS |
127 | }; |
128 | ||
4055ed82 | 129 | #if defined(__WXPALMOS__) |
ffecfa5a JS |
130 | #include "wx/palmos/brush.h" |
131 | #elif defined(__WXMSW__) | |
5b36366c VZ |
132 | #include "wx/msw/brush.h" |
133 | #elif defined(__WXMOTIF__) || defined(__WXX11__) | |
134 | #include "wx/x11/brush.h" | |
1be7a35c | 135 | #elif defined(__WXGTK20__) |
5b36366c | 136 | #include "wx/gtk/brush.h" |
1be7a35c MR |
137 | #elif defined(__WXGTK__) |
138 | #include "wx/gtk1/brush.h" | |
1e6feb95 | 139 | #elif defined(__WXMGL__) |
5b36366c | 140 | #include "wx/mgl/brush.h" |
b3c86150 VS |
141 | #elif defined(__WXDFB__) |
142 | #include "wx/dfb/brush.h" | |
34138703 | 143 | #elif defined(__WXMAC__) |
5b36366c | 144 | #include "wx/mac/brush.h" |
e64df9bc | 145 | #elif defined(__WXCOCOA__) |
5b36366c | 146 | #include "wx/cocoa/brush.h" |
1777b9bb | 147 | #elif defined(__WXPM__) |
5b36366c | 148 | #include "wx/os2/brush.h" |
c801d85f KB |
149 | #endif |
150 | ||
151 | #endif | |
34138703 | 152 | // _WX_BRUSH_H_BASE_ |