** This is part of the CTSim program
** Copyright (C) 1983-2000 Kevin Rosenberg
**
-** $Id: views.cpp,v 1.8 2000/07/22 15:45:33 kevin Exp $
+** $Id: views.cpp,v 1.9 2000/07/28 08:28:08 kevin Exp $
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License (version 2) as
// PhantomCanvas
PhantomCanvas::PhantomCanvas (PhantomView* v, wxFrame *frame, const wxPoint& pos, const wxSize& size, const long style)
- : wxPanel(frame, -1, pos, size, style)
+ : wxScrolledWindow(frame, -1, pos, size, style)
{
m_pView = v;
}
m_pView->OnDraw(& dc);
}
+
// PhantomView
IMPLEMENT_DYNAMIC_CLASS(PhantomView, wxView)
m_frame->Show(true);
Activate(true);
-
- return true;
-}
-void
-PhantomView::OnDraw (wxDC* dc)
-{
- // if (m_bitmap.Ok())
- // dc->DrawBitmap (m_bitmap, 0, 0, false);
+ return true;
}
return true;
}
+void
+PhantomView::OnDraw (wxDC* dc)
+{
+ int xsize, ysize;
+ m_canvas->GetClientSize (&xsize, &ysize);
+ SGPDriver driver (dc, "", xsize, ysize);
+ SGP sgp (driver);
+ const Phantom& rPhantom = GetDocument()->getPhantom();
+ rPhantom.draw (sgp);
+}
// ProjectionCanvas