#define wxArrayDouble2PyList_helper(a) (wxPyGetCoreAPIPtr()->p_wxArrayDoublePyList_helper(a))
#define wxPoint2D_LIST_helper(a,b) (wxPyGetCoreAPIPtr()->p_wxPoint2D_LIST_helper(a, b))
#define wxRect2D_helper(a,b) (wxPyGetCoreAPIPtr()->p_wxRect2D_helper(a,b))
+#define wxPosition_helper(a,b) (wxPyGetCoreAPIPtr()->p_wxPosition_helper(a,b))
//----------------------------------------------------------------------
bool wxColour_helper(PyObject* source, wxColour** obj);
bool wxPoint2D_helper(PyObject* source, wxPoint2D** obj);
bool wxRect2D_helper(PyObject* source, wxRect2D** obj);
+bool wxPosition_helper(PyObject* source, wxPosition** obj);
bool wxPySimple_typecheck(PyObject* source, const wxChar* classname, int seqLen);
PyObject* (*p_wxArrayDoublePyList_helper)(const wxArrayDouble& arr);
wxPoint2D* (*p_wxPoint2D_LIST_helper)(PyObject* source, size_t* npoints);
bool (*p_wxRect2D_helper)(PyObject* source, wxRect2D** obj);
+ bool (*p_wxPosition_helper)(PyObject* source, wxPosition** obj);
};
// virtual int FilterEvent(wxEvent& event); // This one too????
// For catching Apple Events
- virtual void MacOpenFile(const wxString &fileName);
- virtual void MacPrintFile(const wxString &fileName);
+ virtual void MacOpenFile(const wxString& fileName);
+ virtual void MacOpenURL(const wxString& url);
+ virtual void MacPrintFile(const wxString& fileName);
virtual void MacNewFile();
virtual void MacReopenApp();
wxArrayDouble2PyList_helper,
wxPoint2D_LIST_helper,
wxRect2D_helper,
-
+ wxPosition_helper,
+
};
#endif
};
+//---------------------------------------------------------------------------
+
+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;