]>
git.saurik.com Git - wxWidgets.git/blob - src/common/gdicmn.cpp
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Common GDI classes
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
13 #pragma implementation "gdicmn.h"
17 #define XtDisplay XTDISPLAY
20 // For compilers that support precompilation, includes "wx.h".
21 #include "wx/wxprec.h"
28 #include "wx/gdicmn.h"
31 #include "wx/bitmap.h"
33 #include "wx/cursor.h"
35 #include "wx/palette.h"
39 #include "wx/settings.h"
50 #pragma message disable nosimpint
54 #pragma message enable nosimpint
63 #include "wx/mac/private.h"
64 #include "wx/mac/uma.h"
66 IMPLEMENT_CLASS(wxColourDatabase
, wxList
)
67 IMPLEMENT_DYNAMIC_CLASS(wxFontList
, wxList
)
68 IMPLEMENT_DYNAMIC_CLASS(wxPenList
, wxList
)
69 IMPLEMENT_DYNAMIC_CLASS(wxBrushList
, wxList
)
70 IMPLEMENT_DYNAMIC_CLASS(wxBitmapList
, wxList
)
71 IMPLEMENT_DYNAMIC_CLASS(wxResourceCache
, wxList
)
73 IMPLEMENT_ABSTRACT_CLASS(wxDCBase
, wxObject
)
75 wxRect::wxRect(const wxPoint
& topLeft
, const wxPoint
& bottomRight
)
79 width
= bottomRight
.x
- topLeft
.x
+ 1;
80 height
= bottomRight
.y
- topLeft
.y
+ 1;
95 wxRect::wxRect(const wxPoint
& point
, const wxSize
& size
)
97 x
= point
.x
; y
= point
.y
;
98 width
= size
.x
; height
= size
.y
;
101 bool wxRect::operator==(const wxRect
& rect
) const
103 return ((x
== rect
.x
) &&
105 (width
== rect
.width
) &&
106 (height
== rect
.height
));
109 wxRect
& wxRect::operator += (const wxRect
& rect
)
111 *this = (*this + rect
);
115 wxRect
wxRect::operator + (const wxRect
& rect
) const
117 int x1
= wxMin(this->x
, rect
.x
);
118 int y1
= wxMin(this->y
, rect
.y
);
119 int y2
= wxMax(y
+height
, rect
.height
+rect
.y
);
120 int x2
= wxMax(x
+width
, rect
.width
+rect
.x
);
121 return wxRect(x1
, y1
, x2
-x1
, y2
-y1
);
124 wxRect
& wxRect::Inflate(wxCoord dx
, wxCoord dy
)
131 // check that we didn't make the rectangle invalid by accident (you almost
132 // never want to have negative coords and never want negative size)
138 // what else can we do?
147 bool wxRect::Inside(int cx
, int cy
) const
149 return ( (cx
>= x
) && (cy
>= y
)
150 && ((cy
- y
) < height
)
151 && ((cx
- x
) < width
)
155 wxRect
& wxRect::Intersect(const wxRect
& rect
)
164 if ( x2
> rect
.GetRight() )
165 x2
= rect
.GetRight();
166 if ( y2
> rect
.GetBottom() )
167 y2
= rect
.GetBottom();
172 if ( width
<= 0 || height
<= 0 )
181 bool wxRect::Intersects(const wxRect
& rect
) const
183 wxRect r
= Intersect(rect
);
185 // if there is no intersection, both width and height are 0
189 wxColourDatabase::wxColourDatabase (int type
) : wxList (type
)
193 wxColourDatabase::~wxColourDatabase ()
195 // Cleanup Colour allocated in Initialize()
196 wxNode
*node
= GetFirst ();
199 wxColour
*col
= (wxColour
*) node
->GetData ();
200 wxNode
*next
= node
->GetNext ();
205 delete [] m_palTable
;
209 // Colour database stuff
210 void wxColourDatabase::Initialize ()
212 static const struct wxColourDesc
219 {wxT("AQUAMARINE"),112, 219, 147},
220 {wxT("BLACK"),0, 0, 0},
221 {wxT("BLUE"), 0, 0, 255},
222 {wxT("BLUE VIOLET"), 159, 95, 159},
223 {wxT("BROWN"), 165, 42, 42},
224 {wxT("CADET BLUE"), 95, 159, 159},
225 {wxT("CORAL"), 255, 127, 0},
226 {wxT("CORNFLOWER BLUE"), 66, 66, 111},
227 {wxT("CYAN"), 0, 255, 255},
228 {wxT("DARK GREY"), 47, 47, 47}, // ?
230 {wxT("DARK GREEN"), 47, 79, 47},
231 {wxT("DARK OLIVE GREEN"), 79, 79, 47},
232 {wxT("DARK ORCHID"), 153, 50, 204},
233 {wxT("DARK SLATE BLUE"), 107, 35, 142},
234 {wxT("DARK SLATE GREY"), 47, 79, 79},
235 {wxT("DARK TURQUOISE"), 112, 147, 219},
236 {wxT("DIM GREY"), 84, 84, 84},
237 {wxT("FIREBRICK"), 142, 35, 35},
238 {wxT("FOREST GREEN"), 35, 142, 35},
239 {wxT("GOLD"), 204, 127, 50},
240 {wxT("GOLDENROD"), 219, 219, 112},
241 {wxT("GREY"), 128, 128, 128},
242 {wxT("GREEN"), 0, 255, 0},
243 {wxT("GREEN YELLOW"), 147, 219, 112},
244 {wxT("INDIAN RED"), 79, 47, 47},
245 {wxT("KHAKI"), 159, 159, 95},
246 {wxT("LIGHT BLUE"), 191, 216, 216},
247 {wxT("LIGHT GREY"), 192, 192, 192},
248 {wxT("LIGHT STEEL BLUE"), 143, 143, 188},
249 {wxT("LIME GREEN"), 50, 204, 50},
250 {wxT("LIGHT MAGENTA"), 255, 0, 255},
251 {wxT("MAGENTA"), 255, 0, 255},
252 {wxT("MAROON"), 142, 35, 107},
253 {wxT("MEDIUM AQUAMARINE"), 50, 204, 153},
254 {wxT("MEDIUM GREY"), 100, 100, 100},
255 {wxT("MEDIUM BLUE"), 50, 50, 204},
256 {wxT("MEDIUM FOREST GREEN"), 107, 142, 35},
257 {wxT("MEDIUM GOLDENROD"), 234, 234, 173},
258 {wxT("MEDIUM ORCHID"), 147, 112, 219},
259 {wxT("MEDIUM SEA GREEN"), 66, 111, 66},
260 {wxT("MEDIUM SLATE BLUE"), 127, 0, 255},
261 {wxT("MEDIUM SPRING GREEN"), 127, 255, 0},
262 {wxT("MEDIUM TURQUOISE"), 112, 219, 219},
263 {wxT("MEDIUM VIOLET RED"), 219, 112, 147},
264 {wxT("MIDNIGHT BLUE"), 47, 47, 79},
265 {wxT("NAVY"), 35, 35, 142},
266 {wxT("ORANGE"), 204, 50, 50},
267 {wxT("ORANGE RED"), 255, 0, 127},
268 {wxT("ORCHID"), 219, 112, 219},
269 {wxT("PALE GREEN"), 143, 188, 143},
270 {wxT("PINK"), 188, 143, 234},
271 {wxT("PLUM"), 234, 173, 234},
272 {wxT("PURPLE"), 176, 0, 255},
273 {wxT("RED"), 255, 0, 0},
274 {wxT("SALMON"), 111, 66, 66},
275 {wxT("SEA GREEN"), 35, 142, 107},
276 {wxT("SIENNA"), 142, 107, 35},
277 {wxT("SKY BLUE"), 50, 153, 204},
278 {wxT("SLATE BLUE"), 0, 127, 255},
279 {wxT("SPRING GREEN"), 0, 255, 127},
280 {wxT("STEEL BLUE"), 35, 107, 142},
281 {wxT("TAN"), 219, 147, 112},
282 {wxT("THISTLE"), 216, 191, 216},
283 {wxT("TURQUOISE"), 173, 234, 234},
284 {wxT("VIOLET"), 79, 47, 79},
285 {wxT("VIOLET RED"), 204, 50, 153},
286 {wxT("WHEAT"), 216, 216, 191},
287 {wxT("WHITE"), 255, 255, 255},
288 {wxT("YELLOW"), 255, 255, 0},
289 {wxT("YELLOW GREEN"), 153, 204, 50},
290 {wxT("MEDIUM GOLDENROD"), 234, 234, 173},
291 {wxT("MEDIUM FOREST GREEN"), 107, 142, 35},
292 {wxT("LIGHT MAGENTA"), 255, 0, 255},
293 {wxT("MEDIUM GREY"), 100, 100, 100},
298 for ( n
= 0; n
< WXSIZEOF(wxColourTable
); n
++ )
300 const wxColourDesc
& cc
= wxColourTable
[n
];
301 Append(cc
.name
, new wxColour(cc
.r
,cc
.g
,cc
.b
));
304 m_palTable
= new long[n
];
305 for ( n
= 0; n
< WXSIZEOF(wxColourTable
); n
++ )
307 const wxColourDesc
& cc
= wxColourTable
[n
];
308 m_palTable
[n
] = OS2RGB(cc
.r
,cc
.g
,cc
.b
);
315 * Changed by Ian Brown, July 1994.
317 * When running under X, the Colour Database starts off empty. The X server
318 * is queried for the colour first time after which it is entered into the
319 * database. This allows our client to use the server colour database which
320 * is hopefully gamma corrected for the display being used.
323 wxColour
*wxColourDatabase::FindColour(const wxString
& colour
)
325 // VZ: make the comparaison case insensitive and also match both grey and
327 wxString colName
= colour
;
329 wxString colName2
= colName
;
330 if ( !colName2
.Replace(_T("GRAY"), _T("GREY")) )
333 wxNode
*node
= GetFirst();
336 const wxChar
*key
= node
->GetKeyString();
337 if ( colName
== key
|| colName2
== key
)
339 return (wxColour
*)node
->GetData();
342 node
= node
->GetNext();
355 // TODO for other implementations. This should really go into
356 // platform-specific directories.
368 wxColour
*col
= new wxColour( colour
);
373 return (wxColour
*) NULL
;
375 Append( colour
, col
);
383 Display
*display
= XtDisplay((Widget
) wxTheApp
->GetTopLevelWidget()) ;
386 Display
* display
= (Display
*) wxGetDisplay();
388 /* MATTHEW: [4] Use wxGetMainColormap */
389 if (!XParseColor(display
, (Colormap
) wxTheApp
->GetMainColormap((WXDisplay
*) display
), colour
.ToAscii() ,&xcolour
))
393 unsigned char r
= (unsigned char)(xcolour
.red
);
394 unsigned char g
= (unsigned char)(xcolour
.green
);
395 unsigned char b
= (unsigned char)(xcolour
.blue
);
397 unsigned char r
= (unsigned char)(xcolour
.red
>> 8);
398 unsigned char g
= (unsigned char)(xcolour
.green
>> 8);
399 unsigned char b
= (unsigned char)(xcolour
.blue
>> 8);
402 wxColour
*col
= new wxColour(r
, g
, b
);
409 wxString
wxColourDatabase::FindName (const wxColour
& colour
) const
413 unsigned char red
= colour
.Red ();
414 unsigned char green
= colour
.Green ();
415 unsigned char blue
= colour
.Blue ();
417 for (wxNode
* node
= GetFirst (); node
; node
= node
->GetNext ())
419 wxColour
*col
= (wxColour
*) node
->GetData ();
421 if (col
->Red () == red
&& col
->Green () == green
&& col
->Blue () == blue
)
423 const wxChar
*found
= node
->GetKeyString();
436 void wxInitializeStockLists()
438 wxTheBrushList
= new wxBrushList
;
439 wxThePenList
= new wxPenList
;
440 wxTheFontList
= new wxFontList
;
441 wxTheBitmapList
= new wxBitmapList
;
444 void wxInitializeStockObjects ()
450 // wxFontPool = new XFontPool;
453 // why under MSW fonts shouldn't have the standard system size?
456 static const int sizeFont = 10;
460 #if defined(__WXMAC__)
467 GetThemeFont(kThemeSystemFont
, GetApplicationScript() , fontName
, &fontSize
, &fontStyle
) ;
468 sizeFont
= fontSize
;
469 wxSWISS_FONT
= new wxFont (fontSize
, wxSWISS
, wxNORMAL
, wxNORMAL
, false , wxMacMakeStringFromPascal(fontName
) );
470 #elif defined(__WXPM__)
471 static const int sizeFont
= 12;
473 wxNORMAL_FONT
= new wxFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT
));
474 static const int sizeFont
= wxNORMAL_FONT
->GetPointSize();
477 #if defined(__WXPM__)
479 // Basic OS/2 has a fairly limited number of fonts and these are as good
480 // as I can do to get something that looks halfway "wx" normal
482 wxNORMAL_FONT
= new wxFont (sizeFont
, wxMODERN
, wxNORMAL
, wxBOLD
);
483 wxSMALL_FONT
= new wxFont (sizeFont
- 4, wxSWISS
, wxNORMAL
, wxNORMAL
); /* Helv */
484 wxITALIC_FONT
= new wxFont (sizeFont
, wxROMAN
, wxITALIC
, wxNORMAL
);
485 wxSWISS_FONT
= new wxFont (sizeFont
, wxSWISS
, wxNORMAL
, wxNORMAL
); /* Helv */
486 #elif defined(__WXMAC__)
487 wxNORMAL_FONT
= new wxFont (sizeFont
, wxMODERN
, wxNORMAL
, wxNORMAL
);
488 wxITALIC_FONT
= new wxFont (sizeFont
, wxROMAN
, wxITALIC
, wxNORMAL
);
489 GetThemeFont(kThemeSmallSystemFont
, GetApplicationScript() , fontName
, &fontSize
, &fontStyle
) ;
490 wxSMALL_FONT
= new wxFont (fontSize
, wxSWISS
, wxNORMAL
, wxNORMAL
, false , wxMacMakeStringFromPascal( fontName
) );
492 wxSMALL_FONT
= new wxFont (sizeFont
- 2, wxSWISS
, wxNORMAL
, wxNORMAL
);
493 wxITALIC_FONT
= new wxFont (sizeFont
, wxROMAN
, wxITALIC
, wxNORMAL
);
494 wxSWISS_FONT
= new wxFont (sizeFont
, wxSWISS
, wxNORMAL
, wxNORMAL
);
497 wxRED_PEN
= new wxPen (wxT("RED"), 1, wxSOLID
);
498 wxCYAN_PEN
= new wxPen (wxT("CYAN"), 1, wxSOLID
);
499 wxGREEN_PEN
= new wxPen (wxT("GREEN"), 1, wxSOLID
);
500 wxBLACK_PEN
= new wxPen (wxT("BLACK"), 1, wxSOLID
);
501 wxWHITE_PEN
= new wxPen (wxT("WHITE"), 1, wxSOLID
);
502 wxTRANSPARENT_PEN
= new wxPen (wxT("BLACK"), 1, wxTRANSPARENT
);
503 wxBLACK_DASHED_PEN
= new wxPen (wxT("BLACK"), 1, wxSHORT_DASH
);
504 wxGREY_PEN
= new wxPen (wxT("GREY"), 1, wxSOLID
);
505 wxMEDIUM_GREY_PEN
= new wxPen (wxT("MEDIUM GREY"), 1, wxSOLID
);
506 wxLIGHT_GREY_PEN
= new wxPen (wxT("LIGHT GREY"), 1, wxSOLID
);
508 wxBLUE_BRUSH
= new wxBrush (wxT("BLUE"), wxSOLID
);
509 wxGREEN_BRUSH
= new wxBrush (wxT("GREEN"), wxSOLID
);
510 wxWHITE_BRUSH
= new wxBrush (wxT("WHITE"), wxSOLID
);
511 wxBLACK_BRUSH
= new wxBrush (wxT("BLACK"), wxSOLID
);
512 wxTRANSPARENT_BRUSH
= new wxBrush (wxT("BLACK"), wxTRANSPARENT
);
513 wxCYAN_BRUSH
= new wxBrush (wxT("CYAN"), wxSOLID
);
514 wxRED_BRUSH
= new wxBrush (wxT("RED"), wxSOLID
);
515 wxGREY_BRUSH
= new wxBrush (wxT("GREY"), wxSOLID
);
516 wxMEDIUM_GREY_BRUSH
= new wxBrush (wxT("MEDIUM GREY"), wxSOLID
);
517 wxLIGHT_GREY_BRUSH
= new wxBrush (wxT("LIGHT GREY"), wxSOLID
);
519 wxBLACK
= new wxColour (wxT("BLACK"));
520 wxWHITE
= new wxColour (wxT("WHITE"));
521 wxRED
= new wxColour (wxT("RED"));
522 wxBLUE
= new wxColour (wxT("BLUE"));
523 wxGREEN
= new wxColour (wxT("GREEN"));
524 wxCYAN
= new wxColour (wxT("CYAN"));
525 wxLIGHT_GREY
= new wxColour (wxT("LIGHT GREY"));
527 wxSTANDARD_CURSOR
= new wxCursor (wxCURSOR_ARROW
);
528 wxHOURGLASS_CURSOR
= new wxCursor (wxCURSOR_WAIT
);
529 wxCROSS_CURSOR
= new wxCursor (wxCURSOR_CROSS
);
532 void wxDeleteStockObjects ()
534 wxDELETE(wxNORMAL_FONT
);
535 wxDELETE(wxSMALL_FONT
);
536 wxDELETE(wxITALIC_FONT
);
537 wxDELETE(wxSWISS_FONT
);
540 wxDELETE(wxCYAN_PEN
);
541 wxDELETE(wxGREEN_PEN
);
542 wxDELETE(wxBLACK_PEN
);
543 wxDELETE(wxWHITE_PEN
);
544 wxDELETE(wxTRANSPARENT_PEN
);
545 wxDELETE(wxBLACK_DASHED_PEN
);
546 wxDELETE(wxGREY_PEN
);
547 wxDELETE(wxMEDIUM_GREY_PEN
);
548 wxDELETE(wxLIGHT_GREY_PEN
);
550 wxDELETE(wxBLUE_BRUSH
);
551 wxDELETE(wxGREEN_BRUSH
);
552 wxDELETE(wxWHITE_BRUSH
);
553 wxDELETE(wxBLACK_BRUSH
);
554 wxDELETE(wxTRANSPARENT_BRUSH
);
555 wxDELETE(wxCYAN_BRUSH
);
556 wxDELETE(wxRED_BRUSH
);
557 wxDELETE(wxGREY_BRUSH
);
558 wxDELETE(wxMEDIUM_GREY_BRUSH
);
559 wxDELETE(wxLIGHT_GREY_BRUSH
);
567 wxDELETE(wxLIGHT_GREY
);
569 wxDELETE(wxSTANDARD_CURSOR
);
570 wxDELETE(wxHOURGLASS_CURSOR
);
571 wxDELETE(wxCROSS_CURSOR
);
574 void wxDeleteStockLists()
576 wxDELETE(wxTheBrushList
);
577 wxDELETE(wxThePenList
);
578 wxDELETE(wxTheFontList
);
579 wxDELETE(wxTheBitmapList
);
582 // ============================================================================
583 // wxTheXXXList stuff (semi-obsolete)
584 // ============================================================================
586 wxBitmapList::wxBitmapList()
590 wxBitmapList::~wxBitmapList ()
592 wxNode
*node
= GetFirst ();
595 wxBitmap
*bitmap
= (wxBitmap
*) node
->GetData ();
596 wxNode
*next
= node
->GetNext ();
597 if (bitmap
->GetVisible())
603 // Pen and Brush lists
604 wxPenList::~wxPenList ()
606 wxNode
*node
= GetFirst ();
609 wxPen
*pen
= (wxPen
*) node
->GetData ();
610 wxNode
*next
= node
->GetNext ();
611 if (pen
->GetVisible())
617 void wxPenList::AddPen (wxPen
* pen
)
622 void wxPenList::RemovePen (wxPen
* pen
)
627 wxPen
*wxPenList::FindOrCreatePen (const wxColour
& colour
, int width
, int style
)
629 for (wxNode
* node
= GetFirst (); node
; node
= node
->GetNext ())
631 wxPen
*each_pen
= (wxPen
*) node
->GetData ();
633 each_pen
->GetVisible() &&
634 each_pen
->GetWidth () == width
&&
635 each_pen
->GetStyle () == style
&&
636 each_pen
->GetColour ().Red () == colour
.Red () &&
637 each_pen
->GetColour ().Green () == colour
.Green () &&
638 each_pen
->GetColour ().Blue () == colour
.Blue ())
642 wxPen
*pen
= new wxPen (colour
, width
, style
);
645 // don't save the invalid pens in the list
653 // we'll delete it ourselves later
654 pen
->SetVisible(TRUE
);
659 wxBrushList::~wxBrushList ()
661 wxNode
*node
= GetFirst ();
664 wxBrush
*brush
= (wxBrush
*) node
->GetData ();
665 wxNode
*next
= node
->GetNext ();
666 if (brush
&& brush
->GetVisible())
672 void wxBrushList::AddBrush (wxBrush
* brush
)
677 wxBrush
*wxBrushList::FindOrCreateBrush (const wxColour
& colour
, int style
)
679 for (wxNode
* node
= GetFirst (); node
; node
= node
->GetNext ())
681 wxBrush
*each_brush
= (wxBrush
*) node
->GetData ();
683 each_brush
->GetVisible() &&
684 each_brush
->GetStyle () == style
&&
685 each_brush
->GetColour ().Red () == colour
.Red () &&
686 each_brush
->GetColour ().Green () == colour
.Green () &&
687 each_brush
->GetColour ().Blue () == colour
.Blue ())
691 wxBrush
*brush
= new wxBrush (colour
, style
);
695 // don't put the brushes we failed to create into the list
703 // we'll delete it ourselves later
704 brush
->SetVisible(TRUE
);
709 void wxBrushList::RemoveBrush (wxBrush
* brush
)
711 DeleteObject (brush
);
714 wxFontList::~wxFontList ()
716 wxNode
*node
= GetFirst ();
719 // Only delete objects that are 'visible', i.e.
720 // that have been created using FindOrCreate...,
721 // where the pointers are expected to be shared
722 // (and therefore not deleted by any one part of an app).
723 wxFont
*font
= (wxFont
*) node
->GetData ();
724 wxNode
*next
= node
->GetNext ();
725 if (font
->GetVisible())
731 void wxFontList::AddFont (wxFont
* font
)
736 void wxFontList::RemoveFont (wxFont
* font
)
741 wxFont
*wxFontList::FindOrCreateFont(int pointSize
,
746 const wxString
& facename
,
747 wxFontEncoding encoding
)
749 wxFont
*font
= (wxFont
*)NULL
;
751 for ( node
= GetFirst(); node
; node
= node
->GetNext() )
753 font
= (wxFont
*)node
->GetData();
754 if ( font
->GetVisible() &&
756 font
->GetPointSize () == pointSize
&&
757 font
->GetStyle () == style
&&
758 font
->GetWeight () == weight
&&
759 font
->GetUnderlined () == underline
)
761 int fontFamily
= font
->GetFamily();
763 #if defined(__WXGTK__)
764 // under GTK the default family is wxSWISS, so looking for a font
765 // with wxDEFAULT family should return a wxSWISS one instead of
766 // creating a new one
767 bool same
= (fontFamily
== family
) ||
768 (fontFamily
== wxSWISS
&& family
== wxDEFAULT
);
770 // VZ: but why elsewhere do we require an exact match? mystery...
771 bool same
= fontFamily
== family
;
774 // empty facename matches anything at all: this is bad because
775 // depending on which fonts are already created, we might get back
776 // a different font if we create it with empty facename, but it is
777 // still better than never matching anything in the cache at all
779 if ( same
&& !!facename
)
781 const wxString
& fontFace
= font
->GetFaceName();
783 // empty facename matches everything
784 same
= !fontFace
|| fontFace
== facename
;
787 if ( same
&& (encoding
!= wxFONTENCODING_DEFAULT
) )
789 // have to match the encoding too
790 same
= font
->GetEncoding() == encoding
;
802 // font not found, create the new one
803 font
= new wxFont(pointSize
, family
, style
, weight
,
804 underline
, facename
, encoding
);
808 // and mark it as being cacheable
809 font
->SetVisible(TRUE
);
815 void wxBitmapList::AddBitmap(wxBitmap
*bitmap
)
820 void wxBitmapList::RemoveBitmap(wxBitmap
*bitmap
)
822 DeleteObject(bitmap
);
825 wxSize
wxGetDisplaySize()
828 wxDisplaySize(& x
, & y
);
832 wxRect
wxGetClientDisplayRect()
834 int x
, y
, width
, height
;
835 wxClientDisplayRect(&x
, &y
, &width
, &height
); // call plat-specific version
836 return wxRect(x
, y
, width
, height
);
839 wxSize
wxGetDisplaySizeMM()
842 wxDisplaySizeMM(& x
, & y
);
846 wxResourceCache::~wxResourceCache ()
848 wxNode
*node
= GetFirst ();
850 wxObject
*item
= (wxObject
*)node
->GetData();
853 node
= node
->GetNext ();