From: Kevin M. Rosenberg Date: Sun, 2 Jun 2002 23:39:22 +0000 (+0000) Subject: r2101: Committing for 3.5.4 X-Git-Tag: debian-4.5.3-3~227 X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=commitdiff_plain;h=6563a3fc6cf0d419eb1a44794eed4df02b0c5420 r2101: Committing for 3.5.4 --- diff --git a/ChangeLog b/ChangeLog index 87c102d..b59e3e3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,6 @@ Jun 1, 2002 Version 3.5.4 * Print version number in log window with About command - * Work around problem with Enlightedment Window Manager - not showing captions on image and projection windows. + * Fix problem with captions not showing on some windows. May 29, 2002 Version 3.5.3 * Added support for g++ 3.04 compiler diff --git a/src/graph3dview.cpp b/src/graph3dview.cpp index 0349444..23a9086 100644 --- a/src/graph3dview.cpp +++ b/src/graph3dview.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (c) 1983-2001 Kevin Rosenberg ** -** $Id: graph3dview.cpp,v 1.25 2002/06/02 19:01:58 kevin Exp $ +** $Id: graph3dview.cpp,v 1.26 2002/06/02 23:39:22 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 @@ -147,20 +147,13 @@ EVT_MENU(GRAPH3D_VIEW_SCALE_FULL, Graph3dFileView::OnScaleFull) END_EVENT_TABLE() Graph3dFileView::Graph3dFileView () - : m_pFileMenu(NULL), m_pViewMenu(NULL), m_pCanvas(NULL), m_pFrame(NULL) -{ - m_bDoubleBuffer = true; - m_bSmooth = true; - m_bLighting = true; - m_bWireframe = false; - m_bLighting = true; - m_bColor = true; - m_dXRotate = -180; - m_dYRotate = -210; - m_dZRotate = -195; - m_bColorScaleMinSet = false; - m_bColorScaleMaxSet = false; -} + : m_pFileMenu(NULL), m_pViewMenu(NULL), m_pCanvas(NULL), m_pFrame(NULL), + m_bDoubleBuffer(true), m_bSmooth(true), m_bWireframe(false), + m_bLighting(true), m_bColor(true), m_dXRotate(-180), + m_dYRotate(-210), m_dZRotate(195), m_bColorScaleMinSet(false), + m_bColorScaleMaxSet(false) +{} + Graph3dFileView::~Graph3dFileView() { @@ -172,11 +165,13 @@ bool Graph3dFileView::OnCreate (wxDocument *doc, long WXUNUSED(flags) ) { m_pFrame = CreateChildFrame(doc, this); - - m_pFrame->SetTitle("Graph3dFileView"); m_pCanvas = CreateCanvas (m_pFrame); - - m_pFrame->Show (true); + + SetFrame (m_pFrame); + m_pFrame->SetClientSize (m_pCanvas->GetBestSize()); + m_pCanvas->SetClientSize (m_pCanvas->GetBestSize()); + m_pFrame->SetTitle("Graph3dFileView"); + m_pCanvas->SetCurrent(); InitGL(); @@ -196,10 +191,9 @@ Graph3dFileCanvas* Graph3dFileView::CreateCanvas (wxFrame* parent) { Graph3dFileCanvas* pCanvas; - int width, height; - parent->GetClientSize (&width, &height); - pCanvas = new Graph3dFileCanvas (this, parent, wxPoint(0, 0), wxSize(width,height), 0); + pCanvas = new Graph3dFileCanvas (this, parent, wxPoint(-1,-1), wxSize(-1,-1), + 0); pCanvas->SetBackgroundColour(*wxWHITE); pCanvas->Clear(); @@ -407,19 +401,16 @@ Graph3dFileView::OnSmooth (wxCommandEvent& event) void Graph3dFileView::OnDraw (wxDC* dc) { - if (! m_pCanvas) - return; - m_pCanvas->SetCurrent(); - -#ifndef __WXMOTIF__ - // if (! m_pCanvas->GetContext()) return; -#endif - - Draw(); - std::ostringstream os; - os << "Xangle=" << m_dXRotate << ", Yangle=" << m_dYRotate << ", Zangle=" << m_dZRotate; - m_pStatusBar->SetStatusText (os.str().c_str()); - m_pCanvas->SwapBuffers(); + if (m_pCanvas) { + m_pCanvas->SetCurrent(); + + Draw(); + std::ostringstream os; + os << "Xangle=" << m_dXRotate << ", Yangle=" << m_dYRotate << ", Zangle=" + << m_dZRotate; + m_pStatusBar->SetStatusText (os.str().c_str()); + m_pCanvas->SwapBuffers(); + } } @@ -733,9 +724,9 @@ wxDocChildFrame* Graph3dFileView::CreateChildFrame (wxDocument *doc, wxView *view) { #if CTSIM_MDI - wxDocMDIChildFrame* subframe = new wxDocMDIChildFrame (doc, view, theApp->getMainFrame(), -1, "Graph3dFile Frame", wxPoint(-1, -1), wxSize(0, 0), wxDEFAULT_FRAME_STYLE); + wxDocMDIChildFrame* subframe = new wxDocMDIChildFrame (doc, view, theApp->getMainFrame(), -1, "Graph3dFile Frame", wxPoint(-1,-1), wxSize(-1,-1), wxDEFAULT_FRAME_STYLE); #else - wxDocChildFrame* subframe = new wxDocChildFrame (doc, view, theApp->getMainFrame(), -1, "Graph3dFile Frame", wxPoint(-1, -1), wxSize(0, 0), wxDEFAULT_FRAME_STYLE); + wxDocChildFrame* subframe = new wxDocChildFrame (doc, view, theApp->getMainFrame(), -1, "Graph3dFile Frame", wxPoint(-1,-1), wxSize(-1,-1), wxDEFAULT_FRAME_STYLE); #endif theApp->setIconForFrame (subframe); diff --git a/src/views.cpp b/src/views.cpp index c0140b3..19b0c56 100644 --- a/src/views.cpp +++ b/src/views.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (c) 1983-2001 Kevin Rosenberg ** -** $Id: views.cpp,v 1.158 2002/06/02 19:01:58 kevin Exp $ +** $Id: views.cpp,v 1.159 2002/06/02 23:39:22 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 @@ -867,8 +867,8 @@ ImageFileView::OnImaginary (wxCommandEvent& event) ImageFileCanvas* ImageFileView::CreateCanvas (wxFrame* parent) { - ImageFileCanvas* pCanvas = new ImageFileCanvas (this, parent, wxPoint(0, 0), - wxSize(0,0), 0); + ImageFileCanvas* pCanvas = new ImageFileCanvas (this, parent, wxPoint(-1,-1), + wxSize(-1,-1), 0); pCanvas->SetBackgroundColour(*wxWHITE); pCanvas->Clear(); @@ -883,9 +883,9 @@ wxDocChildFrame* ImageFileView::CreateChildFrame(wxDocument *doc, wxView *view) { #if CTSIM_MDI - wxDocMDIChildFrame* subframe = new wxDocMDIChildFrame (doc, view, theApp->getMainFrame(), -1, "ImageFile Frame", wxPoint(10,10), wxSize(0, 0), wxDEFAULT_FRAME_STYLE); + wxDocMDIChildFrame* subframe = new wxDocMDIChildFrame (doc, view, theApp->getMainFrame(), -1, "ImageFile Frame", wxPoint(-1,-1), wxSize(-1,-1), wxDEFAULT_FRAME_STYLE); #else - wxDocChildFrame* subframe = new wxDocChildFrame (doc, view, theApp->getMainFrame(), -1, "ImageFile Frame", wxPoint(10, 10), wxSize(0, 0), wxDEFAULT_FRAME_STYLE); + wxDocChildFrame* subframe = new wxDocChildFrame (doc, view, theApp->getMainFrame(), -1, "ImageFile Frame", wxPoint(-1,-1), wxSize(-1,-1), wxDEFAULT_FRAME_STYLE); #endif theApp->setIconForFrame (subframe); @@ -1322,6 +1322,7 @@ ImageFileView::OnConvert3d (wxCommandEvent& event) { ImageFile& rIF = GetDocument()->getImageFile(); Graph3dFileDocument* pGraph3d = theApp->newGraph3dDoc(); + pGraph3d->getView()->getFrame()->Show (false); pGraph3d->setBadFileOpen(); pGraph3d->createFromImageFile (rIF); pGraph3d->UpdateAllViews(); @@ -2259,8 +2260,8 @@ PhantomFileView::OnRasterize (wxCommandEvent& event) PhantomCanvas* PhantomFileView::CreateCanvas (wxFrame *parent) { - PhantomCanvas* pCanvas = new PhantomCanvas (this, parent, wxPoint(0, 0), - wxSize(0,0), 0); + PhantomCanvas* pCanvas = new PhantomCanvas (this, parent, wxPoint(-1,-1), + wxSize(-1,-1), 0); pCanvas->SetBackgroundColour(*wxWHITE); pCanvas->Clear(); @@ -2275,9 +2276,9 @@ wxDocChildFrame* PhantomFileView::CreateChildFrame(wxDocument *doc, wxView *view) { #if CTSIM_MDI - wxDocMDIChildFrame *subframe = new wxDocMDIChildFrame (doc, view, theApp->getMainFrame(), -1, "Phantom Frame", wxPoint(10, 10), wxSize(0, 0), wxDEFAULT_FRAME_STYLE); + wxDocMDIChildFrame *subframe = new wxDocMDIChildFrame (doc, view, theApp->getMainFrame(), -1, "Phantom Frame", wxPoint(-1,-1), wxSize(-1,-1), wxDEFAULT_FRAME_STYLE); #else - wxDocChildFrame *subframe = new wxDocChildFrame (doc, view, theApp->getMainFrame(), -1, "Phantom Frame", wxPoint(10, 10), wxSize(0, 0), wxDEFAULT_FRAME_STYLE); + wxDocChildFrame *subframe = new wxDocChildFrame (doc, view, theApp->getMainFrame(), -1, "Phantom Frame", wxPoint(-1,-1), wxSize(-1,-1), wxDEFAULT_FRAME_STYLE); #endif theApp->setIconForFrame (subframe); @@ -2978,7 +2979,7 @@ ProjectionFileView::CreateCanvas (wxFrame *parent) int width, height; parent->GetClientSize(&width, &height); - pCanvas = new ProjectionFileCanvas (this, parent, wxPoint(0, 0), wxSize(width, height), 0); + pCanvas = new ProjectionFileCanvas (this, parent, wxPoint(-1,-1), wxSize(width, height), 0); pCanvas->SetScrollbars(20, 20, 50, 50); pCanvas->SetBackgroundColour(*wxWHITE); @@ -2995,9 +2996,9 @@ wxDocChildFrame* ProjectionFileView::CreateChildFrame(wxDocument *doc, wxView *view) { #ifdef CTSIM_MDI - wxDocMDIChildFrame *subframe = new wxDocMDIChildFrame (doc, view, theApp->getMainFrame(), -1, "Projection Frame", wxPoint(10, 10), wxSize(0, 0), wxDEFAULT_FRAME_STYLE); + wxDocMDIChildFrame *subframe = new wxDocMDIChildFrame (doc, view, theApp->getMainFrame(), -1, "Projection Frame", wxPoint(-1,-1), wxSize(-1,-1), wxDEFAULT_FRAME_STYLE); #else - wxDocChildFrame *subframe = new wxDocChildFrame (doc, view, theApp->getMainFrame(), -1, "Projection Frame", wxPoint(10, 10), wxSize(0, 0), wxDEFAULT_FRAME_STYLE); + wxDocChildFrame *subframe = new wxDocChildFrame (doc, view, theApp->getMainFrame(), -1, "Projection Frame", wxPoint(-1,-1), wxSize(-1,-1), wxDEFAULT_FRAME_STYLE); #endif theApp->setIconForFrame (subframe); @@ -3343,7 +3344,7 @@ PlotFileView::CreateCanvas (wxFrame* parent) int width, height; parent->GetClientSize(&width, &height); - pCanvas = new PlotFileCanvas (this, parent, wxPoint(0, 0), wxSize(width, height), 0); + pCanvas = new PlotFileCanvas (this, parent, wxPoint(-1,-1), wxSize(width, height), 0); pCanvas->SetBackgroundColour(*wxWHITE); pCanvas->Clear(); @@ -3359,9 +3360,9 @@ wxDocChildFrame* PlotFileView::CreateChildFrame(wxDocument *doc, wxView *view) { #ifdef CTSIM_MDI - wxDocMDIChildFrame *subframe = new wxDocMDIChildFrame (doc, view, theApp->getMainFrame(), -1, "Plot Frame", wxPoint(10, 10), wxSize(500, 300), wxDEFAULT_FRAME_STYLE); + wxDocMDIChildFrame *subframe = new wxDocMDIChildFrame (doc, view, theApp->getMainFrame(), -1, "Plot Frame", wxPoint(-1,-1), wxSize(500, 300), wxDEFAULT_FRAME_STYLE); #else - wxDocChildFrame *subframe = new wxDocChildFrame(doc, view, theApp->getMainFrame(), -1, "Plot Frame", wxPoint(10, 10), wxSize(500, 300), wxDEFAULT_FRAME_STYLE); + wxDocChildFrame *subframe = new wxDocChildFrame(doc, view, theApp->getMainFrame(), -1, "Plot Frame", wxPoint(-1,-1), wxSize(500, 300), wxDEFAULT_FRAME_STYLE); #endif theApp->setIconForFrame (subframe); @@ -3562,7 +3563,7 @@ bool TextFileView::OnCreate(wxDocument *doc, long WXUNUSED(flags) ) int width, height; m_pFrame->GetClientSize(&width, &height); m_pFrame->SetTitle("TextFile"); - m_pCanvas = new TextFileCanvas (this, m_pFrame, wxPoint(0, 0), wxSize(width, height), wxTE_MULTILINE | wxTE_READONLY); + m_pCanvas = new TextFileCanvas (this, m_pFrame, wxPoint(-1,-1), wxSize(width, height), wxTE_MULTILINE | wxTE_READONLY); m_pFrame->SetTitle("Log"); m_pFrame->Show (true); @@ -3610,7 +3611,7 @@ wxDocChildFrame* TextFileView::CreateChildFrame (wxDocument *doc, wxView *view) { #if CTSIM_MDI - wxDocMDIChildFrame* subframe = new wxDocMDIChildFrame (doc, view, theApp->getMainFrame(), -1, "TextFile Frame", wxPoint(-1, -1), wxSize(0,0), wxDEFAULT_FRAME_STYLE, "Log"); + wxDocMDIChildFrame* subframe = new wxDocMDIChildFrame (doc, view, theApp->getMainFrame(), -1, "TextFile Frame", wxPoint(-1, -1), wxSize(-1,-1), wxDEFAULT_FRAME_STYLE, "Log"); #else wxDocChildFrame* subframe = new wxDocChildFrame (doc, view, theApp->getMainFrame(), -1, "TextFile Frame", wxPoint(-1, -1), wxSize(300, 150), wxDEFAULT_FRAME_STYLE, "Log"); #endif