X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dd9f7fea29e3f8bb61861f52984b7943512346ac..dcc1aa238271267e92069d834781ee8fd15007bd:/wxPython/contrib/ogl/_oglshapes2.i diff --git a/wxPython/contrib/ogl/_oglshapes2.i b/wxPython/contrib/ogl/_oglshapes2.i index febeead238..cdbb5de507 100644 --- a/wxPython/contrib/ogl/_oglshapes2.i +++ b/wxPython/contrib/ogl/_oglshapes2.i @@ -22,7 +22,7 @@ class wxPyEllipseShape : public wxPyShape { public: - %addtofunc wxPyEllipseShape "self._setOORandCallbackInfo(PyEllipseShape)" + %pythonAppend wxPyEllipseShape "self._setOORandCallbackInfo(PyEllipseShape)" wxPyEllipseShape(double width = 0.0, double height = 0.0); @@ -66,7 +66,7 @@ public: class wxPyCircleShape : public wxPyEllipseShape { public: - %addtofunc wxPyCircleShape "self._setOORandCallbackInfo(PyCircleShape)" + %pythonAppend wxPyCircleShape "self._setOORandCallbackInfo(PyCircleShape)" wxPyCircleShape(double width = 0.0); @@ -141,7 +141,7 @@ public: class wxPyLineShape : public wxPyShape { public: - %addtofunc wxPyLineShape "self._setOORandCallbackInfo(PyLineShape)" + %pythonAppend wxPyLineShape "self._setOORandCallbackInfo(PyLineShape)" wxPyLineShape(); @@ -209,6 +209,13 @@ public: void Unlink(); + void SetAlignmentOrientation(bool isEnd, bool isHoriz); + void SetAlignmentType(bool isEnd, int alignType); + bool GetAlignmentOrientation(bool isEnd); + int GetAlignmentType(bool isEnd); + int GetAlignmentStart() const; + int GetAlignmentEnd() const; + void base_OnDraw(wxDC& dc); void base_OnDrawContents(wxDC& dc); void base_OnDrawBranches(wxDC& dc, bool erase = FALSE); @@ -247,7 +254,7 @@ public: class wxPyPolygonShape : public wxPyShape { public: - %addtofunc wxPyPolygonShape "self._setOORandCallbackInfo(PyPolygonShape)" + %pythonAppend wxPyPolygonShape "self._setOORandCallbackInfo(PyPolygonShape)" wxPyPolygonShape(); @@ -280,7 +287,7 @@ public: wxObject* wxObj; wxNode* node = list->GetFirst(); - wxPyBeginBlockThreads(); + bool blocked = wxPyBeginBlockThreads(); pyList = PyList_New(0); while (node) { wxObj = node->GetData(); @@ -288,11 +295,36 @@ public: PyList_Append(pyList, pyObj); node = node->GetNext(); } - wxPyEndBlockThreads(); + wxPyEndBlockThreads(blocked); return pyList; } + + PyObject* GetOriginalPoints() { + wxList* list = self->GetOriginalPoints(); + PyObject* pyList; + PyObject* pyObj; + wxObject* wxObj; + wxNode* node = list->GetFirst(); + + bool blocked = wxPyBeginBlockThreads(); + pyList = PyList_New(0); + while (node) { + wxObj = node->GetData(); + pyObj = wxPyConstructObject(wxObj, wxT("wxRealPoint"), 0); + PyList_Append(pyList, pyObj); + node = node->GetNext(); + } + wxPyEndBlockThreads(blocked); + return pyList; + } } + double GetOriginalWidth() const; + double GetOriginalHeight() const; + + void SetOriginalWidth(double w); + void SetOriginalHeight(double h); + void UpdateOriginalPoints(); void base_OnDraw(wxDC& dc); @@ -332,7 +364,7 @@ public: class wxPyTextShape : public wxPyRectangleShape { public: - %addtofunc wxPyTextShape "self._setOORandCallbackInfo(PyTextShape)" + %pythonAppend wxPyTextShape "self._setOORandCallbackInfo(PyTextShape)" wxPyTextShape(double width = 0.0, double height = 0.0);