]>
Commit | Line | Data |
---|---|---|
c801d85f KB |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: gdicmn.h | |
3 | // Purpose: Common GDI classes, types and declarations | |
4 | // Author: Julian Smart | |
5 | // Modified by: | |
6 | // Created: 01/02/97 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) | |
f03fc89f | 9 | // Licence: wxWindows licence |
c801d85f KB |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
34138703 JS |
12 | #ifndef _WX_GDICMNH__ |
13 | #define _WX_GDICMNH__ | |
c801d85f | 14 | |
f03fc89f VZ |
15 | // --------------------------------------------------------------------------- |
16 | // headers | |
17 | // --------------------------------------------------------------------------- | |
18 | ||
c801d85f | 19 | #ifdef __GNUG__ |
f03fc89f | 20 | #pragma interface "gdicmn.h" |
c801d85f KB |
21 | #endif |
22 | ||
23 | #include "wx/object.h" | |
24 | #include "wx/list.h" | |
25 | #include "wx/hash.h" | |
34138703 | 26 | #include "wx/string.h" |
c801d85f | 27 | #include "wx/setup.h" |
34138703 | 28 | #include "wx/colour.h" |
37bebc11 | 29 | #include "wx/font.h" |
c801d85f | 30 | |
f03fc89f VZ |
31 | // --------------------------------------------------------------------------- |
32 | // forward declarations | |
33 | // --------------------------------------------------------------------------- | |
34 | ||
35 | class WXDLLEXPORT wxBitmap; | |
36 | class WXDLLEXPORT wxBrush; | |
37 | class WXDLLEXPORT wxColour; | |
38 | class WXDLLEXPORT wxCursor; | |
39 | class WXDLLEXPORT wxFont; | |
40 | class WXDLLEXPORT wxIcon; | |
41 | class WXDLLEXPORT wxPalette; | |
42 | class WXDLLEXPORT wxPen; | |
43 | class WXDLLEXPORT wxRegion; | |
44 | class WXDLLEXPORT wxString; | |
45 | ||
46 | // --------------------------------------------------------------------------- | |
47 | // constants | |
48 | // --------------------------------------------------------------------------- | |
49 | ||
50 | // Bitmap flags | |
2aeec9ec | 51 | enum wxBitmapType |
f03fc89f | 52 | { |
6d167489 VZ |
53 | wxBITMAP_TYPE_INVALID, // should be == 0 for compatibility! |
54 | wxBITMAP_TYPE_BMP, | |
f03fc89f VZ |
55 | wxBITMAP_TYPE_BMP_RESOURCE, |
56 | wxBITMAP_TYPE_RESOURCE = wxBITMAP_TYPE_BMP_RESOURCE, | |
57 | wxBITMAP_TYPE_ICO, | |
58 | wxBITMAP_TYPE_ICO_RESOURCE, | |
59 | wxBITMAP_TYPE_CUR, | |
60 | wxBITMAP_TYPE_CUR_RESOURCE, | |
61 | wxBITMAP_TYPE_XBM, | |
62 | wxBITMAP_TYPE_XBM_DATA, | |
63 | wxBITMAP_TYPE_XPM, | |
64 | wxBITMAP_TYPE_XPM_DATA, | |
65 | wxBITMAP_TYPE_TIF, | |
66 | wxBITMAP_TYPE_TIF_RESOURCE, | |
67 | wxBITMAP_TYPE_GIF, | |
68 | wxBITMAP_TYPE_GIF_RESOURCE, | |
69 | wxBITMAP_TYPE_PNG, | |
70 | wxBITMAP_TYPE_PNG_RESOURCE, | |
71 | wxBITMAP_TYPE_JPEG, | |
72 | wxBITMAP_TYPE_JPEG_RESOURCE, | |
bcc46c75 SB |
73 | wxBITMAP_TYPE_PNM, |
74 | wxBITMAP_TYPE_PNM_RESOURCE, | |
6523d119 GRG |
75 | wxBITMAP_TYPE_PCX, |
76 | wxBITMAP_TYPE_PCX_RESOURCE, | |
6d167489 VZ |
77 | wxBITMAP_TYPE_PICT, |
78 | wxBITMAP_TYPE_PICT_RESOURCE, | |
79 | wxBITMAP_TYPE_ICON, | |
80 | wxBITMAP_TYPE_ICON_RESOURCE, | |
81 | wxBITMAP_TYPE_MACCURSOR, | |
82 | wxBITMAP_TYPE_MACCURSOR_RESOURCE, | |
f03fc89f VZ |
83 | wxBITMAP_TYPE_ANY = 50 |
84 | }; | |
85 | ||
c801d85f | 86 | // Standard cursors |
f03fc89f VZ |
87 | enum wxStockCursor |
88 | { | |
89 | wxCURSOR_NONE, // should be 0 | |
90 | wxCURSOR_ARROW, | |
91 | wxCURSOR_BULLSEYE, | |
92 | wxCURSOR_CHAR, | |
93 | wxCURSOR_CROSS, | |
94 | wxCURSOR_HAND, | |
95 | wxCURSOR_IBEAM, | |
96 | wxCURSOR_LEFT_BUTTON, | |
97 | wxCURSOR_MAGNIFIER, | |
98 | wxCURSOR_MIDDLE_BUTTON, | |
99 | wxCURSOR_NO_ENTRY, | |
100 | wxCURSOR_PAINT_BRUSH, | |
101 | wxCURSOR_PENCIL, | |
102 | wxCURSOR_POINT_LEFT, | |
103 | wxCURSOR_POINT_RIGHT, | |
104 | wxCURSOR_QUESTION_ARROW, | |
105 | wxCURSOR_RIGHT_BUTTON, | |
106 | wxCURSOR_SIZENESW, | |
107 | wxCURSOR_SIZENS, | |
108 | wxCURSOR_SIZENWSE, | |
109 | wxCURSOR_SIZEWE, | |
110 | wxCURSOR_SIZING, | |
111 | wxCURSOR_SPRAYCAN, | |
112 | wxCURSOR_WAIT, | |
113 | wxCURSOR_WATCH, | |
114 | wxCURSOR_BLANK, | |
ae53c98c KB |
115 | #ifdef __WXGTK__ |
116 | wxCURSOR_DEFAULT, // standard X11 cursor | |
117 | #endif | |
c801d85f | 118 | #ifdef __X__ |
f03fc89f VZ |
119 | // Not yet implemented for Windows |
120 | wxCURSOR_CROSS_REVERSE, | |
121 | wxCURSOR_DOUBLE_ARROW, | |
122 | wxCURSOR_BASED_ARROW_UP, | |
ea804aad | 123 | wxCURSOR_BASED_ARROW_DOWN, |
f03fc89f VZ |
124 | #endif // X11 |
125 | ||
83f96286 RD |
126 | wxCURSOR_ARROWWAIT, |
127 | ||
f03fc89f VZ |
128 | wxCURSOR_MAX |
129 | }; | |
130 | ||
943d28e4 VZ |
131 | #ifndef __WXGTK__ |
132 | #define wxCURSOR_DEFAULT wxCURSOR_ARROW | |
133 | #endif | |
134 | ||
f03fc89f VZ |
135 | // --------------------------------------------------------------------------- |
136 | // macros | |
137 | // --------------------------------------------------------------------------- | |
138 | ||
139 | /* Useful macro for creating icons portably, for example: | |
140 | ||
141 | wxIcon *icon = new wxICON(mondrian); | |
142 | ||
143 | expands into: | |
144 | ||
145 | wxIcon *icon = new wxIcon("mondrian"); // On wxMSW | |
146 | wxIcon *icon = new wxIcon(mondrian_xpm); // On wxGTK | |
147 | */ | |
148 | ||
149 | #ifdef __WXMSW__ | |
150 | // Load from a resource | |
151 | #define wxICON(X) wxIcon("" #X "") | |
1777b9bb DW |
152 | #elif defined(__WXPM__) |
153 | // Load from a resource | |
154 | #define wxICON(X) wxIcon("" #X "") | |
f03fc89f VZ |
155 | #elif defined(__WXGTK__) |
156 | // Initialize from an included XPM | |
157 | #define wxICON(X) wxIcon( (const char**) X##_xpm ) | |
158 | #elif defined(__WXMOTIF__) | |
159 | // Initialize from an included XPM | |
160 | #define wxICON(X) wxIcon( X##_xpm ) | |
161 | #else | |
162 | // This will usually mean something on any platform | |
163 | #define wxICON(X) wxIcon("" #X "") | |
164 | #endif // platform | |
165 | ||
0c5d3e1c VZ |
166 | /* Another macro: this one is for portable creation of bitmaps. We assume that |
167 | under Unix bitmaps live in XPMs and under Windows they're in ressources. | |
168 | */ | |
169 | ||
170 | #if defined(__WXMSW__) || defined(__WXPM__) | |
171 | #define wxBITMAP(name) wxBitmap(#name, wxBITMAP_TYPE_RESOURCE) | |
d015713e | 172 | #elif defined(__WXGTK__) || defined(__WXMOTIF__) || defined(__WXMAC__) |
bab537dc VS |
173 | // Initialize from an included XPM |
174 | #define wxBITMAP(name) wxBitmap( (const char**) name##_xpm ) | |
b8aa1680 | 175 | #else // other platforms |
0c5d3e1c VZ |
176 | #define wxBITMAP(name) wxBitmap(name##_xpm, wxBITMAP_TYPE_XPM) |
177 | #endif // platform | |
178 | ||
f03fc89f VZ |
179 | // =========================================================================== |
180 | // classes | |
181 | // =========================================================================== | |
c801d85f | 182 | |
f03fc89f VZ |
183 | // --------------------------------------------------------------------------- |
184 | // wxSize | |
185 | // --------------------------------------------------------------------------- | |
6a6c0a8b | 186 | class WXDLLEXPORT wxSize |
c801d85f KB |
187 | { |
188 | public: | |
cc775580 VZ |
189 | // members are public for compatibility (don't use them directly, |
190 | // especially that there names were chosen very unfortunately - they should | |
191 | // have been called width and height) | |
72cdf4c9 | 192 | int x, y; |
f03fc89f VZ |
193 | |
194 | // constructors | |
195 | wxSize() { x = y = 0; } | |
72cdf4c9 | 196 | wxSize(int xx, int yy) { Set(xx, yy); } |
f03fc89f VZ |
197 | |
198 | // no copy ctor or assignment operator - the defaults are ok | |
f03fc89f VZ |
199 | bool operator==(const wxSize& sz) const { return x == sz.x && y == sz.y; } |
200 | ||
201 | // FIXME are these really useful? If they're, we should have += &c as well | |
202 | wxSize operator+(const wxSize& sz) { return wxSize(x + sz.x, y + sz.y); } | |
203 | wxSize operator-(const wxSize& sz) { return wxSize(x - sz.x, y - sz.y); } | |
204 | ||
cc775580 | 205 | // accessors |
72cdf4c9 VZ |
206 | void Set(int xx, int yy) { x = xx; y = yy; } |
207 | void SetWidth(int w) { x = w; } | |
208 | void SetHeight(int h) { y = h; } | |
cc775580 | 209 | |
72cdf4c9 VZ |
210 | int GetWidth() const { return x; } |
211 | int GetHeight() const { return y; } | |
f03fc89f | 212 | |
cc775580 | 213 | // compatibility |
72cdf4c9 VZ |
214 | int GetX() const { return x; } |
215 | int GetY() const { return y; } | |
c801d85f KB |
216 | }; |
217 | ||
f03fc89f VZ |
218 | // --------------------------------------------------------------------------- |
219 | // Point classes: with real or integer coordinates | |
220 | // --------------------------------------------------------------------------- | |
764a3a49 | 221 | |
6a6c0a8b | 222 | class WXDLLEXPORT wxRealPoint |
c801d85f | 223 | { |
f03fc89f VZ |
224 | public: |
225 | double x; | |
226 | double y; | |
227 | ||
228 | wxRealPoint() { x = y = 0.0; }; | |
229 | wxRealPoint(double xx, double yy) { x = xx; y = yy; }; | |
230 | ||
f6bcfd97 BP |
231 | wxRealPoint operator+(const wxRealPoint& pt) const { return wxRealPoint(x + pt.x, y + pt.y); } |
232 | wxRealPoint operator-(const wxRealPoint& pt) const { return wxRealPoint(x - pt.x, y - pt.y); } | |
f03fc89f VZ |
233 | |
234 | bool operator==(const wxRealPoint& pt) const { return x == pt.x && y == pt.y; } | |
c801d85f KB |
235 | }; |
236 | ||
6a6c0a8b | 237 | class WXDLLEXPORT wxPoint |
c801d85f | 238 | { |
f03fc89f | 239 | public: |
72cdf4c9 | 240 | int x, y; |
6a6c0a8b | 241 | |
f03fc89f | 242 | wxPoint() { x = y = 0; }; |
72cdf4c9 | 243 | wxPoint(int xx, int yy) { x = xx; y = yy; }; |
f03fc89f VZ |
244 | |
245 | // no copy ctor or assignment operator - the defaults are ok | |
6a6c0a8b | 246 | |
764a3a49 VZ |
247 | // comparison |
248 | bool operator==(const wxPoint& p) const { return x == p.x && y == p.y; } | |
249 | bool operator!=(const wxPoint& p) const { return !(*this == p); } | |
250 | ||
251 | // arithmetic operations (component wise) | |
f6bcfd97 BP |
252 | wxPoint operator+(const wxPoint& p) const { return wxPoint(x + p.x, y + p.y); } |
253 | wxPoint operator-(const wxPoint& p) const { return wxPoint(x - p.x, y - p.y); } | |
f03fc89f | 254 | |
764a3a49 VZ |
255 | wxPoint& operator+=(const wxPoint& p) { x += p.x; y += p.y; return *this; } |
256 | wxPoint& operator-=(const wxPoint& p) { x -= p.x; y -= p.y; return *this; } | |
c801d85f KB |
257 | }; |
258 | ||
259 | #if WXWIN_COMPATIBILITY | |
f03fc89f VZ |
260 | #define wxIntPoint wxPoint |
261 | #define wxRectangle wxRect | |
262 | #endif // WXWIN_COMPATIBILITY | |
263 | ||
264 | // --------------------------------------------------------------------------- | |
265 | // wxRect | |
266 | // --------------------------------------------------------------------------- | |
c801d85f | 267 | |
6a6c0a8b JS |
268 | class WXDLLEXPORT wxRect |
269 | { | |
c801d85f | 270 | public: |
a23fd0e1 | 271 | wxRect() { x = y = width = height = 0; } |
72cdf4c9 | 272 | wxRect(int xx, int yy, int ww, int hh) |
a23fd0e1 | 273 | { x = xx; y = yy; width = ww; height = hh; } |
f03fc89f VZ |
274 | wxRect(const wxPoint& topLeft, const wxPoint& bottomRight); |
275 | wxRect(const wxPoint& pos, const wxSize& size); | |
a23fd0e1 VZ |
276 | |
277 | // default copy ctor and assignment operators ok | |
c801d85f | 278 | |
72cdf4c9 VZ |
279 | int GetX() const { return x; } |
280 | void SetX(int xx) { x = xx; } | |
c801d85f | 281 | |
72cdf4c9 VZ |
282 | int GetY() const { return y; } |
283 | void SetY(int yy) { y = yy; } | |
c801d85f | 284 | |
72cdf4c9 VZ |
285 | int GetWidth() const { return width; } |
286 | void SetWidth(int w) { width = w; } | |
c801d85f | 287 | |
72cdf4c9 VZ |
288 | int GetHeight() const { return height; } |
289 | void SetHeight(int h) { height = h; } | |
f03fc89f | 290 | |
dcb44466 JS |
291 | wxPoint GetPosition() const { return wxPoint(x, y); } |
292 | wxSize GetSize() const { return wxSize(width, height); } | |
f03fc89f | 293 | |
72cdf4c9 VZ |
294 | int GetLeft() const { return x; } |
295 | int GetTop() const { return y; } | |
296 | int GetBottom() const { return y + height - 1; } | |
297 | int GetRight() const { return x + width - 1; } | |
f03fc89f | 298 | |
72cdf4c9 VZ |
299 | void SetLeft(int left) { x = left; } |
300 | void SetRight(int right) { width = right - x + 1; } | |
301 | void SetTop(int top) { y = top; } | |
302 | void SetBottom(int bottom) { height = bottom - y + 1; } | |
dcb44466 | 303 | |
45816ddd VZ |
304 | void Inflate(wxCoord dx, wxCoord dy) |
305 | { | |
306 | x -= dx; | |
307 | y -= dy; | |
308 | width += 2*dx; | |
309 | height += 2*dy; | |
310 | } | |
311 | ||
312 | void Inflate(wxCoord d) { Inflate(d, d); } | |
313 | ||
764a3a49 VZ |
314 | bool operator==(const wxRect& rect) const; |
315 | bool operator!=(const wxRect& rect) const { return !(*this == rect); } | |
f03fc89f | 316 | |
7742598f | 317 | bool Inside(int cx, int cy) const; |
59a12e90 | 318 | bool Inside(const wxPoint& pt) const { return Inside(pt.x, pt.y); } |
45816ddd VZ |
319 | wxRect operator+(const wxRect& rect) const; |
320 | wxRect& operator+=(const wxRect& rect); | |
72cdf4c9 | 321 | |
f03fc89f | 322 | public: |
72cdf4c9 | 323 | int x, y, width, height; |
f03fc89f | 324 | }; |
c801d85f | 325 | |
f03fc89f | 326 | // --------------------------------------------------------------------------- |
c801d85f | 327 | // Management of pens, brushes and fonts |
f03fc89f VZ |
328 | // --------------------------------------------------------------------------- |
329 | ||
236a9de3 RL |
330 | typedef wxInt8 wxDash; |
331 | ||
f03fc89f | 332 | class WXDLLEXPORT wxPenList : public wxList |
c801d85f | 333 | { |
f03fc89f VZ |
334 | DECLARE_DYNAMIC_CLASS(wxPenList) |
335 | ||
336 | public: | |
337 | wxPenList() { } | |
338 | ~wxPenList(); | |
339 | ||
340 | void AddPen(wxPen *pen); | |
341 | void RemovePen(wxPen *pen); | |
342 | wxPen *FindOrCreatePen(const wxColour& colour, int width, int style); | |
c801d85f KB |
343 | }; |
344 | ||
f03fc89f | 345 | class WXDLLEXPORT wxBrushList : public wxList |
c801d85f | 346 | { |
f03fc89f VZ |
347 | DECLARE_DYNAMIC_CLASS(wxBrushList) |
348 | ||
349 | public: | |
350 | wxBrushList() { } | |
351 | ~wxBrushList(); | |
352 | ||
353 | void AddBrush(wxBrush *brush); | |
354 | void RemoveBrush(wxBrush *brush); | |
355 | wxBrush *FindOrCreateBrush(const wxColour& colour, int style); | |
c801d85f KB |
356 | }; |
357 | ||
9d2f3c71 | 358 | WXDLLEXPORT_DATA(extern const wxChar*) wxEmptyString; |
c801d85f | 359 | |
f03fc89f | 360 | class WXDLLEXPORT wxFontList : public wxList |
c801d85f | 361 | { |
f03fc89f VZ |
362 | DECLARE_DYNAMIC_CLASS(wxFontList) |
363 | ||
364 | public: | |
365 | wxFontList() { } | |
366 | ~wxFontList(); | |
367 | ||
368 | void AddFont(wxFont *font); | |
369 | void RemoveFont(wxFont *font); | |
370 | wxFont *FindOrCreateFont(int pointSize, int family, int style, int weight, | |
371 | bool underline = FALSE, | |
37bebc11 RD |
372 | const wxString& face = wxEmptyString, |
373 | wxFontEncoding encoding = wxFONTENCODING_DEFAULT); | |
c801d85f KB |
374 | }; |
375 | ||
f03fc89f | 376 | class WXDLLEXPORT wxColourDatabase : public wxList |
c801d85f | 377 | { |
f03fc89f VZ |
378 | DECLARE_CLASS(wxColourDatabase) |
379 | ||
380 | public: | |
381 | wxColourDatabase(int type); | |
382 | ~wxColourDatabase() ; | |
383 | ||
384 | // Not const because it may add a name to the database | |
385 | wxColour *FindColour(const wxString& colour) ; | |
386 | wxString FindName(const wxColour& colour) const; | |
387 | void Initialize(); | |
19bf0c69 DW |
388 | #ifdef __WXPM__ |
389 | // PM keeps its own type of colour table | |
390 | long* m_palTable; | |
391 | size_t m_nSize; | |
392 | #endif | |
c801d85f KB |
393 | }; |
394 | ||
f03fc89f | 395 | class WXDLLEXPORT wxBitmapList : public wxList |
c801d85f | 396 | { |
f03fc89f | 397 | DECLARE_DYNAMIC_CLASS(wxBitmapList) |
c801d85f | 398 | |
f03fc89f VZ |
399 | public: |
400 | wxBitmapList(); | |
401 | ~wxBitmapList(); | |
402 | ||
403 | void AddBitmap(wxBitmap *bitmap); | |
404 | void RemoveBitmap(wxBitmap *bitmap); | |
c801d85f KB |
405 | }; |
406 | ||
f03fc89f VZ |
407 | class WXDLLEXPORT wxResourceCache: public wxList |
408 | { | |
409 | public: | |
410 | wxResourceCache() { } | |
411 | wxResourceCache(const unsigned int keyType) : wxList(keyType) { } | |
412 | ~wxResourceCache(); | |
413 | ||
414 | private: | |
415 | DECLARE_DYNAMIC_CLASS(wxResourceCache) | |
416 | }; | |
417 | ||
418 | // --------------------------------------------------------------------------- | |
419 | // global variables | |
420 | // --------------------------------------------------------------------------- | |
421 | ||
c801d85f | 422 | // Lists of GDI objects |
f03fc89f VZ |
423 | WXDLLEXPORT_DATA(extern wxPenList*) wxThePenList; |
424 | WXDLLEXPORT_DATA(extern wxBrushList*) wxTheBrushList; | |
425 | WXDLLEXPORT_DATA(extern wxFontList*) wxTheFontList; | |
426 | WXDLLEXPORT_DATA(extern wxBitmapList*) wxTheBitmapList; | |
c801d85f KB |
427 | |
428 | // Stock objects | |
f03fc89f VZ |
429 | WXDLLEXPORT_DATA(extern wxFont*) wxNORMAL_FONT; |
430 | WXDLLEXPORT_DATA(extern wxFont*) wxSMALL_FONT; | |
431 | WXDLLEXPORT_DATA(extern wxFont*) wxITALIC_FONT; | |
432 | WXDLLEXPORT_DATA(extern wxFont*) wxSWISS_FONT; | |
433 | ||
434 | WXDLLEXPORT_DATA(extern wxPen*) wxRED_PEN; | |
435 | WXDLLEXPORT_DATA(extern wxPen*) wxCYAN_PEN; | |
436 | WXDLLEXPORT_DATA(extern wxPen*) wxGREEN_PEN; | |
437 | WXDLLEXPORT_DATA(extern wxPen*) wxBLACK_PEN; | |
438 | WXDLLEXPORT_DATA(extern wxPen*) wxWHITE_PEN; | |
439 | WXDLLEXPORT_DATA(extern wxPen*) wxTRANSPARENT_PEN; | |
440 | WXDLLEXPORT_DATA(extern wxPen*) wxBLACK_DASHED_PEN; | |
441 | WXDLLEXPORT_DATA(extern wxPen*) wxGREY_PEN; | |
442 | WXDLLEXPORT_DATA(extern wxPen*) wxMEDIUM_GREY_PEN; | |
443 | WXDLLEXPORT_DATA(extern wxPen*) wxLIGHT_GREY_PEN; | |
444 | ||
445 | WXDLLEXPORT_DATA(extern wxBrush*) wxBLUE_BRUSH; | |
446 | WXDLLEXPORT_DATA(extern wxBrush*) wxGREEN_BRUSH; | |
447 | WXDLLEXPORT_DATA(extern wxBrush*) wxWHITE_BRUSH; | |
448 | WXDLLEXPORT_DATA(extern wxBrush*) wxBLACK_BRUSH; | |
449 | WXDLLEXPORT_DATA(extern wxBrush*) wxGREY_BRUSH; | |
450 | WXDLLEXPORT_DATA(extern wxBrush*) wxMEDIUM_GREY_BRUSH; | |
451 | WXDLLEXPORT_DATA(extern wxBrush*) wxLIGHT_GREY_BRUSH; | |
452 | WXDLLEXPORT_DATA(extern wxBrush*) wxTRANSPARENT_BRUSH; | |
453 | WXDLLEXPORT_DATA(extern wxBrush*) wxCYAN_BRUSH; | |
454 | WXDLLEXPORT_DATA(extern wxBrush*) wxRED_BRUSH; | |
455 | ||
456 | WXDLLEXPORT_DATA(extern wxColour*) wxBLACK; | |
457 | WXDLLEXPORT_DATA(extern wxColour*) wxWHITE; | |
458 | WXDLLEXPORT_DATA(extern wxColour*) wxRED; | |
459 | WXDLLEXPORT_DATA(extern wxColour*) wxBLUE; | |
460 | WXDLLEXPORT_DATA(extern wxColour*) wxGREEN; | |
461 | WXDLLEXPORT_DATA(extern wxColour*) wxCYAN; | |
462 | WXDLLEXPORT_DATA(extern wxColour*) wxLIGHT_GREY; | |
c801d85f KB |
463 | |
464 | // 'Null' objects | |
f03fc89f VZ |
465 | WXDLLEXPORT_DATA(extern wxBitmap) wxNullBitmap; |
466 | WXDLLEXPORT_DATA(extern wxIcon) wxNullIcon; | |
467 | WXDLLEXPORT_DATA(extern wxCursor) wxNullCursor; | |
468 | WXDLLEXPORT_DATA(extern wxPen) wxNullPen; | |
469 | WXDLLEXPORT_DATA(extern wxBrush) wxNullBrush; | |
470 | WXDLLEXPORT_DATA(extern wxPalette) wxNullPalette; | |
471 | WXDLLEXPORT_DATA(extern wxFont) wxNullFont; | |
472 | WXDLLEXPORT_DATA(extern wxColour) wxNullColour; | |
c801d85f KB |
473 | |
474 | // Stock cursors types | |
f03fc89f VZ |
475 | WXDLLEXPORT_DATA(extern wxCursor*) wxSTANDARD_CURSOR; |
476 | WXDLLEXPORT_DATA(extern wxCursor*) wxHOURGLASS_CURSOR; | |
477 | WXDLLEXPORT_DATA(extern wxCursor*) wxCROSS_CURSOR; | |
478 | ||
479 | WXDLLEXPORT_DATA(extern wxColourDatabase*) wxTheColourDatabase; | |
480 | ||
481 | WXDLLEXPORT_DATA(extern const wxChar*) wxPanelNameStr; | |
c801d85f | 482 | |
f03fc89f VZ |
483 | WXDLLEXPORT_DATA(extern const wxSize) wxDefaultSize; |
484 | WXDLLEXPORT_DATA(extern const wxPoint) wxDefaultPosition; | |
485 | ||
486 | // The list of objects which should be deleted | |
487 | WXDLLEXPORT_DATA(extern wxList) wxPendingDelete; | |
488 | ||
489 | // --------------------------------------------------------------------------- | |
490 | // global functions | |
491 | // --------------------------------------------------------------------------- | |
492 | ||
493 | // resource management | |
6a6c0a8b | 494 | extern void WXDLLEXPORT wxInitializeStockObjects(); |
a3622daa | 495 | extern void WXDLLEXPORT wxInitializeStockLists(); |
6a6c0a8b | 496 | extern void WXDLLEXPORT wxDeleteStockObjects(); |
a3622daa | 497 | extern void WXDLLEXPORT wxDeleteStockLists(); |
c801d85f | 498 | |
f03fc89f | 499 | // is the display colour (or monochrome)? |
6a6c0a8b | 500 | extern bool WXDLLEXPORT wxColourDisplay(); |
c801d85f KB |
501 | |
502 | // Returns depth of screen | |
6a6c0a8b JS |
503 | extern int WXDLLEXPORT wxDisplayDepth(); |
504 | #define wxGetDisplayDepth wxDisplayDepth | |
c801d85f | 505 | |
904a68b6 | 506 | // get the display size |
c801d85f | 507 | extern void WXDLLEXPORT wxDisplaySize(int *width, int *height); |
6a6c0a8b | 508 | extern wxSize WXDLLEXPORT wxGetDisplaySize(); |
904a68b6 RL |
509 | extern void WXDLLEXPORT wxDisplaySizeMM(int *width, int *height); |
510 | extern wxSize WXDLLEXPORT wxGetDisplaySizeMM(); | |
c801d85f | 511 | |
ec5d7799 RD |
512 | // Get position and size of the display workarea |
513 | extern void WXDLLEXPORT wxClientDisplayRect(int *x, int *y, int *width, int *height); | |
514 | extern wxRect WXDLLEXPORT wxGetClientDisplayRect(); | |
515 | ||
f03fc89f | 516 | // set global cursor |
c801d85f KB |
517 | extern void WXDLLEXPORT wxSetCursor(const wxCursor& cursor); |
518 | ||
c801d85f | 519 | #endif |
34138703 | 520 | // _WX_GDICMNH__ |