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