X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ebe2507564906b16deba79c3b1cd0fc8526164ed..9a90985d5f2d7e0cd0e458bb3efba709a6166cbb:/contrib/src/ogl/canvas.cpp?ds=sidebyside diff --git a/contrib/src/ogl/canvas.cpp b/contrib/src/ogl/canvas.cpp index 51ed0498e7..ee49fdb4f5 100644 --- a/contrib/src/ogl/canvas.cpp +++ b/contrib/src/ogl/canvas.cpp @@ -24,18 +24,12 @@ #include #endif -#include +#include #ifdef new #undef new #endif -#if wxUSE_IOSTREAMH -#include -#else -#include -#endif - #include #include #include @@ -68,9 +62,15 @@ BEGIN_EVENT_TABLE(wxShapeCanvas, wxScrolledWindow) EVT_MOUSE_EVENTS(wxShapeCanvas::OnMouseEvent) END_EVENT_TABLE() +const wxChar* wxShapeCanvasNameStr = wxT("shapeCanvas"); + // 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; @@ -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 - wxNode *current = GetDiagram()->GetShapeList()->Last(); + wxNode *current = GetDiagram()->GetShapeList()->GetLast(); while (current) { - wxShape *object = (wxShape *)current->Data(); + wxShape *object = (wxShape *)current->GetData(); double dist; int temp_attachment; @@ -430,13 +430,13 @@ wxShape *wxShapeCanvas::FindShape(double x, double y, int *attachment, wxClassIn } } if (current) - current = current->Previous(); + current = current->GetPrevious(); } - current = GetDiagram()->GetShapeList()->Last(); + current = GetDiagram()->GetShapeList()->GetLast(); while (current) { - wxShape *object = (wxShape *)current->Data(); + wxShape *object = (wxShape *)current->GetData(); double dist; int temp_attachment; @@ -461,7 +461,7 @@ wxShape *wxShapeCanvas::FindShape(double x, double y, int *attachment, wxClassIn } } if (current) - current = current->Previous(); + current = current->GetPrevious(); } *attachment = nearest_attachment;