~wxSize();
+// %extend {
+// bool __eq__(const wxSize* other) { return other ? (*self == *other) : False; }
+// bool __ne__(const wxSize* other) { return other ? (*self != *other) : True; }
+// }
+
DocDeclStr(
bool, operator==(const wxSize& sz),
"Test for equality of wx.Size objects.");
int GetWidth() const;
int GetHeight() const;
+
+ DocDeclStr(
+ bool , IsFullySpecified() const,
+ "Returns True if both components of the size are non-default values.");
+
+
+ DocDeclStr(
+ void , SetDefaults(const wxSize& size),
+ "Combine this size with the other one replacing the default
+components of this object (i.e. equal to -1) with those of the
+other.");
+
+
//int GetX() const;
//int GetY() const;
"Get() -> (width,height)",
"Returns the width and height properties as a tuple.");
PyObject* Get() {
- wxPyBeginBlockThreads();
+ bool blocked = wxPyBeginBlockThreads();
PyObject* tup = PyTuple_New(2);
PyTuple_SET_ITEM(tup, 0, PyInt_FromLong(self->x));
PyTuple_SET_ITEM(tup, 1, PyInt_FromLong(self->y));
- wxPyEndBlockThreads();
+ wxPyEndBlockThreads(blocked);
return tup;
}
}
elif index == 1: self.height = val
else: raise IndexError
def __nonzero__(self): return self.Get() != (0,0)
- def __getinitargs__(self): return ()
- def __getstate__(self): return self.Get()
- def __setstate__(self, state): self.Set(*state)
+ __safe_for_unpickling__ = True
+ def __reduce__(self): return (wx.Size, self.Get())
}
};
"Get() -> (x,y)",
"Return the x and y properties as a tuple. ");
PyObject* Get() {
- wxPyBeginBlockThreads();
+ bool blocked = wxPyBeginBlockThreads();
PyObject* tup = PyTuple_New(2);
PyTuple_SET_ITEM(tup, 0, PyFloat_FromDouble(self->x));
PyTuple_SET_ITEM(tup, 1, PyFloat_FromDouble(self->y));
- wxPyEndBlockThreads();
+ wxPyEndBlockThreads(blocked);
return tup;
}
}
elif index == 1: self.y = val
else: raise IndexError
def __nonzero__(self): return self.Get() != (0.0, 0.0)
- def __getinitargs__(self): return ()
- def __getstate__(self): return self.Get()
- def __setstate__(self, state): self.Set(*state)
+ __safe_for_unpickling__ = True
+ def __reduce__(self): return (wx.RealPoint, self.Get())
}
};
bool, operator!=(const wxPoint& pt),
"Test for inequality of wx.Point objects.");
+
+
+// %nokwargs operator+;
+// %nokwargs operator-;
+// %nokwargs operator+=;
+// %nokwargs operator-=;
DocDeclStr(
wxPoint, operator+(const wxPoint& pt),
"Add pt's proprties to this and return the result.");
+
DocDeclStr(
wxPoint, operator-(const wxPoint& pt),
"Subtract pt's proprties from this and return the result");
wxPoint&, operator-=(const wxPoint& pt),
"Subtract pt from this object.");
+
+
+// DocDeclStr(
+// wxPoint, operator+(const wxSize& sz),
+// "Add sz to this Point and return the result.");
+
+// DocDeclStr(
+// wxPoint, operator-(const wxSize& sz),
+// "Subtract sz from this Point and return the result");
+
+
+// DocDeclStr(
+// wxPoint&, operator+=(const wxSize& sz),
+// "Add sz to this object.");
+
+// DocDeclStr(
+// wxPoint&, operator-=(const wxSize& sz),
+// "Subtract sz from this object.");
+
+
+
%extend {
DocStr(Set, "Set both the x and y properties");
"Get() -> (x,y)",
"Return the x and y properties as a tuple. ");
PyObject* Get() {
- wxPyBeginBlockThreads();
+ bool blocked = wxPyBeginBlockThreads();
PyObject* tup = PyTuple_New(2);
PyTuple_SET_ITEM(tup, 0, PyInt_FromLong(self->x));
PyTuple_SET_ITEM(tup, 1, PyInt_FromLong(self->y));
- wxPyEndBlockThreads();
+ wxPyEndBlockThreads(blocked);
return tup;
}
}
elif index == 1: self.y = val
else: raise IndexError
def __nonzero__(self): return self.Get() != (0,0)
- def __getinitargs__(self): return ()
- def __getstate__(self): return self.Get()
- def __setstate__(self, state): self.Set(*state)
+ __safe_for_unpickling__ = True
+ def __reduce__(self): return (wx.Point, self.Get())
}
};
"Get() -> (x,y,width,height)",
"Return the rectangle properties as a tuple.");
PyObject* Get() {
- wxPyBeginBlockThreads();
+ bool blocked = wxPyBeginBlockThreads();
PyObject* tup = PyTuple_New(4);
PyTuple_SET_ITEM(tup, 0, PyInt_FromLong(self->x));
PyTuple_SET_ITEM(tup, 1, PyInt_FromLong(self->y));
PyTuple_SET_ITEM(tup, 2, PyInt_FromLong(self->width));
PyTuple_SET_ITEM(tup, 3, PyInt_FromLong(self->height));
- wxPyEndBlockThreads();
+ wxPyEndBlockThreads(blocked);
return tup;
}
}
elif index == 3: self.height = val
else: raise IndexError
def __nonzero__(self): return self.Get() != (0,0,0,0)
- def __getinitargs__(self): return ()
- def __getstate__(self): return self.Get()
- def __setstate__(self, state): self.Set(*state)
+ __safe_for_unpickling__ = True
+ def __reduce__(self): return (wx.Rect, self.Get())
}
};
dest = reg1.GetBox();
if (dest != wxRect(0,0,0,0)) {
- wxPyBeginBlockThreads();
+ bool blocked = wxPyBeginBlockThreads();
wxRect* newRect = new wxRect(dest);
obj = wxPyConstructObject((void*)newRect, wxT("wxRect"), True);
- wxPyEndBlockThreads();
+ wxPyEndBlockThreads(blocked);
return obj;
}
Py_INCREF(Py_None);
"Get() -> (x,y)",
"Return x and y properties as a tuple.");
PyObject* Get() {
- wxPyBeginBlockThreads();
+ bool blocked = wxPyBeginBlockThreads();
PyObject* tup = PyTuple_New(2);
PyTuple_SET_ITEM(tup, 0, PyFloat_FromDouble(self->m_x));
PyTuple_SET_ITEM(tup, 1, PyFloat_FromDouble(self->m_y));
- wxPyEndBlockThreads();
+ wxPyEndBlockThreads(blocked);
return tup;
}
}
elif index == 1: self.y = val
else: raise IndexError
def __nonzero__(self): return self.Get() != (0.0, 0.0)
- def __getinitargs__(self): return ()
- def __getstate__(self): return self.Get()
- def __setstate__(self, state): self.Set(*state)
-
+ __safe_for_unpickling__ = True
+ def __reduce__(self): return (wx.Point2D, self.Get())
}
};