Fix GBSpan and GBPosition typemaps

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26219 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2004-03-15 22:47:25 +00:00
parent c7d6d88330
commit 09b77fb711

View File

@@ -40,11 +40,19 @@
%{ %{
bool wxGBPosition_helper(PyObject* source, wxGBPosition** obj) bool wxGBPosition_helper(PyObject* source, wxGBPosition** obj)
{ {
if (source == Py_None) {
**obj = wxGBPosition(-1,-1);
return True;
}
return wxPyTwoIntItem_helper(source, obj, wxT("wxGBPosition")); return wxPyTwoIntItem_helper(source, obj, wxT("wxGBPosition"));
} }
bool wxGBSpan_helper(PyObject* source, wxGBSpan** obj) bool wxGBSpan_helper(PyObject* source, wxGBSpan** obj)
{ {
if (source == Py_None) {
**obj = wxGBSpan(-1,-1);
return True;
}
return wxPyTwoIntItem_helper(source, obj, wxT("wxGBSpan")); return wxPyTwoIntItem_helper(source, obj, wxT("wxGBSpan"));
} }
@@ -65,10 +73,13 @@ public:
void SetRow(int row); void SetRow(int row);
void SetCol(int col); void SetCol(int col);
%extend { // %extend {
bool __eq__(const wxGBPosition* other) { return other ? (*self == *other) : False; } // bool __eq__(const wxGBPosition* other) { return other ? (*self == *other) : False; }
bool __ne__(const wxGBPosition* other) { return other ? (*self != *other) : True; } // bool __ne__(const wxGBPosition* other) { return other ? (*self != *other) : True; }
} // }
bool operator==(const wxGBPosition& other);
bool operator!=(const wxGBPosition& other);
%extend { %extend {
void Set(int row=0, int col=0) { void Set(int row=0, int col=0) {
@@ -119,10 +130,13 @@ public:
void SetRowspan(int rowspan); void SetRowspan(int rowspan);
void SetColspan(int colspan); void SetColspan(int colspan);
%extend { // %extend {
bool __eq__(const wxGBSpan* other) { return other ? (*self == *other) : False; } // bool __eq__(const wxGBSpan* other) { return other ? (*self == *other) : False; }
bool __ne__(const wxGBSpan* other) { return other ? (*self != *other) : True; } // bool __ne__(const wxGBSpan* other) { return other ? (*self != *other) : True; }
} // }
bool operator==(const wxGBSpan& other);
bool operator!=(const wxGBSpan& other);
%extend { %extend {
void Set(int rowspan=1, int colspan=1) { void Set(int rowspan=1, int colspan=1) {