added missing consts and pass objects by const reference instead of by value (patch...
[wxWidgets.git] / include / wx / gdicmn.h
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) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_GDICMNH__
13 #define _WX_GDICMNH__
14
15 // ---------------------------------------------------------------------------
16 // headers
17 // ---------------------------------------------------------------------------
18
19 #include "wx/defs.h"
20 #include "wx/list.h"
21 #include "wx/string.h"
22 #include "wx/fontenc.h"
23 #include "wx/hashmap.h"
24
25 // ---------------------------------------------------------------------------
26 // forward declarations
27 // ---------------------------------------------------------------------------
28
29 class WXDLLIMPEXP_CORE wxBitmap;
30 class WXDLLIMPEXP_CORE wxBrush;
31 class WXDLLIMPEXP_CORE wxColour;
32 class WXDLLIMPEXP_CORE wxCursor;
33 class WXDLLIMPEXP_CORE wxFont;
34 class WXDLLIMPEXP_CORE wxIcon;
35 class WXDLLIMPEXP_CORE wxPalette;
36 class WXDLLIMPEXP_CORE wxPen;
37 class WXDLLIMPEXP_CORE wxRegion;
38 class WXDLLIMPEXP_BASE wxString;
39
40 // ---------------------------------------------------------------------------
41 // constants
42 // ---------------------------------------------------------------------------
43
44 // Bitmap flags
45 enum wxBitmapType
46 {
47 wxBITMAP_TYPE_INVALID, // should be == 0 for compatibility!
48 wxBITMAP_TYPE_BMP,
49 wxBITMAP_TYPE_BMP_RESOURCE,
50 wxBITMAP_TYPE_RESOURCE = wxBITMAP_TYPE_BMP_RESOURCE,
51 wxBITMAP_TYPE_ICO,
52 wxBITMAP_TYPE_ICO_RESOURCE,
53 wxBITMAP_TYPE_CUR,
54 wxBITMAP_TYPE_CUR_RESOURCE,
55 wxBITMAP_TYPE_XBM,
56 wxBITMAP_TYPE_XBM_DATA,
57 wxBITMAP_TYPE_XPM,
58 wxBITMAP_TYPE_XPM_DATA,
59 wxBITMAP_TYPE_TIF,
60 wxBITMAP_TYPE_TIF_RESOURCE,
61 wxBITMAP_TYPE_GIF,
62 wxBITMAP_TYPE_GIF_RESOURCE,
63 wxBITMAP_TYPE_PNG,
64 wxBITMAP_TYPE_PNG_RESOURCE,
65 wxBITMAP_TYPE_JPEG,
66 wxBITMAP_TYPE_JPEG_RESOURCE,
67 wxBITMAP_TYPE_PNM,
68 wxBITMAP_TYPE_PNM_RESOURCE,
69 wxBITMAP_TYPE_PCX,
70 wxBITMAP_TYPE_PCX_RESOURCE,
71 wxBITMAP_TYPE_PICT,
72 wxBITMAP_TYPE_PICT_RESOURCE,
73 wxBITMAP_TYPE_ICON,
74 wxBITMAP_TYPE_ICON_RESOURCE,
75 wxBITMAP_TYPE_ANI,
76 wxBITMAP_TYPE_IFF,
77 wxBITMAP_TYPE_MACCURSOR,
78 wxBITMAP_TYPE_MACCURSOR_RESOURCE,
79 wxBITMAP_TYPE_ANY = 50
80 };
81
82 // Standard cursors
83 enum wxStockCursor
84 {
85 wxCURSOR_NONE, // should be 0
86 wxCURSOR_ARROW,
87 wxCURSOR_RIGHT_ARROW,
88 wxCURSOR_BULLSEYE,
89 wxCURSOR_CHAR,
90 wxCURSOR_CROSS,
91 wxCURSOR_HAND,
92 wxCURSOR_IBEAM,
93 wxCURSOR_LEFT_BUTTON,
94 wxCURSOR_MAGNIFIER,
95 wxCURSOR_MIDDLE_BUTTON,
96 wxCURSOR_NO_ENTRY,
97 wxCURSOR_PAINT_BRUSH,
98 wxCURSOR_PENCIL,
99 wxCURSOR_POINT_LEFT,
100 wxCURSOR_POINT_RIGHT,
101 wxCURSOR_QUESTION_ARROW,
102 wxCURSOR_RIGHT_BUTTON,
103 wxCURSOR_SIZENESW,
104 wxCURSOR_SIZENS,
105 wxCURSOR_SIZENWSE,
106 wxCURSOR_SIZEWE,
107 wxCURSOR_SIZING,
108 wxCURSOR_SPRAYCAN,
109 wxCURSOR_WAIT,
110 wxCURSOR_WATCH,
111 wxCURSOR_BLANK,
112 #ifdef __WXGTK__
113 wxCURSOR_DEFAULT, // standard X11 cursor
114 #endif
115 #ifdef __WXMAC__
116 wxCURSOR_COPY_ARROW , // MacOS Theme Plus arrow
117 #endif
118 #ifdef __X__
119 // Not yet implemented for Windows
120 wxCURSOR_CROSS_REVERSE,
121 wxCURSOR_DOUBLE_ARROW,
122 wxCURSOR_BASED_ARROW_UP,
123 wxCURSOR_BASED_ARROW_DOWN,
124 #endif // X11
125
126 wxCURSOR_ARROWWAIT,
127
128 wxCURSOR_MAX
129 };
130
131 #ifndef __WXGTK__
132 #define wxCURSOR_DEFAULT wxCURSOR_ARROW
133 #endif
134
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(wxT(#X))
152 #elif defined(__WXPM__)
153 // Load from a resource
154 #define wxICON(X) wxIcon(wxT(#X))
155 #elif defined(__WXMGL__)
156 // Initialize from an included XPM
157 #define wxICON(X) wxIcon( (const char**) X##_xpm )
158 #elif defined(__WXGTK__)
159 // Initialize from an included XPM
160 #define wxICON(X) wxIcon( (const char**) X##_xpm )
161 #elif defined(__WXMAC__)
162 // Initialize from an included XPM
163 #define wxICON(X) wxIcon( (const char**) X##_xpm )
164 #elif defined(__WXMOTIF__)
165 // Initialize from an included XPM
166 #define wxICON(X) wxIcon( X##_xpm )
167 #elif defined(__WXX11__)
168 // Initialize from an included XPM
169 #define wxICON(X) wxIcon( X##_xpm )
170 #else
171 // This will usually mean something on any platform
172 #define wxICON(X) wxIcon(wxT(#X))
173 #endif // platform
174
175 /* Another macro: this one is for portable creation of bitmaps. We assume that
176 under Unix bitmaps live in XPMs and under Windows they're in ressources.
177 */
178
179 #if defined(__WXMSW__) || defined(__WXPM__)
180 #define wxBITMAP(name) wxBitmap(wxT(#name), wxBITMAP_TYPE_RESOURCE)
181 #elif defined(__WXGTK__) || \
182 defined(__WXMOTIF__) || \
183 defined(__WXX11__) || \
184 defined(__WXMAC__) || \
185 defined(__WXMGL__) || \
186 defined(__WXCOCOA__)
187 // Initialize from an included XPM
188 #define wxBITMAP(name) wxBitmap( (const char**) name##_xpm )
189 #else // other platforms
190 #define wxBITMAP(name) wxBitmap(name##_xpm, wxBITMAP_TYPE_XPM)
191 #endif // platform
192
193 // ===========================================================================
194 // classes
195 // ===========================================================================
196
197 // ---------------------------------------------------------------------------
198 // wxSize
199 // ---------------------------------------------------------------------------
200
201 class WXDLLEXPORT wxSize
202 {
203 public:
204 // members are public for compatibility, don't use them directly.
205 int x, y;
206
207 // constructors
208 wxSize() : x(0), y(0) { }
209 wxSize(int xx, int yy) : x(xx), y(yy) { }
210
211 // no copy ctor or assignment operator - the defaults are ok
212
213 bool operator==(const wxSize& sz) const { return x == sz.x && y == sz.y; }
214 bool operator!=(const wxSize& sz) const { return x != sz.x || y != sz.y; }
215
216 wxSize operator+(const wxSize& sz) const { return wxSize(x + sz.x, y + sz.y); }
217 wxSize operator-(const wxSize& sz) const { return wxSize(x - sz.x, y - sz.y); }
218 wxSize operator/(int i) const { return wxSize(x / i, y / i); }
219 wxSize operator*(int i) const { return wxSize(x * i, y * i); }
220
221 wxSize& operator+=(const wxSize& sz) { x += sz.x; y += sz.y; return *this; }
222 wxSize& operator-=(const wxSize& sz) { x -= sz.x; y -= sz.y; return *this; }
223 wxSize& operator/=(const int i) { x /= i; y /= i; return *this; }
224 wxSize& operator*=(const int i) { x *= i; y *= i; return *this; }
225
226 void IncTo(const wxSize& sz)
227 { if ( sz.x > x ) x = sz.x; if ( sz.y > y ) y = sz.y; }
228 void DecTo(const wxSize& sz)
229 { if ( sz.x < x ) x = sz.x; if ( sz.y < y ) y = sz.y; }
230
231 // accessors
232 void Set(int xx, int yy) { x = xx; y = yy; }
233 void SetWidth(int w) { x = w; }
234 void SetHeight(int h) { y = h; }
235
236 int GetWidth() const { return x; }
237 int GetHeight() const { return y; }
238
239 bool IsFullySpecified() const { return x != wxDefaultCoord && y != wxDefaultCoord; }
240
241 // combine this size with the other one replacing the default (i.e. equal
242 // to wxDefaultCoord) components of this object with those of the other
243 void SetDefaults(const wxSize& size)
244 {
245 if ( x == wxDefaultCoord )
246 x = size.x;
247 if ( y == wxDefaultCoord )
248 y = size.y;
249 }
250
251 // compatibility
252 int GetX() const { return x; }
253 int GetY() const { return y; }
254 };
255
256 // ---------------------------------------------------------------------------
257 // Point classes: with real or integer coordinates
258 // ---------------------------------------------------------------------------
259
260 class WXDLLEXPORT wxRealPoint
261 {
262 public:
263 double x;
264 double y;
265
266 wxRealPoint() : x(0.0), y(0.0) { }
267 wxRealPoint(double xx, double yy) : x(xx), y(yy) { }
268
269 wxRealPoint operator+(const wxRealPoint& pt) const { return wxRealPoint(x + pt.x, y + pt.y); }
270 wxRealPoint operator-(const wxRealPoint& pt) const { return wxRealPoint(x - pt.x, y - pt.y); }
271
272 bool operator==(const wxRealPoint& pt) const { return x == pt.x && y == pt.y; }
273 bool operator!=(const wxRealPoint& pt) const { return x != pt.x || y != pt.y; }
274 };
275
276 class WXDLLEXPORT wxPoint
277 {
278 public:
279 int x, y;
280
281 wxPoint() : x(0), y(0) { }
282 wxPoint(int xx, int yy) : x(xx), y(yy) { }
283
284 // no copy ctor or assignment operator - the defaults are ok
285
286 // comparison
287 bool operator==(const wxPoint& p) const { return x == p.x && y == p.y; }
288 bool operator!=(const wxPoint& p) const { return !(*this == p); }
289
290 // arithmetic operations (component wise)
291 wxPoint operator+(const wxPoint& p) const { return wxPoint(x + p.x, y + p.y); }
292 wxPoint operator-(const wxPoint& p) const { return wxPoint(x - p.x, y - p.y); }
293
294 wxPoint& operator+=(const wxPoint& p) { x += p.x; y += p.y; return *this; }
295 wxPoint& operator-=(const wxPoint& p) { x -= p.x; y -= p.y; return *this; }
296
297 wxPoint& operator+=(const wxSize& s) { x += s.GetWidth(); y += s.GetHeight(); return *this; }
298 wxPoint& operator-=(const wxSize& s) { x -= s.GetWidth(); y -= s.GetHeight(); return *this; }
299
300 wxPoint operator+(const wxSize& s) const { return wxPoint(x + s.GetWidth(), y + s.GetHeight()); }
301 wxPoint operator-(const wxSize& s) const { return wxPoint(x - s.GetWidth(), y - s.GetHeight()); }
302 };
303
304 // ---------------------------------------------------------------------------
305 // wxRect
306 // ---------------------------------------------------------------------------
307
308 class WXDLLEXPORT wxRect
309 {
310 public:
311 wxRect()
312 : x(0), y(0), width(0), height(0)
313 { }
314 wxRect(int xx, int yy, int ww, int hh)
315 : x(xx), y(yy), width(ww), height(hh)
316 { }
317 wxRect(const wxPoint& topLeft, const wxPoint& bottomRight);
318 wxRect(const wxPoint& pt, const wxSize& size)
319 : x(pt.x), y(pt.y), width(size.x), height(size.y)
320 { }
321 wxRect(const wxSize& size)
322 : x(0), y(0), width(size.x), height(size.y)
323 { }
324
325 // default copy ctor and assignment operators ok
326
327 int GetX() const { return x; }
328 void SetX(int xx) { x = xx; }
329
330 int GetY() const { return y; }
331 void SetY(int yy) { y = yy; }
332
333 int GetWidth() const { return width; }
334 void SetWidth(int w) { width = w; }
335
336 int GetHeight() const { return height; }
337 void SetHeight(int h) { height = h; }
338
339 wxPoint GetPosition() const { return wxPoint(x, y); }
340 void SetPosition( const wxPoint &p ) { x = p.x; y = p.y; }
341
342 wxSize GetSize() const { return wxSize(width, height); }
343 void SetSize( const wxSize &s ) { width = s.GetWidth(); height = s.GetHeight(); }
344
345 bool IsEmpty() const { return (width <= 0) || (height <= 0); }
346
347 wxPoint GetTopLeft() const { return GetPosition(); }
348 wxPoint GetLeftTop() const { return GetTopLeft(); }
349 void SetTopLeft(const wxPoint &p) { SetPosition(p); }
350 void SetLeftTop(const wxPoint &p) { SetTopLeft(p); }
351
352 wxPoint GetBottomRight() const { return wxPoint(GetRight(), GetBottom()); }
353 wxPoint GetRightBottom() const { return GetBottomRight(); }
354 void SetBottomRight(const wxPoint &p) { SetRight(p.x); SetBottom(p.y); }
355 void SetRightBottom(const wxPoint &p) { SetBottomRight(p); }
356
357 int GetLeft() const { return x; }
358 int GetTop() const { return y; }
359 int GetBottom() const { return y + height - 1; }
360 int GetRight() const { return x + width - 1; }
361
362 void SetLeft(int left) { x = left; }
363 void SetRight(int right) { width = right - x + 1; }
364 void SetTop(int top) { y = top; }
365 void SetBottom(int bottom) { height = bottom - y + 1; }
366
367 // operations with rect
368 wxRect& Inflate(wxCoord dx, wxCoord dy);
369 wxRect& Inflate(wxCoord d) { return Inflate(d, d); }
370 wxRect Inflate(wxCoord dx, wxCoord dy) const
371 {
372 wxRect r = *this;
373 r.Inflate(dx, dy);
374 return r;
375 }
376
377 wxRect& Deflate(wxCoord dx, wxCoord dy) { return Inflate(-dx, -dy); }
378 wxRect& Deflate(wxCoord d) { return Inflate(-d); }
379 wxRect Deflate(wxCoord dx, wxCoord dy) const
380 {
381 wxRect r = *this;
382 r.Deflate(dx, dy);
383 return r;
384 }
385
386 void Offset(wxCoord dx, wxCoord dy) { x += dx; y += dy; }
387 void Offset(const wxPoint& pt) { Offset(pt.x, pt.y); }
388
389 wxRect& Intersect(const wxRect& rect);
390 wxRect Intersect(const wxRect& rect) const
391 {
392 wxRect r = *this;
393 r.Intersect(rect);
394 return r;
395 }
396
397 wxRect& Union(const wxRect& rect);
398 wxRect Union(const wxRect& rect) const
399 {
400 wxRect r = *this;
401 r.Union(rect);
402 return r;
403 }
404
405 // compare rectangles
406 bool operator==(const wxRect& rect) const;
407 bool operator!=(const wxRect& rect) const { return !(*this == rect); }
408
409 // return true if the point is (not strcitly) inside the rect
410 bool Inside(int x, int y) const;
411 bool Inside(const wxPoint& pt) const { return Inside(pt.x, pt.y); }
412
413 // return true if the rectangles have a non empty intersection
414 bool Intersects(const wxRect& rect) const;
415
416
417 // these are like Union() but don't ignore empty rectangles
418 wxRect operator+(const wxRect& rect) const;
419 wxRect& operator+=(const wxRect& rect)
420 {
421 *this = *this + rect;
422 return *this;
423 }
424
425
426 public:
427 int x, y, width, height;
428 };
429
430 // ---------------------------------------------------------------------------
431 // Management of pens, brushes and fonts
432 // ---------------------------------------------------------------------------
433
434 typedef wxInt8 wxDash;
435
436 class WXDLLEXPORT wxPenList : public wxList
437 {
438 public:
439 wxPenList() { }
440 ~wxPenList();
441
442 void AddPen(wxPen *pen);
443 void RemovePen(wxPen *pen);
444 wxPen *FindOrCreatePen(const wxColour& colour, int width, int style);
445 };
446
447 class WXDLLEXPORT wxBrushList : public wxList
448 {
449 public:
450 wxBrushList() { }
451 ~wxBrushList();
452
453 void AddBrush(wxBrush *brush);
454 void RemoveBrush(wxBrush *brush);
455 wxBrush *FindOrCreateBrush(const wxColour& colour, int style = wxSOLID);
456 };
457
458 class WXDLLEXPORT wxFontList : public wxList
459 {
460 public:
461 wxFontList() { }
462 ~wxFontList();
463
464 void AddFont(wxFont *font);
465 void RemoveFont(wxFont *font);
466 wxFont *FindOrCreateFont(int pointSize, int family, int style, int weight,
467 bool underline = false,
468 const wxString& face = wxEmptyString,
469 wxFontEncoding encoding = wxFONTENCODING_DEFAULT);
470 };
471
472 WX_DECLARE_STRING_HASH_MAP( wxColour *, wxStringToColourHashMap );
473
474 class WXDLLEXPORT wxColourDatabase
475 {
476 public:
477 wxColourDatabase();
478 ~wxColourDatabase();
479
480 // find colour by name or name for the given colour
481 wxColour Find(const wxString& name) const;
482 wxString FindName(const wxColour& colour) const;
483
484 // add a new colour to the database
485 void AddColour(const wxString& name, const wxColour& colour);
486
487 // deprecated, use Find() instead
488 wxDEPRECATED( wxColour *FindColour(const wxString& name) );
489
490
491 #ifdef __WXPM__
492 // PM keeps its own type of colour table
493 long* m_palTable;
494 size_t m_nSize;
495 #endif
496
497 private:
498 // load the database with the built in colour values when called for the
499 // first time, do nothing after this
500 void Initialize();
501
502 wxStringToColourHashMap *m_map;
503 };
504
505 class WXDLLEXPORT wxBitmapList : public wxList
506 {
507 public:
508 wxBitmapList(){}
509 ~wxBitmapList();
510
511 void AddBitmap(wxBitmap *bitmap);
512 void RemoveBitmap(wxBitmap *bitmap);
513 };
514
515 class WXDLLEXPORT wxResourceCache: public wxList
516 {
517 public:
518 wxResourceCache() { }
519 #if !wxUSE_STL
520 wxResourceCache(const unsigned int keyType) : wxList(keyType) { }
521 #endif
522 ~wxResourceCache();
523 };
524
525 // ---------------------------------------------------------------------------
526 // global variables
527 // ---------------------------------------------------------------------------
528
529 // Lists of GDI objects
530 extern WXDLLEXPORT_DATA(wxPenList*) wxThePenList;
531 extern WXDLLEXPORT_DATA(wxBrushList*) wxTheBrushList;
532 extern WXDLLEXPORT_DATA(wxFontList*) wxTheFontList;
533 extern WXDLLEXPORT_DATA(wxBitmapList*) wxTheBitmapList;
534
535 // Stock objects
536 extern WXDLLEXPORT_DATA(wxFont*) wxNORMAL_FONT;
537 extern WXDLLEXPORT_DATA(wxFont*) wxSMALL_FONT;
538 extern WXDLLEXPORT_DATA(wxFont*) wxITALIC_FONT;
539 extern WXDLLEXPORT_DATA(wxFont*) wxSWISS_FONT;
540
541 extern WXDLLEXPORT_DATA(wxPen*) wxRED_PEN;
542 extern WXDLLEXPORT_DATA(wxPen*) wxCYAN_PEN;
543 extern WXDLLEXPORT_DATA(wxPen*) wxGREEN_PEN;
544 extern WXDLLEXPORT_DATA(wxPen*) wxBLACK_PEN;
545 extern WXDLLEXPORT_DATA(wxPen*) wxWHITE_PEN;
546 extern WXDLLEXPORT_DATA(wxPen*) wxTRANSPARENT_PEN;
547 extern WXDLLEXPORT_DATA(wxPen*) wxBLACK_DASHED_PEN;
548 extern WXDLLEXPORT_DATA(wxPen*) wxGREY_PEN;
549 extern WXDLLEXPORT_DATA(wxPen*) wxMEDIUM_GREY_PEN;
550 extern WXDLLEXPORT_DATA(wxPen*) wxLIGHT_GREY_PEN;
551
552 extern WXDLLEXPORT_DATA(wxBrush*) wxBLUE_BRUSH;
553 extern WXDLLEXPORT_DATA(wxBrush*) wxGREEN_BRUSH;
554 extern WXDLLEXPORT_DATA(wxBrush*) wxWHITE_BRUSH;
555 extern WXDLLEXPORT_DATA(wxBrush*) wxBLACK_BRUSH;
556 extern WXDLLEXPORT_DATA(wxBrush*) wxGREY_BRUSH;
557 extern WXDLLEXPORT_DATA(wxBrush*) wxMEDIUM_GREY_BRUSH;
558 extern WXDLLEXPORT_DATA(wxBrush*) wxLIGHT_GREY_BRUSH;
559 extern WXDLLEXPORT_DATA(wxBrush*) wxTRANSPARENT_BRUSH;
560 extern WXDLLEXPORT_DATA(wxBrush*) wxCYAN_BRUSH;
561 extern WXDLLEXPORT_DATA(wxBrush*) wxRED_BRUSH;
562
563 extern WXDLLEXPORT_DATA(wxColour*) wxBLACK;
564 extern WXDLLEXPORT_DATA(wxColour*) wxWHITE;
565 extern WXDLLEXPORT_DATA(wxColour*) wxRED;
566 extern WXDLLEXPORT_DATA(wxColour*) wxBLUE;
567 extern WXDLLEXPORT_DATA(wxColour*) wxGREEN;
568 extern WXDLLEXPORT_DATA(wxColour*) wxCYAN;
569 extern WXDLLEXPORT_DATA(wxColour*) wxLIGHT_GREY;
570
571 // 'Null' objects
572 extern WXDLLEXPORT_DATA(wxBitmap) wxNullBitmap;
573 extern WXDLLEXPORT_DATA(wxIcon) wxNullIcon;
574 extern WXDLLEXPORT_DATA(wxCursor) wxNullCursor;
575 extern WXDLLEXPORT_DATA(wxPen) wxNullPen;
576 extern WXDLLEXPORT_DATA(wxBrush) wxNullBrush;
577 extern WXDLLEXPORT_DATA(wxPalette) wxNullPalette;
578 extern WXDLLEXPORT_DATA(wxFont) wxNullFont;
579 extern WXDLLEXPORT_DATA(wxColour) wxNullColour;
580
581 // Stock cursors types
582 extern WXDLLEXPORT_DATA(wxCursor*) wxSTANDARD_CURSOR;
583 extern WXDLLEXPORT_DATA(wxCursor*) wxHOURGLASS_CURSOR;
584 extern WXDLLEXPORT_DATA(wxCursor*) wxCROSS_CURSOR;
585
586 extern WXDLLEXPORT_DATA(wxColourDatabase*) wxTheColourDatabase;
587
588 extern WXDLLEXPORT_DATA(const wxChar*) wxPanelNameStr;
589
590 extern WXDLLEXPORT_DATA(const wxSize) wxDefaultSize;
591 extern WXDLLEXPORT_DATA(const wxPoint) wxDefaultPosition;
592
593 // The list of objects which should be deleted
594 extern WXDLLEXPORT_DATA(wxList) wxPendingDelete;
595
596 // ---------------------------------------------------------------------------
597 // global functions
598 // ---------------------------------------------------------------------------
599
600 // resource management
601 extern void WXDLLEXPORT wxInitializeStockObjects();
602 extern void WXDLLEXPORT wxInitializeStockLists();
603 extern void WXDLLEXPORT wxDeleteStockObjects();
604 extern void WXDLLEXPORT wxDeleteStockLists();
605
606 // is the display colour (or monochrome)?
607 extern bool WXDLLEXPORT wxColourDisplay();
608
609 // Returns depth of screen
610 extern int WXDLLEXPORT wxDisplayDepth();
611 #define wxGetDisplayDepth wxDisplayDepth
612
613 // get the display size
614 extern void WXDLLEXPORT wxDisplaySize(int *width, int *height);
615 extern wxSize WXDLLEXPORT wxGetDisplaySize();
616 extern void WXDLLEXPORT wxDisplaySizeMM(int *width, int *height);
617 extern wxSize WXDLLEXPORT wxGetDisplaySizeMM();
618
619 // Get position and size of the display workarea
620 extern void WXDLLEXPORT wxClientDisplayRect(int *x, int *y, int *width, int *height);
621 extern wxRect WXDLLEXPORT wxGetClientDisplayRect();
622
623 // set global cursor
624 extern void WXDLLEXPORT wxSetCursor(const wxCursor& cursor);
625
626 #endif
627 // _WX_GDICMNH__