]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/src/ogl/canvas.cpp
added new files (after library split)
[wxWidgets.git] / contrib / src / ogl / canvas.cpp
index 51ed0498e7610bd3f0e27ec695cd74e9d9c1d7cd..ee49fdb4f5815dbbc9b103014faaca1c74fa3941 100644 (file)
 #include <wx/wx.h>
 #endif
 
 #include <wx/wx.h>
 #endif
 
-#include <wx/wxexpr.h>
+#include <wx/deprecated/wxexpr.h>
 
 #ifdef new
 #undef new
 #endif
 
 
 #ifdef new
 #undef new
 #endif
 
-#if wxUSE_IOSTREAMH
-#include <iostream.h>
-#else
-#include <iostream>
-#endif
-
 #include <ctype.h>
 #include <math.h>
 #include <stdlib.h>
 #include <ctype.h>
 #include <math.h>
 #include <stdlib.h>
@@ -68,9 +62,15 @@ BEGIN_EVENT_TABLE(wxShapeCanvas, wxScrolledWindow)
     EVT_MOUSE_EVENTS(wxShapeCanvas::OnMouseEvent)
 END_EVENT_TABLE()
 
     EVT_MOUSE_EVENTS(wxShapeCanvas::OnMouseEvent)
 END_EVENT_TABLE()
 
+const wxChar* wxShapeCanvasNameStr = wxT("shapeCanvas");
+
 // Object canvas
 // Object canvas
-wxShapeCanvas::wxShapeCanvas(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style):
-  wxScrolledWindow(parent, id, pos, size, style)
+wxShapeCanvas::wxShapeCanvas(wxWindow *parent, wxWindowID id,
+                             const wxPoint& pos,
+                             const wxSize& size,
+                             long style,
+                             const wxString& name):
+  wxScrolledWindow(parent, id, pos, size, style, name)
 {
   m_shapeDiagram = NULL;
   m_dragState = NoDragging;
 {
   m_shapeDiagram = NULL;
   m_dragState = NoDragging;
@@ -397,10 +397,10 @@ wxShape *wxShapeCanvas::FindShape(double x, double y, int *attachment, wxClassIn
   //     the other objects
   // (b) to find the control points FIRST if they exist
 
   //     the other objects
   // (b) to find the control points FIRST if they exist
 
-  wxNode *current = GetDiagram()->GetShapeList()->Last();
+  wxNode *current = GetDiagram()->GetShapeList()->GetLast();
   while (current)
   {
   while (current)
   {
-    wxShape *object = (wxShape *)current->Data();
+    wxShape *object = (wxShape *)current->GetData();
 
     double dist;
     int temp_attachment;
 
     double dist;
     int temp_attachment;
@@ -430,13 +430,13 @@ wxShape *wxShapeCanvas::FindShape(double x, double y, int *attachment, wxClassIn
       }
     }
     if (current)
       }
     }
     if (current)
-      current = current->Previous();
+      current = current->GetPrevious();
   }
 
   }
 
-  current = GetDiagram()->GetShapeList()->Last();
+  current = GetDiagram()->GetShapeList()->GetLast();
   while (current)
   {
   while (current)
   {
-    wxShape *object = (wxShape *)current->Data();
+    wxShape *object = (wxShape *)current->GetData();
     double dist;
     int temp_attachment;
 
     double dist;
     int temp_attachment;
 
@@ -461,7 +461,7 @@ wxShape *wxShapeCanvas::FindShape(double x, double y, int *attachment, wxClassIn
       }
     }
     if (current)
       }
     }
     if (current)
-      current = current->Previous();
+      current = current->GetPrevious();
   }
 
   *attachment = nearest_attachment;
   }
 
   *attachment = nearest_attachment;