]> git.saurik.com Git - wxWidgets.git/blob - include/wx/brush.h
compilation fix for wxUSE_GUI=0
[wxWidgets.git] / include / wx / brush.h
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
12 #ifndef _WX_BRUSH_H_BASE_
13 #define _WX_BRUSH_H_BASE_
14
15 #include "wx/defs.h"
16 #include "wx/object.h"
17 #include "wx/gdiobj.h"
18 #include "wx/gdicmn.h" // for wxGDIObjListBase
19
20 // NOTE: these values cannot be combined together!
21 enum wxBrushStyle
22 {
23 #if WXWIN_COMPATIBILITY_2_8
24 /* start of deprecated values */
25 wxSOLID = 100,
26 wxTRANSPARENT = 106,
27 wxSTIPPLE_MASK_OPAQUE = 107,
28 wxSTIPPLE_MASK = 108,
29 wxSTIPPLE = 109,
30 wxBDIAGONAL_HATCH = 110,
31 wxCROSSDIAG_HATCH = 111,
32 wxFDIAGONAL_HATCH = 112,
33 wxCROSS_HATCH = 113,
34 wxHORIZONTAL_HATCH = 114,
35 wxVERTICAL_HATCH = 115,
36 wxFIRST_HATCH = wxBDIAGONAL_HATCH,
37 wxLAST_HATCH = wxVERTICAL_HATCH,
38 /* end of deprecated values */
39
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,
53 wxBRUSHSTYLE_MAX
54 #else
55 wxBRUSHSTYLE_SOLID,
56 wxBRUSHSTYLE_TRANSPARENT,
57
58 /* Brush Stippling. */
59
60 wxBRUSHSTYLE_STIPPLE_MASK_OPAQUE,
61 /* mask is used for blitting monochrome using text fore and back ground colors */
62
63 wxBRUSHSTYLE_STIPPLE_MASK,
64 /* mask is used for masking areas in the stipple bitmap (TO DO) */
65
66 wxBRUSHSTYLE_STIPPLE,
67 /* drawn with a Pen, and without any Brush -- and it can be stippled. */
68
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,
79
80 wxBRUSHSTYLE_FIRST_HATCH = wxBRUSHSTYLE_BDIAGONAL_HATCH,
81 wxBRUSHSTYLE_LAST_HATCH = wxBRUSHSTYLE_VERTICAL_HATCH,
82
83 wxBRUSHSTYLE_MAX
84 #endif
85 };
86
87
88 // wxBrushBase
89 class WXDLLEXPORT wxBrushBase: public wxGDIObject
90 {
91 public:
92 virtual ~wxBrushBase() { }
93
94 virtual wxBrushStyle GetStyle() const = 0;
95
96 virtual bool IsHatch() const
97 { return (GetStyle()>=wxBRUSHSTYLE_FIRST_HATCH) && (GetStyle()<=wxBRUSHSTYLE_LAST_HATCH); }
98 };
99
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"
120 #endif
121
122 class WXDLLIMPEXP_CORE wxBrushList: public wxGDIObjListBase
123 {
124 public:
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*) );
129 #endif
130 };
131
132 extern WXDLLEXPORT_DATA(wxBrushList*) wxTheBrushList;
133
134 #endif
135 // _WX_BRUSH_H_BASE_