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 #if WXWIN_COMPATIBILITY_2_8
23 /* start of deprecated values */
26 wxSTIPPLE_MASK_OPAQUE
= 107,
29 wxBDIAGONAL_HATCH
= 110,
30 wxCROSSDIAG_HATCH
= 111,
31 wxFDIAGONAL_HATCH
= 112,
33 wxHORIZONTAL_HATCH
= 114,
34 wxVERTICAL_HATCH
= 115,
35 wxFIRST_HATCH
= wxBDIAGONAL_HATCH
,
36 wxLAST_HATCH
= wxVERTICAL_HATCH
,
37 /* end of deprecated values */
39 wxBRUSHSTYLE_SOLID
= wxSOLID
,
40 wxBRUSHSTYLE_TRANSPARENT
= wxTRANSPARENT
,
41 wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE
= wxSTIPPLE_MASK_OPAQUE
,
42 wxBRUSHSTYLE_STIPPLE_MASK
= wxSTIPPLE_MASK
,
43 wxBRUSHSTYLE_STIPPLE
= wxSTIPPLE
,
44 wxBRUSHSTYLE_BDIAGONAL_HATCH
= wxBDIAGONAL_HATCH
,
45 wxBRUSHSTYLE_CROSSDIAG_HATCH
= wxCROSSDIAG_HATCH
,
46 wxBRUSHSTYLE_FDIAGONAL_HATCH
= wxFDIAGONAL_HATCH
,
47 wxBRUSHSTYLE_CROSS_HATCH
= wxCROSS_HATCH
,
48 wxBRUSHSTYLE_HORIZONTAL_HATCH
= wxHORIZONTAL_HATCH
,
49 wxBRUSHSTYLE_VERTICAL_HATCH
= wxVERTICAL_HATCH
,
50 wxBRUSHSTYLE_FIRST_HATCH
= wxFIRST_HATCH
,
51 wxBRUSHSTYLE_LAST_HATCH
= wxLAST_HATCH
,
55 wxBRUSHSTYLE_TRANSPARENT
,
57 /* Brush Stippling. */
59 wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE
,
60 /* mask is used for blitting monochrome using text fore and back ground colors */
62 wxBRUSHSTYLE_STIPPLE_MASK
,
63 /* mask is used for masking areas in the stipple bitmap (TO DO) */
66 /* drawn with a Pen, and without any Brush -- and it can be stippled. */
68 /* In wxWidgets < 2.6 use WX_HATCH macro */
69 /* to verify these wx*_HATCH are in style */
70 /* of wxBrush. In wxWidgets >= 2.6 use */
71 /* wxBrush::IsHatch() instead. */
72 wxBRUSHSTYLE_BDIAGONAL_HATCH
,
73 wxBRUSHSTYLE_CROSSDIAG_HATCH
,
74 wxBRUSHSTYLE_FDIAGONAL_HATCH
,
75 wxBRUSHSTYLE_CROSS_HATCH
,
76 wxBRUSHSTYLE_HORIZONTAL_HATCH
,
77 wxBRUSHSTYLE_VERTICAL_HATCH
,
79 wxBRUSHSTYLE_FIRST_HATCH
= wxBRUSHSTYLE_BDIAGONAL_HATCH
,
80 wxBRUSHSTYLE_LAST_HATCH
= wxBRUSHSTYLE_VERTICAL_HATCH
,
88 class WXDLLEXPORT wxBrushBase
: public wxGDIObject
91 virtual ~wxBrushBase() { }
93 virtual wxBrushStyle
GetStyle() const = 0;
95 virtual bool IsHatch() const
96 { return (GetStyle()>=wxBRUSHSTYLE_FIRST_HATCH
) && (GetStyle()<=wxBRUSHSTYLE_LAST_HATCH
); }
99 #if defined(__WXPALMOS__)
100 #include "wx/palmos/brush.h"
101 #elif defined(__WXMSW__)
102 #include "wx/msw/brush.h"
103 #elif defined(__WXMOTIF__) || defined(__WXX11__)
104 #include "wx/x11/brush.h"
105 #elif defined(__WXGTK20__)
106 #include "wx/gtk/brush.h"
107 #elif defined(__WXGTK__)
108 #include "wx/gtk1/brush.h"
109 #elif defined(__WXMGL__)
110 #include "wx/mgl/brush.h"
111 #elif defined(__WXDFB__)
112 #include "wx/dfb/brush.h"
113 #elif defined(__WXMAC__)
114 #include "wx/mac/brush.h"
115 #elif defined(__WXCOCOA__)
116 #include "wx/cocoa/brush.h"
117 #elif defined(__WXPM__)
118 #include "wx/os2/brush.h"
121 class WXDLLIMPEXP_CORE wxBrushList
: public wxGDIObjListBase
124 wxBrush
*FindOrCreateBrush(const wxColour
& colour
, wxBrushStyle style
= wxBRUSHSTYLE_SOLID
);
125 #if WXWIN_COMPATIBILITY_2_6
126 wxDEPRECATED( void AddBrush(wxBrush
*) );
127 wxDEPRECATED( void RemoveBrush(wxBrush
*) );
131 extern WXDLLEXPORT_DATA(wxBrushList
*) wxTheBrushList
;