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