1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Includes platform-specific wxBrush file
4 // Author: Julian Smart
8 // Copyright: Julian Smart
9 // Licence: wxWindows Licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_BRUSH_H_BASE_
13 #define _WX_BRUSH_H_BASE_
16 #include "wx/object.h"
17 #include "wx/gdiobj.h"
19 // NOTE: these values cannot be combined together!
22 #ifdef WXWIN_COMPATIBILITY_2_8
23 /* start of deprecated values */
31 wxSTIPPLE_MASK_OPAQUE
,
40 wxFIRST_HATCH
= wxBDIAGONAL_HATCH
,
41 wxLAST_HATCH
= wxVERTICAL_HATCH
,
42 /* end of deprecated values */
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
,
51 wxBRUSHSTYLE_TRANSPARENT
= wxTRANSPARENT
,
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 */
57 wxBRUSHSTYLE_STIPPLE_MASK
= wxSTIPPLE_MASK
,
58 /* mask is used for masking areas in the stipple bitmap (TO DO) */
60 wxBRUSHSTYLE_STIPPLE
= wxSTIPPLE
,
61 /* drawn with a Pen, and without any Brush -- and it can be stippled. */
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
,
74 wxBRUSHSTYLE_FIRST_HATCH
= wxFIRST_HATCH
,
75 wxBRUSHSTYLE_LAST_HATCH
= wxLAST_HATCH
,
81 wxBRUSHSTYLE_LONG_DASH
,
82 wxBRUSHSTYLE_SHORT_DASH
,
83 wxBRUSHSTYLE_DOT_DASH
,
84 wxBRUSHSTYLE_USER_DOT
,
86 wxBRUSHSTYLE_TRANSPARENT
,
88 /* Brush Stippling. */
89 wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE
,
90 /* mask is used for blitting monochrome using text fore and back ground colors */
92 wxBRUSHSTYLE_STIPPLE_MASK
,
93 /* mask is used for masking areas in the stipple bitmap (TO DO) */
96 /* drawn with a Pen, and without any Brush -- and it can be stippled. */
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
,
109 wxBRUSHSTYLE_FIRST_HATCH
= wxBRUSHSTYLE_BDIAGONAL_HATCH
,
110 wxBRUSHSTYLE_LAST_HATCH
= wxBRUSHSTYLE_VERTICAL_HATCH
,
118 class WXDLLEXPORT wxBrushBase
: public wxGDIObject
121 virtual ~wxBrushBase() { }
123 virtual wxBrushStyle
GetStyle() const = 0;
125 virtual bool IsHatch() const
126 { return (GetStyle()>=wxBRUSHSTYLE_FIRST_HATCH
) && (GetStyle()<=wxBRUSHSTYLE_LAST_HATCH
); }
129 #if defined(__WXPALMOS__)
130 #include "wx/palmos/brush.h"
131 #elif defined(__WXMSW__)
132 #include "wx/msw/brush.h"
133 #elif defined(__WXMOTIF__) || defined(__WXX11__)
134 #include "wx/x11/brush.h"
135 #elif defined(__WXGTK20__)
136 #include "wx/gtk/brush.h"
137 #elif defined(__WXGTK__)
138 #include "wx/gtk1/brush.h"
139 #elif defined(__WXMGL__)
140 #include "wx/mgl/brush.h"
141 #elif defined(__WXDFB__)
142 #include "wx/dfb/brush.h"
143 #elif defined(__WXMAC__)
144 #include "wx/mac/brush.h"
145 #elif defined(__WXCOCOA__)
146 #include "wx/cocoa/brush.h"
147 #elif defined(__WXPM__)
148 #include "wx/os2/brush.h"