X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3c69a2ec864e94f58243500ca6d41c980b0fa4fe..3eddc6bc00bcbdea23d52a8724f46ad56768f8b6:/wxPython/src/_gdicmn.i?ds=inline diff --git a/wxPython/src/_gdicmn.i b/wxPython/src/_gdicmn.i index 87b2b5c900..ac15dc4d98 100644 --- a/wxPython/src/_gdicmn.i +++ b/wxPython/src/_gdicmn.i @@ -1106,6 +1106,59 @@ public: }; +//--------------------------------------------------------------------------- + +class wxPosition +{ +public: + wxPosition(int row=0, int col=0); + ~wxPosition(); + + int GetRow() const; + int GetColumn() const; + int GetCol() const; + void SetRow(int row); + void SetColumn(int column); + void SetCol(int column); + + %extend { + DocStr(__eq__, "Test for equality of wx.Position objects.", ""); + bool __eq__(PyObject* other) { + wxPosition temp, *obj = &temp; + if ( other == Py_None ) return false; + if ( ! wxPosition_helper(other, &obj) ) { + PyErr_Clear(); + return false; + } + return self->operator==(*obj); + } + + + DocStr(__ne__, "Test for inequality of wx.Position objects.", ""); + bool __ne__(PyObject* other) { + wxPosition temp, *obj = &temp; + if ( other == Py_None ) return true; + if ( ! wxPosition_helper(other, &obj)) { + PyErr_Clear(); + return true; + } + return self->operator!=(*obj); + } + } + + %nokwargs operator+; + %nokwargs operator-; + wxPosition operator+(const wxPosition& p) const; + wxPosition operator-(const wxPosition& p) const; + wxPosition operator+(const wxSize& s) const; + wxPosition operator-(const wxSize& s) const; + + %property(row, GetRow, SetRow); + %property(col, GetCol, SetCol); +}; + + + //--------------------------------------------------------------------------- %immutable;