X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3f1802b55dc7cdcd972e1cdce5e512b267ca3b05..75633395579c4154980ed7cf3042ba0f35936120:/contrib/src/ogl/canvas.cpp diff --git a/contrib/src/ogl/canvas.cpp b/contrib/src/ogl/canvas.cpp index e05066d402..55e87da514 100644 --- a/contrib/src/ogl/canvas.cpp +++ b/contrib/src/ogl/canvas.cpp @@ -14,7 +14,7 @@ #endif // For compilers that support precompilation, includes "wx.h". -#include +#include "wx/wxprec.h" #ifdef __BORLANDC__ #pragma hdrstop @@ -30,12 +30,6 @@ #undef new #endif -#if wxUSE_IOSTREAMH -#include -#else -#include -#endif - #include #include #include @@ -61,8 +55,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) @@ -70,9 +62,15 @@ BEGIN_EVENT_TABLE(wxShapeCanvas, wxScrolledWindow) EVT_MOUSE_EVENTS(wxShapeCanvas::OnMouseEvent) END_EVENT_TABLE() +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; @@ -94,10 +92,11 @@ void wxShapeCanvas::OnPaint(wxPaintEvent& event) PrepareDC(dc); + dc.SetBackground(wxBrush(GetBackgroundColour(), wxSOLID)); dc.Clear(); - if (GetDiagram()) - GetDiagram()->Redraw(dc); + if (GetDiagram()) + GetDiagram()->Redraw(dc); } void wxShapeCanvas::OnMouseEvent(wxMouseEvent& event)