1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/common/gdicmn.cpp
3 // Purpose: Common GDI classes
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 // For compilers that support precompilation, includes "wx.h".
13 #include "wx/wxprec.h"
19 #include "wx/gdicmn.h"
20 #include "wx/gdiobj.h"
26 #include "wx/palette.h"
28 #include "wx/iconbndl.h"
29 #include "wx/cursor.h"
30 #include "wx/settings.h"
31 #include "wx/bitmap.h"
32 #include "wx/colour.h"
37 IMPLEMENT_DYNAMIC_CLASS(wxGDIObject
, wxObject
)
40 WXDLLIMPEXP_DATA_CORE(wxBrushList
*) wxTheBrushList
;
41 WXDLLIMPEXP_DATA_CORE(wxFontList
*) wxTheFontList
;
42 WXDLLIMPEXP_DATA_CORE(wxPenList
*) wxThePenList
;
44 WXDLLIMPEXP_DATA_CORE(wxColourDatabase
*) wxTheColourDatabase
;
46 WXDLLIMPEXP_DATA_CORE(wxBitmap
) wxNullBitmap
;
47 WXDLLIMPEXP_DATA_CORE(wxBrush
) wxNullBrush
;
48 WXDLLIMPEXP_DATA_CORE(wxColour
) wxNullColour
;
49 WXDLLIMPEXP_DATA_CORE(wxCursor
) wxNullCursor
;
50 WXDLLIMPEXP_DATA_CORE(wxFont
) wxNullFont
;
51 WXDLLIMPEXP_DATA_CORE(wxIcon
) wxNullIcon
;
52 WXDLLIMPEXP_DATA_CORE(wxPen
) wxNullPen
;
54 WXDLLIMPEXP_DATA_CORE(wxPalette
) wxNullPalette
;
56 WXDLLIMPEXP_DATA_CORE(wxIconBundle
) wxNullIconBundle
;
58 const wxSize
wxDefaultSize(wxDefaultCoord
, wxDefaultCoord
);
59 const wxPoint
wxDefaultPosition(wxDefaultCoord
, wxDefaultCoord
);
61 #if wxUSE_EXTENDED_RTTI
65 template<> void wxStringReadValue(const wxString
&s
, wxPoint
&data
)
67 wxSscanf(s
, wxT("%d,%d"), &data
.x
, &data
.y
) ;
70 template<> void wxStringWriteValue(wxString
&s
, const wxPoint
&data
)
72 s
= wxString::Format(wxT("%d,%d"), data
.x
, data
.y
) ;
75 wxCUSTOM_TYPE_INFO(wxPoint
, wxToStringConverter
<wxPoint
> , wxFromStringConverter
<wxPoint
>)
77 template<> void wxStringReadValue(const wxString
&s
, wxSize
&data
)
79 wxSscanf(s
, wxT("%d,%d"), &data
.x
, &data
.y
) ;
82 template<> void wxStringWriteValue(wxString
&s
, const wxSize
&data
)
84 s
= wxString::Format(wxT("%d,%d"), data
.x
, data
.y
) ;
87 wxCUSTOM_TYPE_INFO(wxSize
, wxToStringConverter
<wxSize
> , wxFromStringConverter
<wxSize
>)
91 wxRect::wxRect(const wxPoint
& point1
, const wxPoint
& point2
)
95 width
= point2
.x
- point1
.x
;
96 height
= point2
.y
- point1
.y
;
113 bool wxRect::operator==(const wxRect
& rect
) const
115 return ((x
== rect
.x
) &&
117 (width
== rect
.width
) &&
118 (height
== rect
.height
));
121 wxRect
wxRect::operator+(const wxRect
& rect
) const
123 int x1
= wxMin(this->x
, rect
.x
);
124 int y1
= wxMin(this->y
, rect
.y
);
125 int y2
= wxMax(y
+height
, rect
.height
+rect
.y
);
126 int x2
= wxMax(x
+width
, rect
.width
+rect
.x
);
127 return wxRect(x1
, y1
, x2
-x1
, y2
-y1
);
130 wxRect
& wxRect::Union(const wxRect
& rect
)
132 // ignore empty rectangles: union with an empty rectangle shouldn't extend
133 // this one to (0, 0)
134 if ( !width
|| !height
)
138 else if ( rect
.width
&& rect
.height
)
140 int x1
= wxMin(x
, rect
.x
);
141 int y1
= wxMin(y
, rect
.y
);
142 int y2
= wxMax(y
+ height
, rect
.height
+ rect
.y
);
143 int x2
= wxMax(x
+ width
, rect
.width
+ rect
.x
);
150 //else: we're not empty and rect is empty
155 wxRect
& wxRect::Inflate(wxCoord dx
, wxCoord dy
)
159 // Don't allow deflate to eat more width than we have,
160 // a well-defined rectangle cannot have negative width.
166 // The inflate is valid.
173 // Don't allow deflate to eat more height than we have,
174 // a well-defined rectangle cannot have negative height.
180 // The inflate is valid.
188 bool wxRect::Contains(int cx
, int cy
) const
190 return ( (cx
>= x
) && (cy
>= y
)
191 && ((cy
- y
) < height
)
192 && ((cx
- x
) < width
)
196 bool wxRect::Contains(const wxRect
& rect
) const
198 return Contains(rect
.GetTopLeft()) && Contains(rect
.GetBottomRight());
201 wxRect
& wxRect::Intersect(const wxRect
& rect
)
210 if ( x2
> rect
.GetRight() )
211 x2
= rect
.GetRight();
212 if ( y2
> rect
.GetBottom() )
213 y2
= rect
.GetBottom();
218 if ( width
<= 0 || height
<= 0 )
227 bool wxRect::Intersects(const wxRect
& rect
) const
229 wxRect r
= Intersect(rect
);
231 // if there is no intersection, both width and height are 0
235 // ============================================================================
237 // ============================================================================
239 // ----------------------------------------------------------------------------
240 // wxColourDatabase ctor/dtor
241 // ----------------------------------------------------------------------------
243 wxColourDatabase::wxColourDatabase ()
245 // will be created on demand in Initialize()
249 wxColourDatabase::~wxColourDatabase ()
253 WX_CLEAR_HASH_MAP(wxStringToColourHashMap
, *m_map
);
259 delete [] m_palTable
;
263 // Colour database stuff
264 void wxColourDatabase::Initialize()
268 // already initialized
272 m_map
= new wxStringToColourHashMap
;
274 static const struct wxColourDesc
281 {wxT("AQUAMARINE"),112, 219, 147},
282 {wxT("BLACK"),0, 0, 0},
283 {wxT("BLUE"), 0, 0, 255},
284 {wxT("BLUE VIOLET"), 159, 95, 159},
285 {wxT("BROWN"), 165, 42, 42},
286 {wxT("CADET BLUE"), 95, 159, 159},
287 {wxT("CORAL"), 255, 127, 0},
288 {wxT("CORNFLOWER BLUE"), 66, 66, 111},
289 {wxT("CYAN"), 0, 255, 255},
290 {wxT("DARK GREY"), 47, 47, 47}, // ?
292 {wxT("DARK GREEN"), 47, 79, 47},
293 {wxT("DARK OLIVE GREEN"), 79, 79, 47},
294 {wxT("DARK ORCHID"), 153, 50, 204},
295 {wxT("DARK SLATE BLUE"), 107, 35, 142},
296 {wxT("DARK SLATE GREY"), 47, 79, 79},
297 {wxT("DARK TURQUOISE"), 112, 147, 219},
298 {wxT("DIM GREY"), 84, 84, 84},
299 {wxT("FIREBRICK"), 142, 35, 35},
300 {wxT("FOREST GREEN"), 35, 142, 35},
301 {wxT("GOLD"), 204, 127, 50},
302 {wxT("GOLDENROD"), 219, 219, 112},
303 {wxT("GREY"), 128, 128, 128},
304 {wxT("GREEN"), 0, 255, 0},
305 {wxT("GREEN YELLOW"), 147, 219, 112},
306 {wxT("INDIAN RED"), 79, 47, 47},
307 {wxT("KHAKI"), 159, 159, 95},
308 {wxT("LIGHT BLUE"), 191, 216, 216},
309 {wxT("LIGHT GREY"), 192, 192, 192},
310 {wxT("LIGHT STEEL BLUE"), 143, 143, 188},
311 {wxT("LIME GREEN"), 50, 204, 50},
312 {wxT("LIGHT MAGENTA"), 255, 0, 255},
313 {wxT("MAGENTA"), 255, 0, 255},
314 {wxT("MAROON"), 142, 35, 107},
315 {wxT("MEDIUM AQUAMARINE"), 50, 204, 153},
316 {wxT("MEDIUM GREY"), 100, 100, 100},
317 {wxT("MEDIUM BLUE"), 50, 50, 204},
318 {wxT("MEDIUM FOREST GREEN"), 107, 142, 35},
319 {wxT("MEDIUM GOLDENROD"), 234, 234, 173},
320 {wxT("MEDIUM ORCHID"), 147, 112, 219},
321 {wxT("MEDIUM SEA GREEN"), 66, 111, 66},
322 {wxT("MEDIUM SLATE BLUE"), 127, 0, 255},
323 {wxT("MEDIUM SPRING GREEN"), 127, 255, 0},
324 {wxT("MEDIUM TURQUOISE"), 112, 219, 219},
325 {wxT("MEDIUM VIOLET RED"), 219, 112, 147},
326 {wxT("MIDNIGHT BLUE"), 47, 47, 79},
327 {wxT("NAVY"), 35, 35, 142},
328 {wxT("ORANGE"), 204, 50, 50},
329 {wxT("ORANGE RED"), 255, 0, 127},
330 {wxT("ORCHID"), 219, 112, 219},
331 {wxT("PALE GREEN"), 143, 188, 143},
332 {wxT("PINK"), 255, 192, 203},
333 {wxT("PLUM"), 234, 173, 234},
334 {wxT("PURPLE"), 176, 0, 255},
335 {wxT("RED"), 255, 0, 0},
336 {wxT("SALMON"), 111, 66, 66},
337 {wxT("SEA GREEN"), 35, 142, 107},
338 {wxT("SIENNA"), 142, 107, 35},
339 {wxT("SKY BLUE"), 50, 153, 204},
340 {wxT("SLATE BLUE"), 0, 127, 255},
341 {wxT("SPRING GREEN"), 0, 255, 127},
342 {wxT("STEEL BLUE"), 35, 107, 142},
343 {wxT("TAN"), 219, 147, 112},
344 {wxT("THISTLE"), 216, 191, 216},
345 {wxT("TURQUOISE"), 173, 234, 234},
346 {wxT("VIOLET"), 79, 47, 79},
347 {wxT("VIOLET RED"), 204, 50, 153},
348 {wxT("WHEAT"), 216, 216, 191},
349 {wxT("WHITE"), 255, 255, 255},
350 {wxT("YELLOW"), 255, 255, 0},
351 {wxT("YELLOW GREEN"), 153, 204, 50}
356 for ( n
= 0; n
< WXSIZEOF(wxColourTable
); n
++ )
358 const wxColourDesc
& cc
= wxColourTable
[n
];
359 (*m_map
)[cc
.name
] = new wxColour(cc
.r
, cc
.g
, cc
.b
);
363 m_palTable
= new long[n
];
364 for ( n
= 0; n
< WXSIZEOF(wxColourTable
); n
++ )
366 const wxColourDesc
& cc
= wxColourTable
[n
];
367 m_palTable
[n
] = OS2RGB(cc
.r
,cc
.g
,cc
.b
);
373 // ----------------------------------------------------------------------------
374 // wxColourDatabase operations
375 // ----------------------------------------------------------------------------
377 void wxColourDatabase::AddColour(const wxString
& name
, const wxColour
& colour
)
381 // canonicalize the colour names before using them as keys: they should be
383 wxString colName
= name
;
386 // ... and we also allow both grey/gray
387 wxString colNameAlt
= colName
;
388 if ( !colNameAlt
.Replace(_T("GRAY"), _T("GREY")) )
390 // but in this case it is not necessary so avoid extra search below
394 wxStringToColourHashMap::iterator it
= m_map
->find(colName
);
395 if ( it
== m_map
->end() && !colNameAlt
.empty() )
396 it
= m_map
->find(colNameAlt
);
397 if ( it
!= m_map
->end() )
399 *(it
->second
) = colour
;
403 (*m_map
)[colName
] = new wxColour(colour
);
407 wxColour
wxColourDatabase::Find(const wxString
& colour
) const
409 wxColourDatabase
* const self
= wxConstCast(this, wxColourDatabase
);
412 // make the comparaison case insensitive and also match both grey and gray
413 wxString colName
= colour
;
415 wxString colNameAlt
= colName
;
416 if ( !colNameAlt
.Replace(_T("GRAY"), _T("GREY")) )
419 wxStringToColourHashMap::iterator it
= m_map
->find(colName
);
420 if ( it
== m_map
->end() && !colNameAlt
.empty() )
421 it
= m_map
->find(colNameAlt
);
422 if ( it
!= m_map
->end() )
423 return *(it
->second
);
425 // we did not find any result in existing colours:
426 // we won't use wxString -> wxColour conversion because the
427 // wxColour::Set(const wxString &) function which does that conversion
428 // internally uses this function (wxColourDatabase::Find) and we want
429 // to avoid infinite recursion !
433 wxString
wxColourDatabase::FindName(const wxColour
& colour
) const
435 wxColourDatabase
* const self
= wxConstCast(this, wxColourDatabase
);
438 typedef wxStringToColourHashMap::iterator iterator
;
440 for ( iterator it
= m_map
->begin(), en
= m_map
->end(); it
!= en
; ++it
)
442 if ( *(it
->second
) == colour
)
446 return wxEmptyString
;
449 // ----------------------------------------------------------------------------
450 // deprecated wxColourDatabase methods
451 // ----------------------------------------------------------------------------
453 #if WXWIN_COMPATIBILITY_2_6
454 wxColour
*wxColourDatabase::FindColour(const wxString
& name
)
456 // This function is deprecated, use Find() instead.
457 // Formerly this function sometimes would return a deletable pointer and
458 // sometimes a non-deletable one (when returning a colour from the database).
459 // Trying to delete the latter anyway results in problems, so probably
460 // nobody ever freed the pointers. Currently it always returns a new
461 // instance, which means there will be memory leaks.
462 wxLogDebug(wxT("wxColourDataBase::FindColour():")
463 wxT(" Please use wxColourDataBase::Find() instead"));
465 // using a static variable here is not the most elegant solution but unless
466 // we want to make wxStringToColourHashMap public (i.e. move it to the
467 // header) so that we could have a member function returning
468 // wxStringToColourHashMap::iterator, there is really no good way to do it
471 // and knowing that this function is going to disappear in the next release
472 // anyhow I don't want to waste time on this
474 static wxColour s_col
;
480 return new wxColour(s_col
);
482 #endif // WXWIN_COMPATIBILITY_2_6
484 // ============================================================================
486 // ============================================================================
488 static wxStockGDI gs_wxStockGDI_instance
;
489 wxStockGDI
* wxStockGDI::ms_instance
= &gs_wxStockGDI_instance
;
490 wxObject
* wxStockGDI::ms_stockObject
[ITEMCOUNT
];
492 wxStockGDI::wxStockGDI()
496 wxStockGDI::~wxStockGDI()
500 void wxStockGDI::DeleteAll()
502 for (unsigned i
= 0; i
< ITEMCOUNT
; i
++)
504 delete ms_stockObject
[i
];
505 ms_stockObject
[i
] = NULL
;
509 const wxBrush
* wxStockGDI::GetBrush(Item item
)
511 wxBrush
* brush
= wx_static_cast(wxBrush
*, ms_stockObject
[item
]);
517 brush
= new wxBrush(*GetColour(COLOUR_BLACK
), wxSOLID
);
520 brush
= new wxBrush(*GetColour(COLOUR_BLUE
), wxSOLID
);
523 brush
= new wxBrush(*GetColour(COLOUR_CYAN
), wxSOLID
);
526 brush
= new wxBrush(*GetColour(COLOUR_GREEN
), wxSOLID
);
529 brush
= new wxBrush(wxColour(wxT("GREY")), wxSOLID
);
531 case BRUSH_LIGHTGREY
:
532 brush
= new wxBrush(*GetColour(COLOUR_LIGHTGREY
), wxSOLID
);
534 case BRUSH_MEDIUMGREY
:
535 brush
= new wxBrush(wxColour(wxT("MEDIUM GREY")), wxSOLID
);
538 brush
= new wxBrush(*GetColour(COLOUR_RED
), wxSOLID
);
540 case BRUSH_TRANSPARENT
:
541 brush
= new wxBrush(*GetColour(COLOUR_BLACK
), wxTRANSPARENT
);
544 brush
= new wxBrush(*GetColour(COLOUR_WHITE
), wxSOLID
);
549 ms_stockObject
[item
] = brush
;
554 const wxColour
* wxStockGDI::GetColour(Item item
)
556 wxColour
* colour
= wx_static_cast(wxColour
*, ms_stockObject
[item
]);
562 colour
= new wxColour(0, 0, 0);
565 colour
= new wxColour(0, 0, 255);
568 colour
= new wxColour(wxT("CYAN"));
571 colour
= new wxColour(0, 255, 0);
573 case COLOUR_LIGHTGREY
:
574 colour
= new wxColour(wxT("LIGHT GREY"));
577 colour
= new wxColour(255, 0, 0);
580 colour
= new wxColour(255, 255, 255);
585 ms_stockObject
[item
] = colour
;
590 const wxCursor
* wxStockGDI::GetCursor(Item item
)
592 wxCursor
* cursor
= wx_static_cast(wxCursor
*, ms_stockObject
[item
]);
598 cursor
= new wxCursor(wxCURSOR_CROSS
);
600 case CURSOR_HOURGLASS
:
601 cursor
= new wxCursor(wxCURSOR_WAIT
);
603 case CURSOR_STANDARD
:
604 cursor
= new wxCursor(wxCURSOR_ARROW
);
609 ms_stockObject
[item
] = cursor
;
614 const wxFont
* wxStockGDI::GetFont(Item item
)
616 wxFont
* font
= wx_static_cast(wxFont
*, ms_stockObject
[item
]);
622 font
= new wxFont(GetFont(FONT_NORMAL
)->GetPointSize(), wxROMAN
, wxITALIC
, wxNORMAL
);
625 font
= new wxFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT
));
628 font
= new wxFont(GetFont(FONT_NORMAL
)->GetPointSize() - 2, wxSWISS
, wxNORMAL
, wxNORMAL
);
631 font
= new wxFont(GetFont(FONT_NORMAL
)->GetPointSize(), wxSWISS
, wxNORMAL
, wxNORMAL
);
636 ms_stockObject
[item
] = font
;
641 const wxPen
* wxStockGDI::GetPen(Item item
)
643 wxPen
* pen
= wx_static_cast(wxPen
*, ms_stockObject
[item
]);
649 pen
= new wxPen(*GetColour(COLOUR_BLACK
), 1, wxSOLID
);
651 case PEN_BLACKDASHED
:
652 pen
= new wxPen(*GetColour(COLOUR_BLACK
), 1, wxSHORT_DASH
);
655 pen
= new wxPen(*GetColour(COLOUR_CYAN
), 1, wxSOLID
);
658 pen
= new wxPen(*GetColour(COLOUR_GREEN
), 1, wxSOLID
);
661 pen
= new wxPen(wxColour(wxT("GREY")), 1, wxSOLID
);
664 pen
= new wxPen(*GetColour(COLOUR_LIGHTGREY
), 1, wxSOLID
);
667 pen
= new wxPen(wxColour(wxT("MEDIUM GREY")), 1, wxSOLID
);
670 pen
= new wxPen(*GetColour(COLOUR_RED
), 1, wxSOLID
);
672 case PEN_TRANSPARENT
:
673 pen
= new wxPen(*GetColour(COLOUR_BLACK
), 1, wxTRANSPARENT
);
676 pen
= new wxPen(*GetColour(COLOUR_WHITE
), 1, wxSOLID
);
681 ms_stockObject
[item
] = pen
;
686 void wxInitializeStockLists()
688 wxTheColourDatabase
= new wxColourDatabase
;
690 wxTheBrushList
= new wxBrushList
;
691 wxThePenList
= new wxPenList
;
692 wxTheFontList
= new wxFontList
;
695 void wxDeleteStockLists()
697 wxDELETE(wxTheBrushList
);
698 wxDELETE(wxThePenList
);
699 wxDELETE(wxTheFontList
);
702 // ============================================================================
703 // wxTheXXXList stuff (semi-obsolete)
704 // ============================================================================
706 wxGDIObjListBase::wxGDIObjListBase()
710 wxGDIObjListBase::~wxGDIObjListBase()
712 for (wxList::compatibility_iterator node
= list
.GetFirst(); node
; node
= node
->GetNext())
714 delete wx_static_cast(wxObject
*, node
->GetData());
718 wxPen
*wxPenList::FindOrCreatePen (const wxColour
& colour
, int width
, int style
)
720 for (wxList::compatibility_iterator node
= list
.GetFirst(); node
; node
= node
->GetNext())
722 wxPen
*each_pen
= (wxPen
*) node
->GetData ();
724 each_pen
->GetWidth () == width
&&
725 each_pen
->GetStyle () == style
&&
726 each_pen
->GetColour ().Red () == colour
.Red () &&
727 each_pen
->GetColour ().Green () == colour
.Green () &&
728 each_pen
->GetColour ().Blue () == colour
.Blue ())
733 wxPen
penTmp(colour
, width
, style
);
736 pen
= new wxPen(penTmp
);
743 wxBrush
*wxBrushList::FindOrCreateBrush (const wxColour
& colour
, int style
)
745 for (wxList::compatibility_iterator node
= list
.GetFirst(); node
; node
= node
->GetNext())
747 wxBrush
*each_brush
= (wxBrush
*) node
->GetData ();
749 each_brush
->GetStyle () == style
&&
750 each_brush
->GetColour ().Red () == colour
.Red () &&
751 each_brush
->GetColour ().Green () == colour
.Green () &&
752 each_brush
->GetColour ().Blue () == colour
.Blue ())
756 wxBrush
* brush
= NULL
;
757 wxBrush
brushTmp(colour
, style
);
760 brush
= new wxBrush(brushTmp
);
767 wxFont
*wxFontList::FindOrCreateFont(int pointSize
,
772 const wxString
& facename
,
773 wxFontEncoding encoding
)
776 wxList::compatibility_iterator node
;
777 for (node
= list
.GetFirst(); node
; node
= node
->GetNext())
779 font
= (wxFont
*)node
->GetData();
781 font
->GetPointSize () == pointSize
&&
782 font
->GetStyle () == style
&&
783 font
->GetWeight () == weight
&&
784 font
->GetUnderlined () == underline
)
786 int fontFamily
= font
->GetFamily();
788 #if defined(__WXGTK__)
789 // under GTK the default family is wxSWISS, so looking for a font
790 // with wxDEFAULT family should return a wxSWISS one instead of
791 // creating a new one
792 bool same
= (fontFamily
== family
) ||
793 (fontFamily
== wxSWISS
&& family
== wxDEFAULT
);
795 // VZ: but why elsewhere do we require an exact match? mystery...
796 bool same
= fontFamily
== family
;
799 // empty facename matches anything at all: this is bad because
800 // depending on which fonts are already created, we might get back
801 // a different font if we create it with empty facename, but it is
802 // still better than never matching anything in the cache at all
804 if ( same
&& !facename
.empty() )
806 const wxString
& fontFace
= font
->GetFaceName();
808 // empty facename matches everything
809 same
= !fontFace
|| fontFace
== facename
;
812 if ( same
&& (encoding
!= wxFONTENCODING_DEFAULT
) )
814 // have to match the encoding too
815 same
= font
->GetEncoding() == encoding
;
825 // font not found, create the new one
827 wxFont
fontTmp(pointSize
, family
, style
, weight
, underline
, facename
, encoding
);
830 font
= new wxFont(fontTmp
);
837 #if WXWIN_COMPATIBILITY_2_6
838 void wxBrushList::AddBrush(wxBrush
*) { }
839 void wxBrushList::RemoveBrush(wxBrush
*) { }
840 void wxFontList::AddFont(wxFont
*) { }
841 void wxFontList::RemoveFont(wxFont
*) { }
842 void wxPenList::AddPen(wxPen
*) { }
843 void wxPenList::RemovePen(wxPen
*) { }
846 wxSize
wxGetDisplaySize()
849 wxDisplaySize(& x
, & y
);
853 wxRect
wxGetClientDisplayRect()
855 int x
, y
, width
, height
;
856 wxClientDisplayRect(&x
, &y
, &width
, &height
); // call plat-specific version
857 return wxRect(x
, y
, width
, height
);
860 wxSize
wxGetDisplaySizeMM()
863 wxDisplaySizeMM(& x
, & y
);
867 wxResourceCache::~wxResourceCache ()
869 wxList::compatibility_iterator node
= GetFirst ();
871 wxObject
*item
= (wxObject
*)node
->GetData();
874 node
= node
->GetNext ();