#include <wx/wx.h>
#endif
-#include <wx/wxexpr.h>
+#if wxUSE_PROLOGIO
+#include <wx/deprecated/wxexpr.h>
+#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 <wx/ogl/basic.h>
-#include <wx/ogl/basicp.h>
-#include <wx/ogl/canvas.h>
-#include <wx/ogl/ogldiag.h>
-#include <wx/ogl/misc.h>
-#include <wx/ogl/lines.h>
-#include <wx/ogl/composit.h>
+#include "wx/ogl/ogl.h"
#define CONTROL_POINT_SIZE 6
#define CONTROL_POINT_ENDPOINT_FROM 5
#define CONTROL_POINT_LINE 6
-extern wxCursor *g_oglBullseyeCursor;
-
IMPLEMENT_DYNAMIC_CLASS(wxShapeCanvas, wxScrolledWindow)
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;
PrepareDC(dc);
+ dc.SetBackground(wxBrush(GetBackgroundColour(), wxSOLID));
dc.Clear();
- if (GetDiagram())
- GetDiagram()->Redraw(dc);
+ if (GetDiagram())
+ GetDiagram()->Redraw(dc);
}
void wxShapeCanvas::OnMouseEvent(wxMouseEvent& event)
// 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;
}
}
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;
}
}
if (current)
- current = current->Previous();
+ current = current->GetPrevious();
}
*attachment = nearest_attachment;