X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=src%2Fctsim.cpp;h=d8b073725c9ccf1f2fae66a7ede2901ff4cfb22e;hp=a51a3658352166ac8bf507aaf7dcc24d923328be;hb=dc5eb7b285e647a99535740a99d73d468a856ba3;hpb=b68175983375191c7f302a140c8cab8151a3d628 diff --git a/src/ctsim.cpp b/src/ctsim.cpp index a51a365..d8b0737 100644 --- a/src/ctsim.cpp +++ b/src/ctsim.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (c) 1983-2001 Kevin Rosenberg ** -** $Id: ctsim.cpp,v 1.104 2001/09/24 15:16:41 kevin Exp $ +** $Id: ctsim.cpp,v 1.105 2002/05/03 00:40:30 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 @@ -70,7 +70,7 @@ #endif #endif -static const char* rcsindent = "$Id: ctsim.cpp,v 1.104 2001/09/24 15:16:41 kevin Exp $"; +static const char* rcsindent = "$Id: ctsim.cpp,v 1.105 2002/05/03 00:40:30 kevin Exp $"; struct option CTSimApp::ctsimOptions[] = { @@ -186,7 +186,7 @@ CTSimApp::OnInit() int xSize, ySize; m_pFrame->GetClientSize(&xSize, &ySize); int yLogSize = ySize / 4; - m_pLogDoc->getView()->getFrame()->SetSize (0, ySize - yLogSize, xSize, yLogSize); + m_pLogDoc->getView()->getFrame()->SetClientSize (0, ySize - yLogSize, xSize, yLogSize); m_pLogDoc->getView()->getFrame()->Show (true); } else #else @@ -524,8 +524,8 @@ MainFrame::OnSize (wxSizeEvent& event) int xSize, ySize; GetClientSize(&xSize, &ySize); int yLogSize = ySize / 4; - theApp->getLogDoc()->getView()->getFrame()->SetSize (0, ySize - yLogSize, xSize, yLogSize); - theApp->getLogDoc()->getView()->getFrame()->Show (true); + theApp->getLogDoc()->getView()->getFrame()->SetSize (0, ySize - yLogSize, xSize, yLogSize); + theApp->getLogDoc()->getView()->getFrame()->Show (true); } #endif @@ -624,15 +624,14 @@ MainFrame::OnNewImageFile (wxCommandEvent& event) return; } pImageDoc->setImageFile (pImageFile); - pImageDoc->UpdateAllViews (NULL); - if (ImageFileView* imageView = pImageDoc->getView()) { - imageView->OnUpdate (imageView, NULL); - imageView->getFrame()->SetFocus(); - imageView->getFrame()->Show(true); - } + // pImageDoc->UpdateAllViews (NULL); + // if (ImageFileView* imageView = pImageDoc->getView()) { + // imageView->OnUpdate (imageView, NULL); + // imageView->getFrame()->SetFocus(); + // imageView->getFrame()->Show(true); + // } if (theApp->getAskDeleteNewDocs()) pImageDoc->Modify (true); - } void @@ -1076,7 +1075,9 @@ CTSimApp::newProjectionDoc() if (pView) { wxFrame* pFrame = pView->getFrame(); if (pFrame) { - pFrame->SetSize (0,0); + // wxSize size; + // m_pFrame->GetClientSize (&size.x, &size.y); + // pFrame->SetClientSize (size.x / 2, size.y / 2); pFrame->Show (false); } } @@ -1093,14 +1094,6 @@ CTSimApp::newImageDoc() { ImageFileDocument* newDoc = dynamic_cast(m_pDocTemplImage->CreateDocument ("")); if (newDoc) { - ImageFileView* pView = newDoc->getView(); - if (pView) { - wxFrame* pFrame = pView->getFrame(); - if (pFrame) { - pFrame->SetSize (0,0); - pFrame->Show (false); - } - } newDoc->SetDocumentName (m_pDocTemplImage->GetDocumentName()); newDoc->SetDocumentTemplate (m_pDocTemplImage); newDoc->OnNewDocument(); @@ -1114,16 +1107,6 @@ CTSimApp::newPlotDoc() { PlotFileDocument* newDoc = dynamic_cast(m_pDocTemplPlot->CreateDocument ("")); if (newDoc) { - PlotFileView* pView = newDoc->getView(); - if (pView) { - wxFrame* pFrame = pView->getFrame(); - if (pFrame) { - wxSize size; - m_pFrame->GetClientSize (&size.x, &size.y); - pFrame->SetSize (size.x / 2, size.y / 2); - pFrame->Show (false); - } - } newDoc->SetDocumentName (m_pDocTemplPlot->GetDocumentName()); newDoc->SetDocumentTemplate (m_pDocTemplPlot); newDoc->OnNewDocument(); @@ -1141,16 +1124,6 @@ CTSimApp::newTextDoc() TextFileDocument* newDoc = dynamic_cast(m_pDocTemplText->CreateDocument ("")); if (newDoc) { - TextFileView* pView = newDoc->getView(); - if (pView) { - wxFrame* pFrame = pView->getFrame(); - if (pFrame) { - wxSize size; - m_pFrame->GetClientSize (&size.x, &size.y);; - pFrame->SetSize (size.x / 2, size.y / 2); - pFrame->Show (false); - } - } newDoc->SetDocumentName (m_pDocTemplText->GetDocumentName()); newDoc->SetDocumentTemplate (m_pDocTemplText); newDoc->OnNewDocument(); @@ -1165,12 +1138,6 @@ CTSimApp::newPhantomDoc() { PhantomFileDocument* newDoc = dynamic_cast(m_pDocTemplPhantom->CreateDocument ("")); if (newDoc) { - PhantomFileView* pView = newDoc->getView(); - if (pView) { - wxFrame* pFrame = pView->getFrame(); - if (pFrame) - pFrame->SetSize (0,0); - } newDoc->SetDocumentName (m_pDocTemplPhantom->GetDocumentName()); newDoc->SetDocumentTemplate (m_pDocTemplPhantom); newDoc->OnNewDocument(); @@ -1186,12 +1153,6 @@ CTSimApp::newGraph3dDoc() { Graph3dFileDocument* newDoc = dynamic_cast(m_pDocTemplGraph3d->CreateDocument ("")); if (newDoc) { - Graph3dFileView* pView = newDoc->getView(); - if (pView) { - wxFrame* pFrame = pView->getFrame(); - if (pFrame) - pFrame->SetSize (0,0); - } newDoc->SetDocumentName (m_pDocTemplGraph3d->GetDocumentName()); newDoc->SetDocumentTemplate (m_pDocTemplGraph3d); newDoc->OnNewDocument();