X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/99d800190a04a2deaf769017a5fae04a4ae50378..e4277538a535d6d6c049f0b0ead9ed2b07cd93f2:/include/wx/gdicmn.h?ds=sidebyside diff --git a/include/wx/gdicmn.h b/include/wx/gdicmn.h index f04d644dba..d38fe44b93 100644 --- a/include/wx/gdicmn.h +++ b/include/wx/gdicmn.h @@ -16,15 +16,12 @@ // headers // --------------------------------------------------------------------------- -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma interface "gdicmn.h" -#endif - #include "wx/defs.h" #include "wx/list.h" #include "wx/string.h" #include "wx/fontenc.h" #include "wx/hashmap.h" +#include "wx/math.h" // --------------------------------------------------------------------------- // forward declarations @@ -217,10 +214,10 @@ public: bool operator==(const wxSize& sz) const { return x == sz.x && y == sz.y; } bool operator!=(const wxSize& sz) const { return x != sz.x || y != sz.y; } - wxSize operator+(const wxSize& sz) { return wxSize(x + sz.x, y + sz.y); } - wxSize operator-(const wxSize& sz) { return wxSize(x - sz.x, y - sz.y); } - wxSize operator/(const int i) { return wxSize(x / i, y / i); } - wxSize operator*(const int i) { return wxSize(x * i, y * i); } + wxSize operator+(const wxSize& sz) const { return wxSize(x + sz.x, y + sz.y); } + wxSize operator-(const wxSize& sz) const { return wxSize(x - sz.x, y - sz.y); } + wxSize operator/(int i) const { return wxSize(x / i, y / i); } + wxSize operator*(int i) const { return wxSize(x * i, y * i); } wxSize& operator+=(const wxSize& sz) { x += sz.x; y += sz.y; return *this; } wxSize& operator-=(const wxSize& sz) { x -= sz.x; y -= sz.y; return *this; } @@ -273,10 +270,14 @@ public: wxRealPoint operator+(const wxRealPoint& pt) const { return wxRealPoint(x + pt.x, y + pt.y); } wxRealPoint operator-(const wxRealPoint& pt) const { return wxRealPoint(x - pt.x, y - pt.y); } - bool operator==(const wxRealPoint& pt) const { return x == pt.x && y == pt.y; } - bool operator!=(const wxRealPoint& pt) const { return x != pt.x || y != pt.y; } + bool operator==(const wxRealPoint& pt) const + { + return wxIsSameDouble(x, pt.x) && wxIsSameDouble(y, pt.y); + } + bool operator!=(const wxRealPoint& pt) const { return !(*this == pt); } }; + class WXDLLEXPORT wxPoint { public: @@ -589,7 +590,7 @@ extern WXDLLEXPORT_DATA(wxCursor*) wxCROSS_CURSOR; extern WXDLLEXPORT_DATA(wxColourDatabase*) wxTheColourDatabase; -extern WXDLLEXPORT_DATA(const wxChar*) wxPanelNameStr; +extern WXDLLEXPORT_DATA(const wxChar) wxPanelNameStr[]; extern WXDLLEXPORT_DATA(const wxSize) wxDefaultSize; extern WXDLLEXPORT_DATA(const wxPoint) wxDefaultPosition;