]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/gdicmn.h
Make DoGetBestSize cache the value of GetSize() the first time it is called
[wxWidgets.git] / include / wx / gdicmn.h
index 9f81bff7d47ffe633cf68722e183e0f57c7e2e5d..7be6d7bcb4b2ef6ac38fdc676d10876252b512ae 100644 (file)
@@ -273,6 +273,12 @@ public:
 
     wxPoint& operator+=(const wxPoint& p) { x += p.x; y += p.y; return *this; }
     wxPoint& operator-=(const wxPoint& p) { x -= p.x; y -= p.y; return *this; }
+
+    wxPoint& operator+=(const wxSize& s) { x += s.GetWidth(); y += s.GetHeight(); return *this; }
+    wxPoint& operator-=(const wxSize& s) { x -= s.GetWidth(); y -= s.GetHeight(); return *this; }
+
+    wxPoint operator+(const wxSize& s) const { return wxPoint(x + s.GetWidth(), y + s.GetHeight()); }
+    wxPoint operator-(const wxSize& s) const { return wxPoint(x - s.GetWidth(), y - s.GetHeight()); }
 };
 
 // ---------------------------------------------------------------------------