]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/gdicmn.h
Dirty hack to prevent double destruction of file dialog.
[wxWidgets.git] / include / wx / gdicmn.h
index 83858f5c855a56eac71d56a8883386037c001854..ff1c1a722b483e6db04c2daf93d5b969d564f596 100644 (file)
@@ -217,9 +217,15 @@ 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; }
 
-    // FIXME are these really useful? If they're, we should have += &c as well
     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) { x += sz.x; y += sz.y; return *this; }
+    wxSize& operator-=(const wxSize& sz) { x -= sz.x; y -= sz.y; return *this; }
+    wxSize& operator/=(const int i) { x /= i; y /= i; return *this; }
+    wxSize& operator*=(const int i) { x *= i; y *= i; return *this; }
 
     void IncTo(const wxSize& sz)
         { if ( sz.x > x ) x = sz.x; if ( sz.y > y ) y = sz.y; }
@@ -314,6 +320,7 @@ public:
         { }
     wxRect(const wxPoint& topLeft, const wxPoint& bottomRight);
     wxRect(const wxPoint& pos, const wxSize& size);
+    wxRect(const wxSize& size);
 
     // default copy ctor and assignment operators ok