r475: no message
[ctsim.git] / src / views.cpp
index a8cb6e401156268a3b544818f249ddac715ab006..ba400e708a4cf336038b2d2bc07dcdbe3276b3fd 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (c) 1983-2001 Kevin Rosenberg
 **
-**  $Id: views.cpp,v 1.93 2001/01/30 10:58:13 kevin Exp $
+**  $Id: views.cpp,v 1.94 2001/01/31 01:01: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
@@ -226,7 +226,9 @@ EVT_MENU(IFMENU_IMAGE_SUBTRACT, ImageFileView::OnSubtract)
 EVT_MENU(IFMENU_IMAGE_MULTIPLY, ImageFileView::OnMultiply)
 EVT_MENU(IFMENU_IMAGE_DIVIDE, ImageFileView::OnDivide)
 EVT_MENU(IFMENU_IMAGE_SCALESIZE, ImageFileView::OnScaleSize)
+#if wxUSE_GLCANVAS
 EVT_MENU(IFMENU_IMAGE_CONVERT3D, ImageFileView::OnConvert3d)
+#endif
 #ifdef HAVE_FFT
 EVT_MENU(IFMENU_FILTER_FFT, ImageFileView::OnFFT)
 EVT_MENU(IFMENU_FILTER_IFFT, ImageFileView::OnIFFT)
@@ -862,7 +864,9 @@ ImageFileView::CreateChildFrame(wxDocument *doc, wxView *view)
   image_menu->Append (IFMENU_IMAGE_DIVIDE, "&Divide...");
   image_menu->AppendSeparator();
   image_menu->Append (IFMENU_IMAGE_SCALESIZE, "S&cale Size...");
+#if wxUSE_GLCANVAS
   image_menu->Append (IFMENU_IMAGE_CONVERT3D, "Convert &3-D\tCtrl-3");
+#endif
   
   m_pMenuAnalyze = new wxMenu;
   m_pMenuAnalyze->Append (IFMENU_PLOT_ROW, "Plot &Row");
@@ -911,8 +915,13 @@ ImageFileView::CreateChildFrame(wxDocument *doc, wxView *view)
   accelEntries[7].Set (wxACCEL_CTRL, static_cast<int>('A'), IFMENU_VIEW_SCALE_AUTO);
   accelEntries[8].Set (wxACCEL_CTRL, static_cast<int>('U'), IFMENU_VIEW_SCALE_FULL);
   accelEntries[9].Set (wxACCEL_CTRL, static_cast<int>('E'), IFMENU_VIEW_SCALE_MINMAX);
-  accelEntries[0].Set (wxACCEL_CTRL, static_cast<int>('3'), IFMENU_IMAGE_CONVERT3D);
+#if wxUSE_GLCANVAS
+  accelEntries[10].Set (wxACCEL_CTRL, static_cast<int>('3'), IFMENU_IMAGE_CONVERT3D);
   wxAcceleratorTable accelTable (11, accelEntries);
+#else
+  wxAcceleratorTable accelTable (10, accelEntries);
+#endif
+
   subframe->SetAcceleratorTable (accelTable);
   
   return subframe;
@@ -1108,6 +1117,7 @@ ImageFileView::OnScaleSize (wxCommandEvent& event)
   }
 }
 
+#if wxUSE_GLCANVAS
 void
 ImageFileView::OnConvert3d (wxCommandEvent& event)
 {
@@ -1118,7 +1128,8 @@ ImageFileView::OnConvert3d (wxCommandEvent& event)
   pGraph3d->getView()->getFrame()->SetClientSize (200, 200);
   pGraph3d->getView()->getFrame()->Show (true);
 }
-  
+#endif
+
 void
 ImageFileView::OnPlotRow (wxCommandEvent& event)
 {