X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7cf41a5d66bec0a1297f1417852647aa353a148f..1748289348c4c7dcc467edbf7192ade8a1b78921:/src/common/gdicmn.cpp diff --git a/src/common/gdicmn.cpp b/src/common/gdicmn.cpp index a81555a5cc..0214f8cad3 100644 --- a/src/common/gdicmn.cpp +++ b/src/common/gdicmn.cpp @@ -17,6 +17,7 @@ #endif #include "wx/gdicmn.h" +#include "wx/gdiobj.h" #ifndef WX_PRECOMP #include "wx/log.h" @@ -24,13 +25,17 @@ #include "wx/brush.h" #include "wx/palette.h" #include "wx/icon.h" + #include "wx/iconbndl.h" #include "wx/cursor.h" #include "wx/settings.h" #include "wx/bitmap.h" #include "wx/colour.h" + #include "wx/font.h" #endif -#include "wx/font.h" + +IMPLEMENT_DYNAMIC_CLASS(wxGDIObject, wxObject) + WXDLLIMPEXP_DATA_CORE(wxBrushList*) wxTheBrushList; WXDLLIMPEXP_DATA_CORE(wxFontList*) wxTheFontList; @@ -48,6 +53,7 @@ WXDLLIMPEXP_DATA_CORE(wxPen) wxNullPen; #if wxUSE_PALETTE WXDLLIMPEXP_DATA_CORE(wxPalette) wxNullPalette; #endif +WXDLLIMPEXP_DATA_CORE(wxIconBundle) wxNullIconBundle; const wxSize wxDefaultSize(wxDefaultCoord, wxDefaultCoord); const wxPoint wxDefaultPosition(wxDefaultCoord, wxDefaultCoord); @@ -179,7 +185,7 @@ wxRect& wxRect::Inflate(wxCoord dx, wxCoord dy) return *this; } -bool wxRect::Inside(int cx, int cy) const +bool wxRect::Contains(int cx, int cy) const { return ( (cx >= x) && (cy >= y) && ((cy - y) < height) @@ -187,6 +193,11 @@ bool wxRect::Inside(int cx, int cy) const ); } +bool wxRect::Contains(const wxRect& rect) const +{ + return Contains(rect.GetTopLeft()) && Contains(rect.GetBottomRight()); +} + wxRect& wxRect::Intersect(const wxRect& rect) { int x2 = GetRight(), @@ -318,7 +329,7 @@ void wxColourDatabase::Initialize() {wxT("ORANGE RED"), 255, 0, 127}, {wxT("ORCHID"), 219, 112, 219}, {wxT("PALE GREEN"), 143, 188, 143}, - {wxT("PINK"), 188, 143, 234}, + {wxT("PINK"), 255, 192, 203}, {wxT("PLUM"), 234, 173, 234}, {wxT("PURPLE"), 176, 0, 255}, {wxT("RED"), 255, 0, 0},