]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/contrib/ogl/_oglbasic.i
Corrected _setCallbackInfo code so GiveFeedback can work
[wxWidgets.git] / wxPython / contrib / ogl / _oglbasic.i
index 334ef5260579af16fdeeaa9e949948ef9dc469b0..77b308fbe278bf307fcf076110667896a4da0e0c 100644 (file)
@@ -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);