]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/contrib/ogl/oglcanvas.i
Removed deprecation warnings in OGL and Gizmos
[wxWidgets.git] / wxPython / contrib / ogl / oglcanvas.i
index c2005ce1bc7ed22fc94ddde1d12c2ec0224dd610..1845651b658ba27efa1d8c2cb88ffa2ef370fd14 100644 (file)
 %pragma(python) code = "import wx"
 
 //---------------------------------------------------------------------------
+%{
+    // Put some wx default wxChar* values into wxStrings.
+    DECLARE_DEF_STRING(ShapeCanvasNameStr);
+%}
+
 //---------------------------------------------------------------------------
 //---------------------------------------------------------------------------
 
@@ -66,8 +71,13 @@ public:
     bool GetQuickEditMode();
     bool GetSnapToGrid();
     void InsertShape(wxPyShape *shape);
+
+#ifdef wxUSE_PROLOGIO
     bool LoadFile(const wxString& filename);
+    bool SaveFile(const wxString& filename);
+#endif
 
+#ifdef wxUSE_PROLOGIO
     // **** Have to deal with wxExpr and wxExprDatabase first...
     //void OnDatabaseLoad(wxExprDatabase& database);
     //void OnDatabaseSave(wxExprDatabase& database);
@@ -75,16 +85,18 @@ public:
     //bool OnHeaderSave(wxExprDatabase& database, wxExpr& expr);
     //bool OnShapeLoad(wxExprDatabase& database, wxPyShape& shape, wxExpr& expr);
     //bool OnShapeSave(wxExprDatabase& database, wxPyShape& shape, wxExpr& expr);
+#endif
 
-
+#ifdef wxUSE_PROLOGIO
     void ReadContainerGeometry(wxExprDatabase& database);
     void ReadLines(wxExprDatabase& database);
     void ReadNodes(wxExprDatabase& database);
+#endif
+
     void RecentreAll(wxDC& dc);
     void Redraw(wxDC& dc);
     void RemoveAllShapes();
     void RemoveShape(wxPyShape* shape);
-    bool SaveFile(const wxString& filename);
     void SetCanvas(wxPyShapeCanvas* canvas);
     void SetGridSpacing(double spacing);
     void SetMouseTolerance(int tolerance);
@@ -114,7 +126,8 @@ public:
     wxPyShapeCanvas(wxWindow* parent = NULL, wxWindowID id = -1,
                     const wxPoint& pos = wxDefaultPosition,
                     const wxSize& size = wxDefaultSize,
-                    long style = wxBORDER);
+                    long style = wxBORDER,
+                    const wxString& name = wxPyShapeCanvasNameStr);
 
     void _setCallbackInfo(PyObject* self, PyObject* _class);
     %pragma(python) addtomethod = "__init__:self._setCallbackInfo(self, wxPyShapeCanvas)"