r2103: Committing for 3.5.4
authorKevin M. Rosenberg <kevin@rosenberg.net>
Mon, 3 Jun 2002 16:57:22 +0000 (16:57 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Mon, 3 Jun 2002 16:57:22 +0000 (16:57 +0000)
ChangeLog
src/graph3dview.cpp
src/graph3dview.h
src/views.cpp

index b59e3e371ccd9267e36a3eb645d9fda0b5097df4..d80afd35da81355b1c91ee317688140eb5247150 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 Jun 1, 2002  Version 3.5.4
        * Print version number in log window with About command
        * Fix problem with captions not showing on some windows.
+       * Disable status bar on 3d views
        
 May 29, 2002  Version 3.5.3
        * Added support for g++ 3.04 compiler
index 1e9f0bb2eb9ba9226031f11c40fab331923fbfb8..a3343ab8a9523b5a6ce57d372c6b3be7399bb5ef 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (c) 1983-2001 Kevin Rosenberg
 **
-**  $Id: graph3dview.cpp,v 1.27 2002/06/03 03:58:07 kevin Exp $
+**  $Id: graph3dview.cpp,v 1.28 2002/06/03 16:57: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
@@ -65,7 +65,7 @@
 #include <sstream_subst>
 #endif
 
-void 
+inline void 
 Graph3dFileView::intensityToColor (double dIntensity, GLfloat* vecColor)
 {
   if (dIntensity < 0 || dIntensity > 1) {
@@ -147,11 +147,12 @@ 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_pFileMenu(NULL), m_pViewMenu(NULL), m_pStatusBar(NULL), m_pCanvas(NULL), 
+    m_dXRotate(-180), m_dYRotate(-210), m_dZRotate(195), 
     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)
+    m_bLighting(true), m_bColor(true), m_bUseVertexArrays(false),
+    m_bColorScaleMinSet(false), m_bColorScaleMaxSet(false),
+    m_pFrame(NULL)
 {}
 
 
@@ -167,8 +168,8 @@ Graph3dFileView::OnCreate (wxDocument *doc, long WXUNUSED(flags) )
   m_pFrame = CreateChildFrame(doc, this);
   m_pCanvas = CreateCanvas (m_pFrame);
 
-  SetFrame (m_pFrame);
   m_pFrame->SetClientSize (m_pCanvas->GetBestSize());
+  SetFrame (m_pFrame);
   m_pCanvas->SetClientSize (m_pCanvas->GetBestSize());
   m_pFrame->SetTitle("Graph3dFileView");
 
@@ -192,10 +193,9 @@ Graph3dFileView::CreateCanvas (wxFrame* parent)
 {
   Graph3dFileCanvas* pCanvas;
   
-  pCanvas = new Graph3dFileCanvas (this, parent, wxPoint(-1,-1), wxSize(-1,-1),
-                                  0);
+  pCanvas = new Graph3dFileCanvas (this, parent, wxPoint(-1,-1), wxSize(-1,-1), 0);
   
-  pCanvas->SetBackgroundColour(*wxBLACK);
+  pCanvas->SetBackgroundColour(*wxWHITE);
   pCanvas->Clear();
   
   return pCanvas;
@@ -359,7 +359,8 @@ Graph3dFileView::OnProperties (wxCommandEvent& event)
 {
   std::ostringstream os;
   *theApp->getLog() << ">>>>\n" << os.str().c_str() << "<<<<\n";
-  wxMessageDialog dialogMsg (getFrameForChild(), os.str().c_str(), "Imagefile Properties", wxOK | wxICON_INFORMATION);
+  wxMessageDialog dialogMsg (getFrameForChild(), os.str().c_str(), 
+                            "Imagefile Properties", wxOK | wxICON_INFORMATION);
   dialogMsg.ShowModal();
 }
 
@@ -368,7 +369,6 @@ Graph3dFileView::OnLighting (wxCommandEvent& event)
 {
   m_bLighting = ! m_bLighting;
   m_pViewMenu->Check (GRAPH3D_VIEW_LIGHTING, m_bLighting);
-  
   m_pCanvas->Refresh();
 }
 
@@ -403,13 +403,15 @@ Graph3dFileView::OnDraw (wxDC* dc)
 {
   if (m_pCanvas) {
     m_pCanvas->SetCurrent();
-
     Draw();
+    m_pCanvas->SwapBuffers();
+  }
+
+  if (m_pStatusBar) {
     std::ostringstream os;
-    os << "Xangle=" << m_dXRotate << ", Yangle=" << m_dYRotate << ", Zangle=" 
-       << m_dZRotate;
+    os << "Xangle=" << m_dXRotate << ", Yangle=" << m_dYRotate 
+       << ", Zangle=" << m_dZRotate;
     m_pStatusBar->SetStatusText (os.str().c_str());
-    m_pCanvas->SwapBuffers();
   }
 }
 
@@ -730,9 +732,13 @@ Graph3dFileView::CreateChildFrame (wxDocument *doc, wxView *view)
 #endif
   theApp->setIconForFrame (subframe);
   
+// status bar text not showing tested with enlightenment. disabling for now...
+#if 0 
   m_pStatusBar = new wxStatusBar (subframe, -1);
   subframe->SetStatusBar (m_pStatusBar);
-  
+  m_pStatusBar->Show(true);
+#endif
+
   m_pFileMenu = new wxMenu;
   
   m_pFileMenu->Append(MAINMENU_FILE_CREATE_PHANTOM, "Cr&eate Phantom...\tCtrl-P");
index bcd40ca3580a1201c32d77249a37feda130826a9..ec53d03a469e81f5f7c8d987fff736362efc15d3 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (c) 1983-2001 Kevin Rosenberg
 **
-**  $Id: graph3dview.h,v 1.10 2002/06/02 19:01:58 kevin Exp $
+**  $Id: graph3dview.h,v 1.11 2002/06/03 16:57: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
@@ -49,15 +49,18 @@ private:
   wxMenu *m_pViewMenu;
   wxStatusBar* m_pStatusBar;
 
+  Graph3dFileCanvas* m_pCanvas;
   GLfloat m_dXRotate;
   GLfloat m_dYRotate;
   GLfloat m_dZRotate;
-  bool m_bUseVertexArrays;
   bool m_bDoubleBuffer;
   bool m_bSmooth;
-  bool m_bLighting;
   bool m_bWireframe;
+  bool m_bLighting;
   bool m_bColor;
+  bool m_bUseVertexArrays;
+  bool m_bColorScaleMinSet;
+  bool m_bColorScaleMaxSet;
   enum {
     DISPLAYLIST_COLOR = 1,
     DISPLAYLIST_NO_COLOR = 2,
@@ -67,8 +70,6 @@ private:
   double m_dGraphMax;
   double m_dColorScaleMin;
   double m_dColorScaleMax;
-  bool m_bColorScaleMinSet;
-  bool m_bColorScaleMaxSet;
 
   void Draw();
   void DrawSurface();
@@ -76,7 +77,6 @@ private:
   void InitMaterials();
   void InitGL();
 
-  Graph3dFileCanvas* m_pCanvas;
   Graph3dFileCanvas *CreateCanvas (wxFrame* parent);
 
 #if CTSIM_MDI
index 19b0c5632dc0126bc0dbfc9d3e77bcf0413929de..bd54f07afa54af3165a2182a55f1d306e2988614 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (c) 1983-2001 Kevin Rosenberg
 **
-**  $Id: views.cpp,v 1.159 2002/06/02 23:39:22 kevin Exp $
+**  $Id: views.cpp,v 1.160 2002/06/03 16:57: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
@@ -1019,8 +1019,8 @@ ImageFileView::CreateChildFrame(wxDocument *doc, wxView *view)
 #if wxUSE_GLCANVAS
   accelEntries[iEntry++].Set (wxACCEL_CTRL, static_cast<int>('3'), IFMENU_IMAGE_CONVERT3D);
 #endif
+
   wxAcceleratorTable accelTable (iEntry, accelEntries);
-  
   subframe->SetAcceleratorTable (accelTable);
   
   return subframe;