X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=src%2Fviews.cpp;h=8ec1df2bff80bf1e17529210fd503e4bdf1e312b;hb=711cae0ee02e046370fdb4d6c6f440596ff71980;hp=536db90ca0cc6c0e88b401b27c68d13f220565df;hpb=c0880d4cd7e7d8da6fe67a28d27990c0279b9497;p=ctsim.git diff --git a/src/views.cpp b/src/views.cpp index 536db90..8ec1df2 100644 --- a/src/views.cpp +++ b/src/views.cpp @@ -9,7 +9,7 @@ ** 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 @@ -341,7 +341,7 @@ ImageFileView::OnClose (bool deleteWindow) // 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; } @@ -353,6 +353,7 @@ PhantomCanvas::OnDraw(wxDC& dc) m_pView->OnDraw(& dc); } + // PhantomView IMPLEMENT_DYNAMIC_CLASS(PhantomView, wxView) @@ -518,15 +519,8 @@ PhantomView::OnCreate(wxDocument *doc, long WXUNUSED(flags) ) 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; } @@ -560,6 +554,16 @@ PhantomView::OnClose (bool deleteWindow) 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