X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dec9fa491d282a94c122c74f69e835682a28d72d..9d3734c8997cf1eb5e04bf3ae930f8f191b09705:/wxPython/contrib/ogl/_oglbasic.i diff --git a/wxPython/contrib/ogl/_oglbasic.i b/wxPython/contrib/ogl/_oglbasic.i index 334ef52605..77b308fbe2 100644 --- a/wxPython/contrib/ogl/_oglbasic.i +++ b/wxPython/contrib/ogl/_oglbasic.i @@ -42,7 +42,7 @@ public: int GetFormatMode(); wxString GetName(); wxString GetColour(); - wxColour *GetActualColourObject(); + wxColour GetActualColourObject(); wxList& GetFormattedText(); wxString GetPenColour(); int GetPenStyle(); @@ -56,6 +56,22 @@ public: }; +//--------------------------------------------------------------------------- + +/* + * User-defined attachment point + */ + +class wxAttachmentPoint: public wxObject +{ +public: + wxAttachmentPoint(int id=0, double x=0.0, double y=0.0); + int m_id; // Identifier + double m_x; // x offset from centre of object + double m_y; // y offset from centre of object +}; + + //--------------------------------------------------------------------------- %{ @@ -65,7 +81,7 @@ public: class wxPyShapeEvtHandler : public wxObject { public: - %addtofunc wxPyShapeEvtHandler "self._setOORandCallbackInfo(PyShapeEvtHandler)" + %pythonAppend wxPyShapeEvtHandler "self._setOORandCallbackInfo(PyShapeEvtHandler)" wxPyShapeEvtHandler(wxPyShapeEvtHandler *prev = NULL, wxPyShape *shape = NULL); @@ -129,7 +145,7 @@ public: class wxPyShape : public wxPyShapeEvtHandler { public: - %addtofunc wxPyShape "self._setOORandCallbackInfo(PyShapeEvtHandler)" + %pythonAppend wxPyShape "self._setOORandCallbackInfo(PyShapeEvtHandler)" wxPyShape(wxPyShapeCanvas *can = NULL); @@ -294,6 +310,14 @@ public: int nth = 0, int no_arcs = 1, wxPyLineShape *line = NULL); int GetNumberOfAttachments(); bool AttachmentIsValid(int attachment); + + %extend { + PyObject* GetAttachments() { + wxList& list = self->GetAttachments(); + return wxPy_ConvertList(&list); + } + } + bool GetAttachmentPositionEdge(int attachment, double *OUTPUT, double *OUTPUT, int nth = 0, int no_arcs = 1, wxPyLineShape *line = NULL); wxRealPoint CalcSimpleAttachment(const wxRealPoint& pt1, const wxRealPoint& pt2, @@ -336,6 +360,7 @@ public: void CopyWithHandler(wxPyShape& copy); void Rotate(double x, double y, double theta); double GetRotation(); + void SetRotation(double rotation); void ClearAttachments(); void Recentre(wxDC& dc); void ClearPointList(wxList& list);