X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c8326d649c00a47d3e77770a8e0a0a3b7ead56bb..1748289348c4c7dcc467edbf7192ade8a1b78921:/src/common/gdicmn.cpp?ds=sidebyside diff --git a/src/common/gdicmn.cpp b/src/common/gdicmn.cpp index a4820ae147..0214f8cad3 100644 --- a/src/common/gdicmn.cpp +++ b/src/common/gdicmn.cpp @@ -9,10 +9,6 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __VMS -#define XtDisplay XTDISPLAY -#endif - // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -21,40 +17,46 @@ #endif #include "wx/gdicmn.h" +#include "wx/gdiobj.h" #ifndef WX_PRECOMP #include "wx/log.h" - #include "wx/event.h" - #include "wx/app.h" - #include "wx/utils.h" - #include "wx/dc.h" #include "wx/pen.h" #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/bitmap.h" -#include "wx/font.h" -#include "wx/settings.h" -#include "wx/hashmap.h" -#include +IMPLEMENT_DYNAMIC_CLASS(wxGDIObject, wxObject) -#ifdef __WXMOTIF__ -#ifdef __VMS__ -#pragma message disable nosimpint -#endif -#include -#ifdef __VMS__ -#pragma message enable nosimpint -#endif -#endif -#ifdef __WXX11__ -#include "X11/Xlib.h" +WXDLLIMPEXP_DATA_CORE(wxBrushList*) wxTheBrushList; +WXDLLIMPEXP_DATA_CORE(wxFontList*) wxTheFontList; +WXDLLIMPEXP_DATA_CORE(wxPenList*) wxThePenList; + +WXDLLIMPEXP_DATA_CORE(wxColourDatabase*) wxTheColourDatabase; + +WXDLLIMPEXP_DATA_CORE(wxBitmap) wxNullBitmap; +WXDLLIMPEXP_DATA_CORE(wxBrush) wxNullBrush; +WXDLLIMPEXP_DATA_CORE(wxColour) wxNullColour; +WXDLLIMPEXP_DATA_CORE(wxCursor) wxNullCursor; +WXDLLIMPEXP_DATA_CORE(wxFont) wxNullFont; +WXDLLIMPEXP_DATA_CORE(wxIcon) wxNullIcon; +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); #if wxUSE_EXTENDED_RTTI @@ -86,8 +88,6 @@ wxCUSTOM_TYPE_INFO(wxSize, wxToStringConverter , wxFromStringConverter= x) && (cy >= y) && ((cy - y) < height) @@ -193,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(), @@ -324,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},