]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/gdicmn.h
Disconnect "hide" menu signal to fix menu destruction in wxGTK.
[wxWidgets.git] / include / wx / gdicmn.h
index 012a90e61f709dedf955a2c44bdcb0efc84c4d47..47de6eefbba7198f2b52c9cdbfe09b40138998c0 100644 (file)
@@ -524,6 +524,18 @@ public:
 
     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; }
+
+    // check if both components are set/initialized
+    bool IsFullySpecified() const { return x != wxDefaultCoord && y != wxDefaultCoord; }
+
+    // fill in the unset components with the values from the other point
+    void SetDefaults(const wxPoint& pt)
+    {
+        if ( x == wxDefaultCoord )
+            x = pt.x;
+        if ( y == wxDefaultCoord )
+            y = pt.y;
+    }
 };