]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gdicmn.h
Remove wxDialog::OnSysColourChanged() documentation.
[wxWidgets.git] / include / wx / gdicmn.h
CommitLineData
c801d85f 1/////////////////////////////////////////////////////////////////////////////
ca3e85cf 2// Name: wx/gdicmn.h
c801d85f
KB
3// Purpose: Common GDI classes, types and declarations
4// Author: Julian Smart
5// Modified by:
6// Created: 01/02/97
7// RCS-ID: $Id$
99d80019 8// Copyright: (c) Julian Smart
65571936 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
2ecf902b 19#include "wx/defs.h"
c801d85f 20#include "wx/list.h"
34138703 21#include "wx/string.h"
ed39ff57 22#include "wx/fontenc.h"
f79f1604 23#include "wx/hashmap.h"
bc14c8b2 24#include "wx/math.h"
c801d85f 25
f03fc89f
VZ
26// ---------------------------------------------------------------------------
27// forward declarations
28// ---------------------------------------------------------------------------
29
b5dbe15d
VS
30class WXDLLIMPEXP_FWD_CORE wxBitmap;
31class WXDLLIMPEXP_FWD_CORE wxBrush;
32class WXDLLIMPEXP_FWD_CORE wxColour;
33class WXDLLIMPEXP_FWD_CORE wxCursor;
34class WXDLLIMPEXP_FWD_CORE wxFont;
35class WXDLLIMPEXP_FWD_CORE wxIcon;
36class WXDLLIMPEXP_FWD_CORE wxPalette;
37class WXDLLIMPEXP_FWD_CORE wxPen;
38class WXDLLIMPEXP_FWD_CORE wxRegion;
39class WXDLLIMPEXP_FWD_BASE wxString;
40class WXDLLIMPEXP_FWD_CORE wxIconBundle;
41class WXDLLIMPEXP_FWD_CORE wxPoint;
f03fc89f
VZ
42
43// ---------------------------------------------------------------------------
44// constants
45// ---------------------------------------------------------------------------
46
47// Bitmap flags
2aeec9ec 48enum wxBitmapType
f03fc89f 49{
6d167489
VZ
50 wxBITMAP_TYPE_INVALID, // should be == 0 for compatibility!
51 wxBITMAP_TYPE_BMP,
f03fc89f
VZ
52 wxBITMAP_TYPE_BMP_RESOURCE,
53 wxBITMAP_TYPE_RESOURCE = wxBITMAP_TYPE_BMP_RESOURCE,
54 wxBITMAP_TYPE_ICO,
55 wxBITMAP_TYPE_ICO_RESOURCE,
56 wxBITMAP_TYPE_CUR,
57 wxBITMAP_TYPE_CUR_RESOURCE,
58 wxBITMAP_TYPE_XBM,
59 wxBITMAP_TYPE_XBM_DATA,
60 wxBITMAP_TYPE_XPM,
61 wxBITMAP_TYPE_XPM_DATA,
4ca8531f
DS
62 wxBITMAP_TYPE_TIFF,
63 wxBITMAP_TYPE_TIF = wxBITMAP_TYPE_TIFF,
64 wxBITMAP_TYPE_TIFF_RESOURCE,
65 wxBITMAP_TYPE_TIF_RESOURCE = wxBITMAP_TYPE_TIFF_RESOURCE,
f03fc89f
VZ
66 wxBITMAP_TYPE_GIF,
67 wxBITMAP_TYPE_GIF_RESOURCE,
68 wxBITMAP_TYPE_PNG,
69 wxBITMAP_TYPE_PNG_RESOURCE,
70 wxBITMAP_TYPE_JPEG,
71 wxBITMAP_TYPE_JPEG_RESOURCE,
bcc46c75
SB
72 wxBITMAP_TYPE_PNM,
73 wxBITMAP_TYPE_PNM_RESOURCE,
6523d119
GRG
74 wxBITMAP_TYPE_PCX,
75 wxBITMAP_TYPE_PCX_RESOURCE,
6d167489
VZ
76 wxBITMAP_TYPE_PICT,
77 wxBITMAP_TYPE_PICT_RESOURCE,
78 wxBITMAP_TYPE_ICON,
79 wxBITMAP_TYPE_ICON_RESOURCE,
658974ae 80 wxBITMAP_TYPE_ANI,
63f8abca 81 wxBITMAP_TYPE_IFF,
3af706cc 82 wxBITMAP_TYPE_TGA,
6d167489
VZ
83 wxBITMAP_TYPE_MACCURSOR,
84 wxBITMAP_TYPE_MACCURSOR_RESOURCE,
d75a69e8
FM
85
86 wxBITMAP_TYPE_MAX,
f03fc89f
VZ
87 wxBITMAP_TYPE_ANY = 50
88};
89
89efaf2b
FM
90// Polygon filling mode
91enum wxPolygonFillMode
92{
93 wxODDEVEN_RULE = 1,
94 wxWINDING_RULE
95};
96
c801d85f 97// Standard cursors
f03fc89f
VZ
98enum wxStockCursor
99{
100 wxCURSOR_NONE, // should be 0
101 wxCURSOR_ARROW,
15dadf31 102 wxCURSOR_RIGHT_ARROW,
f03fc89f
VZ
103 wxCURSOR_BULLSEYE,
104 wxCURSOR_CHAR,
105 wxCURSOR_CROSS,
106 wxCURSOR_HAND,
107 wxCURSOR_IBEAM,
108 wxCURSOR_LEFT_BUTTON,
109 wxCURSOR_MAGNIFIER,
110 wxCURSOR_MIDDLE_BUTTON,
111 wxCURSOR_NO_ENTRY,
112 wxCURSOR_PAINT_BRUSH,
113 wxCURSOR_PENCIL,
114 wxCURSOR_POINT_LEFT,
115 wxCURSOR_POINT_RIGHT,
116 wxCURSOR_QUESTION_ARROW,
117 wxCURSOR_RIGHT_BUTTON,
118 wxCURSOR_SIZENESW,
119 wxCURSOR_SIZENS,
120 wxCURSOR_SIZENWSE,
121 wxCURSOR_SIZEWE,
122 wxCURSOR_SIZING,
123 wxCURSOR_SPRAYCAN,
124 wxCURSOR_WAIT,
125 wxCURSOR_WATCH,
126 wxCURSOR_BLANK,
ae53c98c
KB
127#ifdef __WXGTK__
128 wxCURSOR_DEFAULT, // standard X11 cursor
129#endif
5f7a6626 130#ifdef __WXMAC__
5d3e7b52 131 wxCURSOR_COPY_ARROW , // MacOS Theme Plus arrow
5f7a6626 132#endif
c801d85f 133#ifdef __X__
f03fc89f
VZ
134 // Not yet implemented for Windows
135 wxCURSOR_CROSS_REVERSE,
136 wxCURSOR_DOUBLE_ARROW,
137 wxCURSOR_BASED_ARROW_UP,
ea804aad 138 wxCURSOR_BASED_ARROW_DOWN,
f03fc89f 139#endif // X11
83f96286 140 wxCURSOR_ARROWWAIT,
ca91e1eb 141#ifdef __WXMAC__
87315ea2
FM
142 wxCURSOR_OPEN_HAND,
143 wxCURSOR_CLOSED_HAND,
ca91e1eb 144#endif
83f96286 145
f03fc89f
VZ
146 wxCURSOR_MAX
147};
148
943d28e4 149#ifndef __WXGTK__
87315ea2 150 #define wxCURSOR_DEFAULT wxCURSOR_ARROW
943d28e4
VZ
151#endif
152
ca91e1eb
SC
153#ifndef __WXMAC__
154 // TODO CS supply openhand and closedhand cursors
87315ea2
FM
155 #define wxCURSOR_OPEN_HAND wxCURSOR_HAND
156 #define wxCURSOR_CLOSED_HAND wxCURSOR_HAND
ca91e1eb
SC
157#endif
158
f03fc89f
VZ
159// ---------------------------------------------------------------------------
160// macros
161// ---------------------------------------------------------------------------
162
163/* Useful macro for creating icons portably, for example:
164
3cb332c1 165 wxIcon *icon = new wxICON(sample);
f03fc89f
VZ
166
167 expands into:
168
3cb332c1
VZ
169 wxIcon *icon = new wxIcon("sample"); // On wxMSW
170 wxIcon *icon = new wxIcon(sample_xpm); // On wxGTK
f03fc89f
VZ
171 */
172
173#ifdef __WXMSW__
174 // Load from a resource
2b5f62a0 175 #define wxICON(X) wxIcon(wxT(#X))
1777b9bb
DW
176#elif defined(__WXPM__)
177 // Load from a resource
2b5f62a0 178 #define wxICON(X) wxIcon(wxT(#X))
d8bfd727
VS
179#elif defined(__WXDFB__)
180 // Initialize from an included XPM
e45080c1 181 #define wxICON(X) wxIcon( X##_xpm )
f03fc89f
VZ
182#elif defined(__WXGTK__)
183 // Initialize from an included XPM
e45080c1 184 #define wxICON(X) wxIcon( X##_xpm )
0532484d
GD
185#elif defined(__WXMAC__)
186 // Initialize from an included XPM
e45080c1 187 #define wxICON(X) wxIcon( X##_xpm )
f03fc89f
VZ
188#elif defined(__WXMOTIF__)
189 // Initialize from an included XPM
190 #define wxICON(X) wxIcon( X##_xpm )
83df96d6
JS
191#elif defined(__WXX11__)
192 // Initialize from an included XPM
193 #define wxICON(X) wxIcon( X##_xpm )
f03fc89f
VZ
194#else
195 // This will usually mean something on any platform
2b5f62a0 196 #define wxICON(X) wxIcon(wxT(#X))
f03fc89f
VZ
197#endif // platform
198
0c5d3e1c
VZ
199/* Another macro: this one is for portable creation of bitmaps. We assume that
200 under Unix bitmaps live in XPMs and under Windows they're in ressources.
201 */
202
1d965e2f 203#if defined(__WXMSW__) || defined(__WXPM__)
4ca8531f 204 #define wxBITMAP(name) wxBitmap(wxT(#name), wxBITMAP_TYPE_BMP_RESOURCE)
d22004c4
WS
205#elif defined(__WXGTK__) || \
206 defined(__WXMOTIF__) || \
207 defined(__WXX11__) || \
208 defined(__WXMAC__) || \
d8bfd727 209 defined(__WXDFB__) || \
d22004c4 210 defined(__WXCOCOA__)
bab537dc 211 // Initialize from an included XPM
e45080c1 212 #define wxBITMAP(name) wxBitmap(name##_xpm)
b8aa1680 213#else // other platforms
0c5d3e1c
VZ
214 #define wxBITMAP(name) wxBitmap(name##_xpm, wxBITMAP_TYPE_XPM)
215#endif // platform
216
f03fc89f
VZ
217// ===========================================================================
218// classes
219// ===========================================================================
c801d85f 220
f03fc89f
VZ
221// ---------------------------------------------------------------------------
222// wxSize
223// ---------------------------------------------------------------------------
1e6feb95 224
53a2db12 225class WXDLLIMPEXP_CORE wxSize
c801d85f
KB
226{
227public:
e6c96a7c 228 // members are public for compatibility, don't use them directly.
72cdf4c9 229 int x, y;
f03fc89f
VZ
230
231 // constructors
7ee31b00
GD
232 wxSize() : x(0), y(0) { }
233 wxSize(int xx, int yy) : x(xx), y(yy) { }
f03fc89f
VZ
234
235 // no copy ctor or assignment operator - the defaults are ok
1e6feb95 236
fc84bd05
WS
237 wxSize& operator+=(const wxSize& sz) { x += sz.x; y += sz.y; return *this; }
238 wxSize& operator-=(const wxSize& sz) { x -= sz.x; y -= sz.y; return *this; }
bc5e942b
VZ
239 wxSize& operator/=(int i) { x /= i; y /= i; return *this; }
240 wxSize& operator*=(int i) { x *= i; y *= i; return *this; }
06d7b217
FM
241 wxSize& operator/=(unsigned int i) { x /= i; y /= i; return *this; }
242 wxSize& operator*=(unsigned int i) { x *= i; y *= i; return *this; }
243 wxSize& operator/=(long i) { x /= i; y /= i; return *this; }
244 wxSize& operator*=(long i) { x *= i; y *= i; return *this; }
245 wxSize& operator/=(unsigned long i) { x /= i; y /= i; return *this; }
246 wxSize& operator*=(unsigned long i) { x *= i; y *= i; return *this; }
ee08bdb5
FM
247 wxSize& operator/=(double i) { x = int(x/i); y = int(y/i); return *this; }
248 wxSize& operator*=(double i) { x = int(x*i); y = int(y*i); return *this; }
706f1421 249
5b087ae2
VZ
250 void IncTo(const wxSize& sz)
251 { if ( sz.x > x ) x = sz.x; if ( sz.y > y ) y = sz.y; }
252 void DecTo(const wxSize& sz)
253 { if ( sz.x < x ) x = sz.x; if ( sz.y < y ) y = sz.y; }
f03fc89f 254
23359747 255 void IncBy(int dx, int dy) { x += dx; y += dy; }
89b799cc 256 void IncBy(const wxPoint& pt);
23359747
VZ
257 void IncBy(const wxSize& sz) { IncBy(sz.x, sz.y); }
258 void IncBy(int d) { IncBy(d, d); }
259
260 void DecBy(int dx, int dy) { IncBy(-dx, -dy); }
89b799cc 261 void DecBy(const wxPoint& pt);
23359747
VZ
262 void DecBy(const wxSize& sz) { DecBy(sz.x, sz.y); }
263 void DecBy(int d) { DecBy(d, d); }
264
265
c5bad604
RR
266 wxSize& Scale(float xscale, float yscale)
267 { x = (int)(x*xscale); y = (int)(y*yscale); return *this; }
8efb2907 268
eddf46fe
JS
269 // accessors
270 void Set(int xx, int yy) { x = xx; y = yy; }
72cdf4c9
VZ
271 void SetWidth(int w) { x = w; }
272 void SetHeight(int h) { y = h; }
cc775580 273
72cdf4c9
VZ
274 int GetWidth() const { return x; }
275 int GetHeight() const { return y; }
f03fc89f 276
5d3e7b52 277 bool IsFullySpecified() const { return x != wxDefaultCoord && y != wxDefaultCoord; }
706f1421
VZ
278
279 // combine this size with the other one replacing the default (i.e. equal
5d3e7b52 280 // to wxDefaultCoord) components of this object with those of the other
706f1421
VZ
281 void SetDefaults(const wxSize& size)
282 {
5d3e7b52 283 if ( x == wxDefaultCoord )
706f1421 284 x = size.x;
5d3e7b52 285 if ( y == wxDefaultCoord )
706f1421
VZ
286 y = size.y;
287 }
288
cc775580 289 // compatibility
72cdf4c9
VZ
290 int GetX() const { return x; }
291 int GetY() const { return y; }
c801d85f
KB
292};
293
bc5e942b
VZ
294inline bool operator==(const wxSize& s1, const wxSize& s2)
295{
296 return s1.x == s2.x && s1.y == s2.y;
297}
298
299inline bool operator!=(const wxSize& s1, const wxSize& s2)
300{
301 return s1.x != s2.x || s1.y != s2.y;
302}
303
bc5e942b
VZ
304inline wxSize operator+(const wxSize& s1, const wxSize& s2)
305{
306 return wxSize(s1.x + s2.x, s1.y + s2.y);
307}
308
bc5e942b
VZ
309inline wxSize operator-(const wxSize& s1, const wxSize& s2)
310{
311 return wxSize(s1.x - s2.x, s1.y - s2.y);
312}
313
bc5e942b
VZ
314inline wxSize operator/(const wxSize& s, int i)
315{
316 return wxSize(s.x / i, s.y / i);
317}
318
bc5e942b
VZ
319inline wxSize operator*(const wxSize& s, int i)
320{
321 return wxSize(s.x * i, s.y * i);
322}
323
bc5e942b
VZ
324inline wxSize operator*(int i, const wxSize& s)
325{
326 return wxSize(s.x * i, s.y * i);
327}
328
06d7b217
FM
329inline wxSize operator/(const wxSize& s, unsigned int i)
330{
331 return wxSize(s.x / i, s.y / i);
332}
333
334inline wxSize operator*(const wxSize& s, unsigned int i)
335{
336 return wxSize(s.x * i, s.y * i);
337}
338
339inline wxSize operator*(unsigned int i, const wxSize& s)
340{
341 return wxSize(s.x * i, s.y * i);
342}
343
344inline wxSize operator/(const wxSize& s, long i)
345{
346 return wxSize(s.x / i, s.y / i);
347}
348
349inline wxSize operator*(const wxSize& s, long i)
350{
351 return wxSize(s.x * i, s.y * i);
352}
353
354inline wxSize operator*(long i, const wxSize& s)
355{
356 return wxSize(s.x * i, s.y * i);
357}
358
359inline wxSize operator/(const wxSize& s, unsigned long i)
360{
361 return wxSize(s.x / i, s.y / i);
362}
363
364inline wxSize operator*(const wxSize& s, unsigned long i)
365{
366 return wxSize(s.x * i, s.y * i);
367}
368
369inline wxSize operator*(unsigned long i, const wxSize& s)
370{
371 return wxSize(s.x * i, s.y * i);
372}
373
91743643
FM
374inline wxSize operator*(const wxSize& s, double i)
375{
ee08bdb5 376 return wxSize(int(s.x * i), int(s.y * i));
91743643
FM
377}
378
379inline wxSize operator*(double i, const wxSize& s)
380{
ee08bdb5 381 return wxSize(int(s.x * i), int(s.y * i));
91743643 382}
bc5e942b
VZ
383
384
385
f03fc89f
VZ
386// ---------------------------------------------------------------------------
387// Point classes: with real or integer coordinates
388// ---------------------------------------------------------------------------
764a3a49 389
53a2db12 390class WXDLLIMPEXP_CORE wxRealPoint
c801d85f 391{
f03fc89f
VZ
392public:
393 double x;
394 double y;
395
7ee31b00
GD
396 wxRealPoint() : x(0.0), y(0.0) { }
397 wxRealPoint(double xx, double yy) : x(xx), y(yy) { }
a5664fd6 398 wxRealPoint(const wxPoint& pt);
89b799cc 399
a5664fd6
FM
400 // no copy ctor or assignment operator - the defaults are ok
401
402 //assignment operators
403 wxRealPoint& operator+=(const wxRealPoint& p) { x += p.x; y += p.y; return *this; }
404 wxRealPoint& operator-=(const wxRealPoint& p) { x -= p.x; y -= p.y; return *this; }
405
406 wxRealPoint& operator+=(const wxSize& s) { x += s.GetWidth(); y += s.GetHeight(); return *this; }
407 wxRealPoint& operator-=(const wxSize& s) { x -= s.GetWidth(); y -= s.GetHeight(); return *this; }
bc5e942b 408};
f03fc89f 409
f03fc89f 410
bc5e942b
VZ
411inline bool operator==(const wxRealPoint& p1, const wxRealPoint& p2)
412{
413 return wxIsSameDouble(p1.x, p2.x) && wxIsSameDouble(p1.y, p2.y);
414}
415
bc5e942b
VZ
416inline bool operator!=(const wxRealPoint& p1, const wxRealPoint& p2)
417{
418 return !(p1 == p2);
419}
420
bc5e942b
VZ
421inline wxRealPoint operator+(const wxRealPoint& p1, const wxRealPoint& p2)
422{
423 return wxRealPoint(p1.x + p2.x, p1.y + p2.y);
424}
425
426
427inline wxRealPoint operator-(const wxRealPoint& p1, const wxRealPoint& p2)
428{
429 return wxRealPoint(p1.x - p2.x, p1.y - p2.y);
430}
c801d85f 431
bc14c8b2 432
8b655c80
FM
433inline wxRealPoint operator/(const wxRealPoint& s, int i)
434{
435 return wxRealPoint(s.x / i, s.y / i);
436}
437
438inline wxRealPoint operator*(const wxRealPoint& s, int i)
439{
440 return wxRealPoint(s.x * i, s.y * i);
441}
442
443inline wxRealPoint operator*(int i, const wxRealPoint& s)
444{
445 return wxRealPoint(s.x * i, s.y * i);
446}
447
448inline wxRealPoint operator/(const wxRealPoint& s, unsigned int i)
449{
450 return wxRealPoint(s.x / i, s.y / i);
451}
452
453inline wxRealPoint operator*(const wxRealPoint& s, unsigned int i)
454{
455 return wxRealPoint(s.x * i, s.y * i);
456}
457
458inline wxRealPoint operator*(unsigned int i, const wxRealPoint& s)
459{
460 return wxRealPoint(s.x * i, s.y * i);
461}
462
463inline wxRealPoint operator/(const wxRealPoint& s, long i)
464{
465 return wxRealPoint(s.x / i, s.y / i);
466}
467
468inline wxRealPoint operator*(const wxRealPoint& s, long i)
469{
470 return wxRealPoint(s.x * i, s.y * i);
471}
472
473inline wxRealPoint operator*(long i, const wxRealPoint& s)
474{
475 return wxRealPoint(s.x * i, s.y * i);
476}
477
478inline wxRealPoint operator/(const wxRealPoint& s, unsigned long i)
479{
480 return wxRealPoint(s.x / i, s.y / i);
481}
482
483inline wxRealPoint operator*(const wxRealPoint& s, unsigned long i)
484{
485 return wxRealPoint(s.x * i, s.y * i);
486}
487
488inline wxRealPoint operator*(unsigned long i, const wxRealPoint& s)
489{
490 return wxRealPoint(s.x * i, s.y * i);
491}
492
493inline wxRealPoint operator*(const wxRealPoint& s, double i)
494{
495 return wxRealPoint(int(s.x * i), int(s.y * i));
496}
497
498inline wxRealPoint operator*(double i, const wxRealPoint& s)
499{
500 return wxRealPoint(int(s.x * i), int(s.y * i));
501}
502
503
bc5e942b
VZ
504// ----------------------------------------------------------------------------
505// wxPoint: 2D point with integer coordinates
506// ----------------------------------------------------------------------------
507
53a2db12 508class WXDLLIMPEXP_CORE wxPoint
c801d85f 509{
f03fc89f 510public:
72cdf4c9 511 int x, y;
6a6c0a8b 512
7ee31b00
GD
513 wxPoint() : x(0), y(0) { }
514 wxPoint(int xx, int yy) : x(xx), y(yy) { }
fb0165df 515 wxPoint(const wxRealPoint& pt) : x(int(pt.x)), y(int(pt.y)) { }
f03fc89f
VZ
516
517 // no copy ctor or assignment operator - the defaults are ok
6a6c0a8b 518
bc5e942b 519 //assignment operators
764a3a49
VZ
520 wxPoint& operator+=(const wxPoint& p) { x += p.x; y += p.y; return *this; }
521 wxPoint& operator-=(const wxPoint& p) { x -= p.x; y -= p.y; return *this; }
d02bc4c8
JS
522
523 wxPoint& operator+=(const wxSize& s) { x += s.GetWidth(); y += s.GetHeight(); return *this; }
524 wxPoint& operator-=(const wxSize& s) { x -= s.GetWidth(); y -= s.GetHeight(); return *this; }
06cfc052
VZ
525
526 // check if both components are set/initialized
527 bool IsFullySpecified() const { return x != wxDefaultCoord && y != wxDefaultCoord; }
528
529 // fill in the unset components with the values from the other point
530 void SetDefaults(const wxPoint& pt)
531 {
532 if ( x == wxDefaultCoord )
533 x = pt.x;
534 if ( y == wxDefaultCoord )
535 y = pt.y;
536 }
bc5e942b 537};
d02bc4c8 538
24b800a9 539
bc5e942b
VZ
540// comparison
541inline bool operator==(const wxPoint& p1, const wxPoint& p2)
542{
543 return p1.x == p2.x && p1.y == p2.y;
544}
545
546inline bool operator!=(const wxPoint& p1, const wxPoint& p2)
547{
548 return !(p1 == p2);
549}
550
551
552// arithmetic operations (component wise)
553inline wxPoint operator+(const wxPoint& p1, const wxPoint& p2)
554{
555 return wxPoint(p1.x + p2.x, p1.y + p2.y);
556}
557
558inline wxPoint operator-(const wxPoint& p1, const wxPoint& p2)
559{
560 return wxPoint(p1.x - p2.x, p1.y - p2.y);
561}
562
563inline wxPoint operator+(const wxPoint& p, const wxSize& s)
564{
565 return wxPoint(p.x + s.x, p.y + s.y);
566}
567
568inline wxPoint operator-(const wxPoint& p, const wxSize& s)
569{
570 return wxPoint(p.x - s.x, p.y - s.y);
571}
572
573inline wxPoint operator+(const wxSize& s, const wxPoint& p)
574{
575 return wxPoint(p.x + s.x, p.y + s.y);
576}
577
578inline wxPoint operator-(const wxSize& s, const wxPoint& p)
579{
580 return wxPoint(s.x - p.x, s.y - p.y);
581}
582
583inline wxPoint operator-(const wxPoint& p)
584{
585 return wxPoint(-p.x, -p.y);
586}
587
ed0dd9c1
FM
588inline wxPoint operator/(const wxPoint& s, int i)
589{
590 return wxPoint(s.x / i, s.y / i);
591}
592
593inline wxPoint operator*(const wxPoint& s, int i)
594{
595 return wxPoint(s.x * i, s.y * i);
596}
597
598inline wxPoint operator*(int i, const wxPoint& s)
599{
600 return wxPoint(s.x * i, s.y * i);
601}
602
603inline wxPoint operator/(const wxPoint& s, unsigned int i)
604{
605 return wxPoint(s.x / i, s.y / i);
606}
607
608inline wxPoint operator*(const wxPoint& s, unsigned int i)
609{
610 return wxPoint(s.x * i, s.y * i);
611}
612
613inline wxPoint operator*(unsigned int i, const wxPoint& s)
614{
615 return wxPoint(s.x * i, s.y * i);
616}
617
618inline wxPoint operator/(const wxPoint& s, long i)
619{
620 return wxPoint(s.x / i, s.y / i);
621}
622
623inline wxPoint operator*(const wxPoint& s, long i)
624{
625 return wxPoint(s.x * i, s.y * i);
626}
627
628inline wxPoint operator*(long i, const wxPoint& s)
629{
630 return wxPoint(s.x * i, s.y * i);
631}
632
633inline wxPoint operator/(const wxPoint& s, unsigned long i)
634{
635 return wxPoint(s.x / i, s.y / i);
636}
637
638inline wxPoint operator*(const wxPoint& s, unsigned long i)
639{
640 return wxPoint(s.x * i, s.y * i);
641}
642
643inline wxPoint operator*(unsigned long i, const wxPoint& s)
644{
645 return wxPoint(s.x * i, s.y * i);
646}
647
648inline wxPoint operator*(const wxPoint& s, double i)
649{
650 return wxPoint(int(s.x * i), int(s.y * i));
651}
652
653inline wxPoint operator*(double i, const wxPoint& s)
654{
655 return wxPoint(int(s.x * i), int(s.y * i));
656}
657
b0d7707b 658WX_DECLARE_LIST_WITH_DECL(wxPoint, wxPointList, class WXDLLIMPEXP_CORE);
c801d85f 659
f03fc89f
VZ
660// ---------------------------------------------------------------------------
661// wxRect
662// ---------------------------------------------------------------------------
c801d85f 663
53a2db12 664class WXDLLIMPEXP_CORE wxRect
6a6c0a8b 665{
c801d85f 666public:
7ee31b00
GD
667 wxRect()
668 : x(0), y(0), width(0), height(0)
669 { }
72cdf4c9 670 wxRect(int xx, int yy, int ww, int hh)
7ee31b00
GD
671 : x(xx), y(yy), width(ww), height(hh)
672 { }
f03fc89f 673 wxRect(const wxPoint& topLeft, const wxPoint& bottomRight);
df83b840
VZ
674 wxRect(const wxPoint& pt, const wxSize& size)
675 : x(pt.x), y(pt.y), width(size.x), height(size.y)
676 { }
677 wxRect(const wxSize& size)
678 : x(0), y(0), width(size.x), height(size.y)
679 { }
a23fd0e1
VZ
680
681 // default copy ctor and assignment operators ok
c801d85f 682
72cdf4c9
VZ
683 int GetX() const { return x; }
684 void SetX(int xx) { x = xx; }
c801d85f 685
72cdf4c9
VZ
686 int GetY() const { return y; }
687 void SetY(int yy) { y = yy; }
c801d85f 688
72cdf4c9
VZ
689 int GetWidth() const { return width; }
690 void SetWidth(int w) { width = w; }
c801d85f 691
72cdf4c9
VZ
692 int GetHeight() const { return height; }
693 void SetHeight(int h) { height = h; }
f03fc89f 694
dcb44466 695 wxPoint GetPosition() const { return wxPoint(x, y); }
4aa0010b
RL
696 void SetPosition( const wxPoint &p ) { x = p.x; y = p.y; }
697
dcb44466 698 wxSize GetSize() const { return wxSize(width, height); }
4aa0010b 699 void SetSize( const wxSize &s ) { width = s.GetWidth(); height = s.GetHeight(); }
f03fc89f 700
b737ad10
RR
701 bool IsEmpty() const { return (width <= 0) || (height <= 0); }
702
f790ec82
VZ
703 int GetLeft() const { return x; }
704 int GetTop() const { return y; }
705 int GetBottom() const { return y + height - 1; }
706 int GetRight() const { return x + width - 1; }
707
708 void SetLeft(int left) { x = left; }
709 void SetRight(int right) { width = right - x + 1; }
710 void SetTop(int top) { y = top; }
711 void SetBottom(int bottom) { height = bottom - y + 1; }
712
355a5e2b
JS
713 wxPoint GetTopLeft() const { return GetPosition(); }
714 wxPoint GetLeftTop() const { return GetTopLeft(); }
715 void SetTopLeft(const wxPoint &p) { SetPosition(p); }
716 void SetLeftTop(const wxPoint &p) { SetTopLeft(p); }
717
718 wxPoint GetBottomRight() const { return wxPoint(GetRight(), GetBottom()); }
719 wxPoint GetRightBottom() const { return GetBottomRight(); }
720 void SetBottomRight(const wxPoint &p) { SetRight(p.x); SetBottom(p.y); }
721 void SetRightBottom(const wxPoint &p) { SetBottomRight(p); }
722
f790ec82
VZ
723 wxPoint GetTopRight() const { return wxPoint(GetRight(), GetTop()); }
724 wxPoint GetRightTop() const { return GetTopRight(); }
725 void SetTopRight(const wxPoint &p) { SetRight(p.x); SetTop(p.y); }
afa111d5 726 void SetRightTop(const wxPoint &p) { SetTopRight(p); }
f03fc89f 727
f790ec82
VZ
728 wxPoint GetBottomLeft() const { return wxPoint(GetLeft(), GetBottom()); }
729 wxPoint GetLeftBottom() const { return GetBottomLeft(); }
730 void SetBottomLeft(const wxPoint &p) { SetLeft(p.x); SetBottom(p.y); }
731 void SetLeftBottom(const wxPoint &p) { SetBottomLeft(p); }
dcb44466 732
1e6feb95
VZ
733 // operations with rect
734 wxRect& Inflate(wxCoord dx, wxCoord dy);
c2c4d939 735 wxRect& Inflate(const wxSize& d) { return Inflate(d.x, d.y); }
1e6feb95
VZ
736 wxRect& Inflate(wxCoord d) { return Inflate(d, d); }
737 wxRect Inflate(wxCoord dx, wxCoord dy) const
738 {
739 wxRect r = *this;
740 r.Inflate(dx, dy);
741 return r;
742 }
743
744 wxRect& Deflate(wxCoord dx, wxCoord dy) { return Inflate(-dx, -dy); }
c2c4d939 745 wxRect& Deflate(const wxSize& d) { return Inflate(-d.x, -d.y); }
1e6feb95
VZ
746 wxRect& Deflate(wxCoord d) { return Inflate(-d); }
747 wxRect Deflate(wxCoord dx, wxCoord dy) const
748 {
749 wxRect r = *this;
750 r.Deflate(dx, dy);
751 return r;
752 }
753
754 void Offset(wxCoord dx, wxCoord dy) { x += dx; y += dy; }
755 void Offset(const wxPoint& pt) { Offset(pt.x, pt.y); }
756
757 wxRect& Intersect(const wxRect& rect);
758 wxRect Intersect(const wxRect& rect) const
45816ddd 759 {
1e6feb95
VZ
760 wxRect r = *this;
761 r.Intersect(rect);
762 return r;
45816ddd
VZ
763 }
764
df83b840
VZ
765 wxRect& Union(const wxRect& rect);
766 wxRect Union(const wxRect& rect) const
767 {
768 wxRect r = *this;
769 r.Union(rect);
770 return r;
771 }
45816ddd 772
5d3e7b52 773 // return true if the point is (not strcitly) inside the rect
22a35096
VS
774 bool Contains(int x, int y) const;
775 bool Contains(const wxPoint& pt) const { return Contains(pt.x, pt.y); }
fc01e9b3 776 // return true if the rectangle 'rect' is (not strictly) inside this rect
22a35096
VS
777 bool Contains(const wxRect& rect) const;
778
779#if WXWIN_COMPATIBILITY_2_6
780 // use Contains() instead
781 wxDEPRECATED( bool Inside(int x, int y) const );
782 wxDEPRECATED( bool Inside(const wxPoint& pt) const );
783 wxDEPRECATED( bool Inside(const wxRect& rect) const );
784#endif // WXWIN_COMPATIBILITY_2_6
1e6feb95 785
5d3e7b52 786 // return true if the rectangles have a non empty intersection
1e6feb95 787 bool Intersects(const wxRect& rect) const;
72cdf4c9 788
bc5e942b
VZ
789 // like Union() but don't ignore empty rectangles
790 wxRect& operator+=(const wxRect& rect);
df83b840 791
bc5e942b
VZ
792 // intersections of two rectrangles not testing for empty rectangles
793 wxRect& operator*=(const wxRect& rect);
df83b840 794
1bfb73b8
VZ
795 // centre this rectangle in the given (usually, but not necessarily,
796 // larger) one
797 wxRect CentreIn(const wxRect& r, int dir = wxBOTH) const
798 {
799 return wxRect(dir & wxHORIZONTAL ? r.x + (r.width - width)/2 : x,
800 dir & wxVERTICAL ? r.y + (r.height - height)/2 : y,
801 width, height);
802 }
803
804 wxRect CenterIn(const wxRect& r, int dir = wxBOTH) const
805 {
806 return CentreIn(r, dir);
807 }
808
f03fc89f 809public:
72cdf4c9 810 int x, y, width, height;
f03fc89f 811};
c801d85f 812
bc5e942b
VZ
813
814// compare rectangles
815inline bool operator==(const wxRect& r1, const wxRect& r2)
816{
817 return (r1.x == r2.x) && (r1.y == r2.y) &&
818 (r1.width == r2.width) && (r1.height == r2.height);
819}
820
821inline bool operator!=(const wxRect& r1, const wxRect& r2)
822{
823 return !(r1 == r2);
824}
825
826// like Union() but don't treat empty rectangles specially
827WXDLLIMPEXP_CORE wxRect operator+(const wxRect& r1, const wxRect& r2);
828
829// intersections of two rectangles
830WXDLLIMPEXP_CORE wxRect operator*(const wxRect& r1, const wxRect& r2);
831
832
833
834
22a35096 835#if WXWIN_COMPATIBILITY_2_6
3e69f6e5 836inline bool wxRect::Inside(int cx, int cy) const { return Contains(cx, cy); }
22a35096
VS
837inline bool wxRect::Inside(const wxPoint& pt) const { return Contains(pt); }
838inline bool wxRect::Inside(const wxRect& rect) const { return Contains(rect); }
839#endif // WXWIN_COMPATIBILITY_2_6
840
841
89b799cc
VZ
842// define functions which couldn't be defined above because of declarations
843// order
844inline void wxSize::IncBy(const wxPoint& pt) { IncBy(pt.x, pt.y); }
845inline void wxSize::DecBy(const wxPoint& pt) { DecBy(pt.x, pt.y); }
846
f03fc89f 847// ---------------------------------------------------------------------------
c801d85f 848// Management of pens, brushes and fonts
f03fc89f
VZ
849// ---------------------------------------------------------------------------
850
236a9de3
RL
851typedef wxInt8 wxDash;
852
1de8d512 853class WXDLLIMPEXP_CORE wxGDIObjListBase {
f03fc89f 854public:
1de8d512
VZ
855 wxGDIObjListBase();
856 ~wxGDIObjListBase();
f03fc89f 857
1de8d512
VZ
858protected:
859 wxList list;
c801d85f
KB
860};
861
f79f1604
PC
862WX_DECLARE_STRING_HASH_MAP(wxColour*, wxStringToColourHashMap);
863
53a2db12 864class WXDLLIMPEXP_CORE wxColourDatabase
c801d85f 865{
f03fc89f 866public:
222ed1d6 867 wxColourDatabase();
c50f92d0 868 ~wxColourDatabase();
f03fc89f 869
c50f92d0
VZ
870 // find colour by name or name for the given colour
871 wxColour Find(const wxString& name) const;
f03fc89f 872 wxString FindName(const wxColour& colour) const;
c50f92d0
VZ
873
874 // add a new colour to the database
875 void AddColour(const wxString& name, const wxColour& colour);
876
ca3e85cf 877#if WXWIN_COMPATIBILITY_2_6
492e2a5b
VZ
878 // deprecated, use Find() instead
879 wxDEPRECATED( wxColour *FindColour(const wxString& name) );
ca3e85cf 880#endif // WXWIN_COMPATIBILITY_2_6
c50f92d0
VZ
881
882
19bf0c69
DW
883#ifdef __WXPM__
884 // PM keeps its own type of colour table
885 long* m_palTable;
886 size_t m_nSize;
887#endif
c50f92d0 888
222ed1d6 889private:
c50f92d0
VZ
890 // load the database with the built in colour values when called for the
891 // first time, do nothing after this
892 void Initialize();
222ed1d6 893
c50f92d0 894 wxStringToColourHashMap *m_map;
c801d85f
KB
895};
896
53a2db12 897class WXDLLIMPEXP_CORE wxResourceCache: public wxList
f03fc89f
VZ
898{
899public:
900 wxResourceCache() { }
01871bf6 901#if !wxUSE_STD_CONTAINERS
f03fc89f 902 wxResourceCache(const unsigned int keyType) : wxList(keyType) { }
222ed1d6 903#endif
d3c7fc99 904 virtual ~wxResourceCache();
f03fc89f
VZ
905};
906
907// ---------------------------------------------------------------------------
908// global variables
909// ---------------------------------------------------------------------------
910
c801d85f 911
f516d986
VZ
912/* Stock objects
913
914 wxStockGDI creates the stock GDI objects on demand. Pointers to the
915 created objects are stored in the ms_stockObject array, which is indexed
916 by the Item enum values. Platorm-specific fonts can be created by
917 implementing a derived class with an override for the GetFont function.
918 wxStockGDI operates as a singleton, accessed through the ms_instance
919 pointer. By default this pointer is set to an instance of wxStockGDI.
920 A derived class must arrange to set this pointer to an instance of itself.
921*/
922class WXDLLIMPEXP_CORE wxStockGDI
923{
924public:
925 enum Item {
926 BRUSH_BLACK,
927 BRUSH_BLUE,
928 BRUSH_CYAN,
929 BRUSH_GREEN,
86028025 930 BRUSH_YELLOW,
f516d986
VZ
931 BRUSH_GREY,
932 BRUSH_LIGHTGREY,
933 BRUSH_MEDIUMGREY,
934 BRUSH_RED,
935 BRUSH_TRANSPARENT,
936 BRUSH_WHITE,
937 COLOUR_BLACK,
938 COLOUR_BLUE,
939 COLOUR_CYAN,
940 COLOUR_GREEN,
86028025 941 COLOUR_YELLOW,
f516d986
VZ
942 COLOUR_LIGHTGREY,
943 COLOUR_RED,
944 COLOUR_WHITE,
945 CURSOR_CROSS,
946 CURSOR_HOURGLASS,
947 CURSOR_STANDARD,
948 FONT_ITALIC,
949 FONT_NORMAL,
950 FONT_SMALL,
951 FONT_SWISS,
952 PEN_BLACK,
953 PEN_BLACKDASHED,
d8184587 954 PEN_BLUE,
f516d986
VZ
955 PEN_CYAN,
956 PEN_GREEN,
86028025 957 PEN_YELLOW,
f516d986
VZ
958 PEN_GREY,
959 PEN_LIGHTGREY,
960 PEN_MEDIUMGREY,
961 PEN_RED,
962 PEN_TRANSPARENT,
963 PEN_WHITE,
964 ITEMCOUNT
965 };
966
967 wxStockGDI();
968 virtual ~wxStockGDI();
969 static void DeleteAll();
970
971 static wxStockGDI& instance() { return *ms_instance; }
972
973 static const wxBrush* GetBrush(Item item);
974 static const wxColour* GetColour(Item item);
975 static const wxCursor* GetCursor(Item item);
976 // Can be overridden by platform-specific derived classes
977 virtual const wxFont* GetFont(Item item);
978 static const wxPen* GetPen(Item item);
979
980protected:
981 static wxStockGDI* ms_instance;
982
983 static wxObject* ms_stockObject[ITEMCOUNT];
984
c0c133e1 985 wxDECLARE_NO_COPY_CLASS(wxStockGDI);
f516d986
VZ
986};
987
988#define wxITALIC_FONT wxStockGDI::instance().GetFont(wxStockGDI::FONT_ITALIC)
989#define wxNORMAL_FONT wxStockGDI::instance().GetFont(wxStockGDI::FONT_NORMAL)
990#define wxSMALL_FONT wxStockGDI::instance().GetFont(wxStockGDI::FONT_SMALL)
991#define wxSWISS_FONT wxStockGDI::instance().GetFont(wxStockGDI::FONT_SWISS)
992
993#define wxBLACK_DASHED_PEN wxStockGDI::GetPen(wxStockGDI::PEN_BLACKDASHED)
994#define wxBLACK_PEN wxStockGDI::GetPen(wxStockGDI::PEN_BLACK)
d8184587 995#define wxBLUE_PEN wxStockGDI::GetPen(wxStockGDI::PEN_BLUE)
f516d986
VZ
996#define wxCYAN_PEN wxStockGDI::GetPen(wxStockGDI::PEN_CYAN)
997#define wxGREEN_PEN wxStockGDI::GetPen(wxStockGDI::PEN_GREEN)
86028025 998#define wxYELLOW_PEN wxStockGDI::GetPen(wxStockGDI::PEN_YELLOW)
f516d986
VZ
999#define wxGREY_PEN wxStockGDI::GetPen(wxStockGDI::PEN_GREY)
1000#define wxLIGHT_GREY_PEN wxStockGDI::GetPen(wxStockGDI::PEN_LIGHTGREY)
1001#define wxMEDIUM_GREY_PEN wxStockGDI::GetPen(wxStockGDI::PEN_MEDIUMGREY)
1002#define wxRED_PEN wxStockGDI::GetPen(wxStockGDI::PEN_RED)
1003#define wxTRANSPARENT_PEN wxStockGDI::GetPen(wxStockGDI::PEN_TRANSPARENT)
1004#define wxWHITE_PEN wxStockGDI::GetPen(wxStockGDI::PEN_WHITE)
1005
1006#define wxBLACK_BRUSH wxStockGDI::GetBrush(wxStockGDI::BRUSH_BLACK)
1007#define wxBLUE_BRUSH wxStockGDI::GetBrush(wxStockGDI::BRUSH_BLUE)
1008#define wxCYAN_BRUSH wxStockGDI::GetBrush(wxStockGDI::BRUSH_CYAN)
1009#define wxGREEN_BRUSH wxStockGDI::GetBrush(wxStockGDI::BRUSH_GREEN)
86028025 1010#define wxYELLOW_BRUSH wxStockGDI::GetBrush(wxStockGDI::BRUSH_YELLOW)
f516d986
VZ
1011#define wxGREY_BRUSH wxStockGDI::GetBrush(wxStockGDI::BRUSH_GREY)
1012#define wxLIGHT_GREY_BRUSH wxStockGDI::GetBrush(wxStockGDI::BRUSH_LIGHTGREY)
1013#define wxMEDIUM_GREY_BRUSH wxStockGDI::GetBrush(wxStockGDI::BRUSH_MEDIUMGREY)
1014#define wxRED_BRUSH wxStockGDI::GetBrush(wxStockGDI::BRUSH_RED)
1015#define wxTRANSPARENT_BRUSH wxStockGDI::GetBrush(wxStockGDI::BRUSH_TRANSPARENT)
1016#define wxWHITE_BRUSH wxStockGDI::GetBrush(wxStockGDI::BRUSH_WHITE)
1017
1018#define wxBLACK wxStockGDI::GetColour(wxStockGDI::COLOUR_BLACK)
1019#define wxBLUE wxStockGDI::GetColour(wxStockGDI::COLOUR_BLUE)
1020#define wxCYAN wxStockGDI::GetColour(wxStockGDI::COLOUR_CYAN)
1021#define wxGREEN wxStockGDI::GetColour(wxStockGDI::COLOUR_GREEN)
86028025 1022#define wxYELLOW wxStockGDI::GetColour(wxStockGDI::COLOUR_YELLOW)
f516d986
VZ
1023#define wxLIGHT_GREY wxStockGDI::GetColour(wxStockGDI::COLOUR_LIGHTGREY)
1024#define wxRED wxStockGDI::GetColour(wxStockGDI::COLOUR_RED)
1025#define wxWHITE wxStockGDI::GetColour(wxStockGDI::COLOUR_WHITE)
1026
1027#define wxCROSS_CURSOR wxStockGDI::GetCursor(wxStockGDI::CURSOR_CROSS)
1028#define wxHOURGLASS_CURSOR wxStockGDI::GetCursor(wxStockGDI::CURSOR_HOURGLASS)
1029#define wxSTANDARD_CURSOR wxStockGDI::GetCursor(wxStockGDI::CURSOR_STANDARD)
c801d85f
KB
1030
1031// 'Null' objects
53a2db12
FM
1032extern WXDLLIMPEXP_DATA_CORE(wxBitmap) wxNullBitmap;
1033extern WXDLLIMPEXP_DATA_CORE(wxIcon) wxNullIcon;
1034extern WXDLLIMPEXP_DATA_CORE(wxCursor) wxNullCursor;
1035extern WXDLLIMPEXP_DATA_CORE(wxPen) wxNullPen;
1036extern WXDLLIMPEXP_DATA_CORE(wxBrush) wxNullBrush;
1037extern WXDLLIMPEXP_DATA_CORE(wxPalette) wxNullPalette;
1038extern WXDLLIMPEXP_DATA_CORE(wxFont) wxNullFont;
1039extern WXDLLIMPEXP_DATA_CORE(wxColour) wxNullColour;
1040extern WXDLLIMPEXP_DATA_CORE(wxIconBundle) wxNullIconBundle;
c801d85f 1041
53a2db12 1042extern WXDLLIMPEXP_DATA_CORE(wxColourDatabase*) wxTheColourDatabase;
f03fc89f 1043
53a2db12 1044extern WXDLLIMPEXP_DATA_CORE(const char) wxPanelNameStr[];
c801d85f 1045
53a2db12
FM
1046extern WXDLLIMPEXP_DATA_CORE(const wxSize) wxDefaultSize;
1047extern WXDLLIMPEXP_DATA_CORE(const wxPoint) wxDefaultPosition;
f03fc89f 1048
f03fc89f
VZ
1049// ---------------------------------------------------------------------------
1050// global functions
1051// ---------------------------------------------------------------------------
1052
1053// resource management
53a2db12
FM
1054extern void WXDLLIMPEXP_CORE wxInitializeStockLists();
1055extern void WXDLLIMPEXP_CORE wxDeleteStockLists();
c801d85f 1056
f03fc89f 1057// is the display colour (or monochrome)?
53a2db12 1058extern bool WXDLLIMPEXP_CORE wxColourDisplay();
c801d85f
KB
1059
1060// Returns depth of screen
53a2db12 1061extern int WXDLLIMPEXP_CORE wxDisplayDepth();
6a6c0a8b 1062#define wxGetDisplayDepth wxDisplayDepth
c801d85f 1063
904a68b6 1064// get the display size
53a2db12
FM
1065extern void WXDLLIMPEXP_CORE wxDisplaySize(int *width, int *height);
1066extern wxSize WXDLLIMPEXP_CORE wxGetDisplaySize();
1067extern void WXDLLIMPEXP_CORE wxDisplaySizeMM(int *width, int *height);
1068extern wxSize WXDLLIMPEXP_CORE wxGetDisplaySizeMM();
40fcf546 1069extern wxSize WXDLLIMPEXP_CORE wxGetDisplayPPI();
c801d85f 1070
ec5d7799 1071// Get position and size of the display workarea
53a2db12
FM
1072extern void WXDLLIMPEXP_CORE wxClientDisplayRect(int *x, int *y, int *width, int *height);
1073extern wxRect WXDLLIMPEXP_CORE wxGetClientDisplayRect();
ec5d7799 1074
f03fc89f 1075// set global cursor
53a2db12 1076extern void WXDLLIMPEXP_CORE wxSetCursor(const wxCursor& cursor);
c801d85f 1077
c801d85f 1078#endif
34138703 1079 // _WX_GDICMNH__