%{
bool wxGBPosition_helper(PyObject* source, wxGBPosition** obj)
{
+ if (source == Py_None) {
+ **obj = wxGBPosition(-1,-1);
+ return True;
+ }
return wxPyTwoIntItem_helper(source, obj, wxT("wxGBPosition"));
}
bool wxGBSpan_helper(PyObject* source, wxGBSpan** obj)
{
+ if (source == Py_None) {
+ **obj = wxGBSpan(-1,-1);
+ return True;
+ }
return wxPyTwoIntItem_helper(source, obj, wxT("wxGBSpan"));
}
int GetCol() const;
void SetRow(int row);
void SetCol(int col);
-
- %extend {
- bool __eq__(const wxGBPosition* other) { return other ? (*self == *other) : False; }
- bool __ne__(const wxGBPosition* other) { return other ? (*self != *other) : True; }
- }
+// %extend {
+// bool __eq__(const wxGBPosition* other) { return other ? (*self == *other) : False; }
+// bool __ne__(const wxGBPosition* other) { return other ? (*self != *other) : True; }
+// }
+
+ bool operator==(const wxGBPosition& other);
+ bool operator!=(const wxGBPosition& other);
+
%extend {
void Set(int row=0, int col=0) {
self->SetRow(row);
}
PyObject* Get() {
- wxPyBeginBlockThreads();
+ bool blocked = wxPyBeginBlockThreads();
PyObject* tup = PyTuple_New(2);
PyTuple_SET_ITEM(tup, 0, PyInt_FromLong(self->GetRow()));
PyTuple_SET_ITEM(tup, 1, PyInt_FromLong(self->GetCol()));
- wxPyEndBlockThreads();
+ wxPyEndBlockThreads(blocked);
return tup;
}
}
void SetRowspan(int rowspan);
void SetColspan(int colspan);
- %extend {
- bool __eq__(const wxGBSpan* other) { return other ? (*self == *other) : False; }
- bool __ne__(const wxGBSpan* other) { return other ? (*self != *other) : True; }
- }
+// %extend {
+// bool __eq__(const wxGBSpan* other) { return other ? (*self == *other) : False; }
+// bool __ne__(const wxGBSpan* other) { return other ? (*self != *other) : True; }
+// }
+ bool operator==(const wxGBSpan& other);
+ bool operator!=(const wxGBSpan& other);
+
%extend {
void Set(int rowspan=1, int colspan=1) {
}
PyObject* Get() {
- wxPyBeginBlockThreads();
+ bool blocked = wxPyBeginBlockThreads();
PyObject* tup = PyTuple_New(2);
PyTuple_SET_ITEM(tup, 0, PyInt_FromLong(self->GetRowspan()));
PyTuple_SET_ITEM(tup, 1, PyInt_FromLong(self->GetColspan()));
- wxPyEndBlockThreads();
+ wxPyEndBlockThreads(blocked);
return tup;
}
}
PyObject* userData = NULL ) {
wxPyUserData* data = NULL;
- wxPyBeginBlockThreads();
+ bool blocked = wxPyBeginBlockThreads();
wxPySizerItemInfo info = wxPySizerItemTypeHelper(item, True, False);
if ( userData && (info.window || info.sizer || info.gotSize) )
data = new wxPyUserData(userData);
- wxPyEndBlockThreads();
+ wxPyEndBlockThreads(blocked);
// Now call the real Add method if a valid item type was found
if ( info.window )