]> git.saurik.com Git - wxWidgets.git/commitdiff
some little fixes
authorRobin Dunn <robin@alldunn.com>
Wed, 21 Feb 2001 20:57:57 +0000 (20:57 +0000)
committerRobin Dunn <robin@alldunn.com>
Wed, 21 Feb 2001 20:57:57 +0000 (20:57 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9406 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/contrib/ogl/oglcanvas.cpp
wxPython/contrib/ogl/oglcanvas.i
wxPython/contrib/ogl/oglshapes2.i
wxPython/src/misc.i
wxPython/src/msw/misc.py

index 01e8e4f8e2fab366b42b181f62e63cadb171d410..cb4a4542e2ffd85d5f0e71e0a8150a1edbb592a3 100644 (file)
@@ -1119,20 +1119,16 @@ static PyObject *_wrap_wxDiagram_Snap(PyObject *self, PyObject *args, PyObject *
     PyObject * _resultobj;
     wxDiagram * _arg0;
     double * _arg1;
     PyObject * _resultobj;
     wxDiagram * _arg0;
     double * _arg1;
-    double  temp;
     double * _arg2;
     double * _arg2;
-    double  temp0;
     PyObject * _argo0 = 0;
     PyObject * _argo0 = 0;
-    char *_kwnames[] = { "self", NULL };
+    double  temp;
+    PyObject * _obj1 = 0;
+    double  temp0;
+    PyObject * _obj2 = 0;
+    char *_kwnames[] = { "self","INOUT","INOUT", NULL };
 
     self = self;
 
     self = self;
-{
-  _arg1 = &temp;
-}
-{
-  _arg2 = &temp0;
-}
-    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxDiagram_Snap",_kwnames,&_argo0)) 
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxDiagram_Snap",_kwnames,&_argo0,&_obj1,&_obj2)) 
         return NULL;
     if (_argo0) {
         if (_argo0 == Py_None) { _arg0 = NULL; }
         return NULL;
     if (_argo0) {
         if (_argo0 == Py_None) { _arg0 = NULL; }
@@ -1141,6 +1137,14 @@ static PyObject *_wrap_wxDiagram_Snap(PyObject *self, PyObject *args, PyObject *
         return NULL;
         }
     }
         return NULL;
         }
     }
+{
+  temp = PyFloat_AsDouble(_obj1);
+  _arg1 = &temp;
+}
+{
+  temp0 = PyFloat_AsDouble(_obj2);
+  _arg2 = &temp0;
+}
 {
     wxPy_BEGIN_ALLOW_THREADS;
         wxDiagram_Snap(_arg0,_arg1,_arg2);
 {
     wxPy_BEGIN_ALLOW_THREADS;
         wxDiagram_Snap(_arg0,_arg1,_arg2);
@@ -1896,20 +1900,16 @@ static PyObject *_wrap_wxPyShapeCanvas_Snap(PyObject *self, PyObject *args, PyOb
     PyObject * _resultobj;
     wxPyShapeCanvas * _arg0;
     double * _arg1;
     PyObject * _resultobj;
     wxPyShapeCanvas * _arg0;
     double * _arg1;
-    double  temp;
     double * _arg2;
     double * _arg2;
-    double  temp0;
     PyObject * _argo0 = 0;
     PyObject * _argo0 = 0;
-    char *_kwnames[] = { "self", NULL };
+    double  temp;
+    PyObject * _obj1 = 0;
+    double  temp0;
+    PyObject * _obj2 = 0;
+    char *_kwnames[] = { "self","INOUT","INOUT", NULL };
 
     self = self;
 
     self = self;
-{
-  _arg1 = &temp;
-}
-{
-  _arg2 = &temp0;
-}
-    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"O:wxPyShapeCanvas_Snap",_kwnames,&_argo0)) 
+    if(!PyArg_ParseTupleAndKeywords(args,kwargs,"OOO:wxPyShapeCanvas_Snap",_kwnames,&_argo0,&_obj1,&_obj2)) 
         return NULL;
     if (_argo0) {
         if (_argo0 == Py_None) { _arg0 = NULL; }
         return NULL;
     if (_argo0) {
         if (_argo0 == Py_None) { _arg0 = NULL; }
@@ -1918,6 +1918,14 @@ static PyObject *_wrap_wxPyShapeCanvas_Snap(PyObject *self, PyObject *args, PyOb
         return NULL;
         }
     }
         return NULL;
         }
     }
+{
+  temp = PyFloat_AsDouble(_obj1);
+  _arg1 = &temp;
+}
+{
+  temp0 = PyFloat_AsDouble(_obj2);
+  _arg2 = &temp0;
+}
 {
     wxPy_BEGIN_ALLOW_THREADS;
         wxPyShapeCanvas_Snap(_arg0,_arg1,_arg2);
 {
     wxPy_BEGIN_ALLOW_THREADS;
         wxPyShapeCanvas_Snap(_arg0,_arg1,_arg2);
index 88ed4a4345034989dfb2cf53b17f4341bcb6ee74..036aaa83772b597ea80aeac6d81ad0acb269147b 100644 (file)
@@ -91,7 +91,7 @@ public:
     void SetQuickEditMode(bool mode);
     void SetSnapToGrid(bool snap);
     void ShowAll(bool show);
     void SetQuickEditMode(bool mode);
     void SetSnapToGrid(bool snap);
     void ShowAll(bool show);
-    void Snap(double *OUTPUT, double *OUTPUT);
+    void Snap(double *INOUT, double *INOUT);
 
 };
 
 
 };
 
@@ -147,7 +147,7 @@ public:
     void Redraw(wxDC& dc);
     void RemoveShape(wxPyShape *shape);
     void SetDiagram(wxDiagram *diagram);
     void Redraw(wxDC& dc);
     void RemoveShape(wxPyShape *shape);
     void SetDiagram(wxDiagram *diagram);
-    void Snap(double *OUTPUT, double *OUTPUT);
+    void Snap(double *INOUT, double *INOUT);
 
 };
 
 
 };
 
index 2b90a48590eac0575d2d47100908d8b19f80370a..a79ebca598c4a1957a1aa858454f275b1a9e1074 100644 (file)
@@ -207,6 +207,9 @@ public:
     bool IsSpline();
     void MakeLineControlPoints(int n);
 
     bool IsSpline();
     void MakeLineControlPoints(int n);
 
+    // TODO:
+    //   inline wxList *GetLineControlPoints() { return m_lineControlPoints; }
+
     void SetAttachmentFrom(int fromAttach);
     void SetAttachments(int fromAttach, int toAttach);
     void SetAttachmentTo(int toAttach);
     void SetAttachmentFrom(int fromAttach);
     void SetAttachments(int fromAttach, int toAttach);
     void SetAttachmentTo(int toAttach);
index 74b104185d011aa59466d7fab3f2d0b536dfb227..1378bba20fcf9deef86cda9e461959ab30a7164c 100644 (file)
@@ -64,7 +64,7 @@ public:
     %pragma(python) addtoclass = "
     def __str__(self):                   return str(self.asTuple())
     def __repr__(self):                  return str(self.asTuple())
     %pragma(python) addtoclass = "
     def __str__(self):                   return str(self.asTuple())
     def __repr__(self):                  return str(self.asTuple())
-    def __len__(self):                   return len(self.asTuple()
+    def __len__(self):                   return len(self.asTuple())
     def __getitem__(self, index):        return self.asTuple()[index]
     def __setitem__(self, index, val):
         if index == 0: self.width = val
     def __getitem__(self, index):        return self.asTuple()[index]
     def __setitem__(self, index, val):
         if index == 0: self.width = val
@@ -113,7 +113,7 @@ public:
     %pragma(python) addtoclass = "
     def __str__(self):                   return str(self.asTuple())
     def __repr__(self):                  return str(self.asTuple())
     %pragma(python) addtoclass = "
     def __str__(self):                   return str(self.asTuple())
     def __repr__(self):                  return str(self.asTuple())
-    def __len__(self):                   return len(self.asTuple()
+    def __len__(self):                   return len(self.asTuple())
     def __getitem__(self, index):        return self.asTuple()[index]
     def __setitem__(self, index, val):
         if index == 0: self.width = val
     def __getitem__(self, index):        return self.asTuple()[index]
     def __setitem__(self, index, val):
         if index == 0: self.width = val
@@ -160,7 +160,7 @@ public:
     %pragma(python) addtoclass = "
     def __str__(self):                   return str(self.asTuple())
     def __repr__(self):                  return str(self.asTuple())
     %pragma(python) addtoclass = "
     def __str__(self):                   return str(self.asTuple())
     def __repr__(self):                  return str(self.asTuple())
-    def __len__(self):                   return len(self.asTuple()
+    def __len__(self):                   return len(self.asTuple())
     def __getitem__(self, index):        return self.asTuple()[index]
     def __setitem__(self, index, val):
         if index == 0: self.x = val
     def __getitem__(self, index):        return self.asTuple()[index]
     def __setitem__(self, index, val):
         if index == 0: self.x = val
@@ -229,7 +229,7 @@ public:
     %pragma(python) addtoclass = "
     def __str__(self):                   return str(self.asTuple())
     def __repr__(self):                  return str(self.asTuple())
     %pragma(python) addtoclass = "
     def __str__(self):                   return str(self.asTuple())
     def __repr__(self):                  return str(self.asTuple())
-    def __len__(self):                   return len(self.asTuple()
+    def __len__(self):                   return len(self.asTuple())
     def __getitem__(self, index):        return self.asTuple()[index]
     def __setitem__(self, index, val):
         if index == 0: self.x = val
     def __getitem__(self, index):        return self.asTuple()[index]
     def __setitem__(self, index, val):
         if index == 0: self.x = val
index e2ad047487472f4eb0ea506ba62bbf3ac2912b4f..d6ad91e3fbe13764657645fcb994b9ac1b49ec27 100644 (file)
@@ -57,8 +57,16 @@ class wxSizePtr :
         raise AttributeError,name
     def __repr__(self):
         return "<C wxSize instance at %s>" % (self.this,)
         raise AttributeError,name
     def __repr__(self):
         return "<C wxSize instance at %s>" % (self.this,)
-    def __str__(self): return str(self.asTuple())
-    def __repr__(self): return str(self.asTuple())
+    
+    def __str__(self):                   return str(self.asTuple())
+    def __repr__(self):                  return str(self.asTuple())
+    def __len__(self):                   return len(self.asTuple())
+    def __getitem__(self, index):        return self.asTuple()[index]
+    def __setitem__(self, index, val):
+        if index == 0: self.width = val
+        elif index == 1: self.height = val
+        else: raise IndexError
+
 class wxSize(wxSizePtr):
     def __init__(self,*_args,**_kwargs):
         self.this = apply(miscc.new_wxSize,_args,_kwargs)
 class wxSize(wxSizePtr):
     def __init__(self,*_args,**_kwargs):
         self.this = apply(miscc.new_wxSize,_args,_kwargs)
@@ -107,8 +115,16 @@ class wxRealPointPtr :
         raise AttributeError,name
     def __repr__(self):
         return "<C wxRealPoint instance at %s>" % (self.this,)
         raise AttributeError,name
     def __repr__(self):
         return "<C wxRealPoint instance at %s>" % (self.this,)
-    def __str__(self): return str(self.asTuple())
-    def __repr__(self): return str(self.asTuple())
+    
+    def __str__(self):                   return str(self.asTuple())
+    def __repr__(self):                  return str(self.asTuple())
+    def __len__(self):                   return len(self.asTuple())
+    def __getitem__(self, index):        return self.asTuple()[index]
+    def __setitem__(self, index, val):
+        if index == 0: self.width = val
+        elif index == 1: self.height = val
+        else: raise IndexError
+
 class wxRealPoint(wxRealPointPtr):
     def __init__(self,*_args,**_kwargs):
         self.this = apply(miscc.new_wxRealPoint,_args,_kwargs)
 class wxRealPoint(wxRealPointPtr):
     def __init__(self,*_args,**_kwargs):
         self.this = apply(miscc.new_wxRealPoint,_args,_kwargs)
@@ -157,8 +173,16 @@ class wxPointPtr :
         raise AttributeError,name
     def __repr__(self):
         return "<C wxPoint instance at %s>" % (self.this,)
         raise AttributeError,name
     def __repr__(self):
         return "<C wxPoint instance at %s>" % (self.this,)
-    def __str__(self): return str(self.asTuple())
-    def __repr__(self): return str(self.asTuple())
+    
+    def __str__(self):                   return str(self.asTuple())
+    def __repr__(self):                  return str(self.asTuple())
+    def __len__(self):                   return len(self.asTuple())
+    def __getitem__(self, index):        return self.asTuple()[index]
+    def __setitem__(self, index, val):
+        if index == 0: self.x = val
+        elif index == 1: self.y = val
+        else: raise IndexError
+
 class wxPoint(wxPointPtr):
     def __init__(self,*_args,**_kwargs):
         self.this = apply(miscc.new_wxPoint,_args,_kwargs)
 class wxPoint(wxPointPtr):
     def __init__(self,*_args,**_kwargs):
         self.this = apply(miscc.new_wxPoint,_args,_kwargs)
@@ -272,9 +296,18 @@ class wxRectPtr :
         raise AttributeError,name
     def __repr__(self):
         return "<C wxRect instance at %s>" % (self.this,)
         raise AttributeError,name
     def __repr__(self):
         return "<C wxRect instance at %s>" % (self.this,)
-    def __str__(self): return str(self.asTuple())
-    def __repr__(self): return str(self.asTuple())
     
     
+    def __str__(self):                   return str(self.asTuple())
+    def __repr__(self):                  return str(self.asTuple())
+    def __len__(self):                   return len(self.asTuple())
+    def __getitem__(self, index):        return self.asTuple()[index]
+    def __setitem__(self, index, val):
+        if index == 0: self.x = val
+        elif index == 1: self.y = val
+        elif index == 2: self.width = val
+        elif index == 3: self.height = val
+        else: raise IndexError
+
     # override the __getattr__ made by SWIG
     def __getattr__(self, name):
         d = {
     # override the __getattr__ made by SWIG
     def __getattr__(self, name):
         d = {