X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dd9f7fea29e3f8bb61861f52984b7943512346ac..ad3fca675f77c2903cafd096bbda8baa2e7689ff:/wxPython/contrib/ogl/_oglbasic.i diff --git a/wxPython/contrib/ogl/_oglbasic.i b/wxPython/contrib/ogl/_oglbasic.i index 451b36b56a..7ceb86fac6 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(PyShape)" wxPyShape(wxPyShapeCanvas *can = NULL); @@ -264,7 +280,7 @@ public: void SetRegionName(const wxString& name, int regionId = 0); wxString GetRegionName(int regionId); int GetRegionId(const wxString& name); - void NameRegions(const wxString& parentName = ""); + void NameRegions(const wxString& parentName = wxPyEmptyString); // wxList& GetRegions(); %extend { @@ -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);