r600: *** empty log message ***
[ctsim.git] / src / graph3dview.cpp
index 71ae71b77e79471b421d4b49874278fed0344bbc..4295f4c9a3da128a61901d449082c83f4207a343 100644 (file)
@@ -9,7 +9,7 @@
 **  This is part of the CTSim program
 **  Copyright (c) 1983-2001 Kevin Rosenberg
 **
-**  $Id: graph3dview.cpp,v 1.12 2001/02/08 22:38:23 kevin Exp $
+**  $Id: graph3dview.cpp,v 1.16 2001/03/04 03:14:47 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
 #pragma interface
 #endif
 
-// For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
-#ifdef __BORLANDC__
-#pragma hdrstop
-#endif
-
 #ifndef WX_PRECOMP
 #include "wx/wx.h"
 #endif
@@ -172,7 +167,7 @@ EVT_MENU(GRAPH3D_VIEW_SCALE_FULL, Graph3dFileView::OnScaleFull)
 END_EVENT_TABLE()
 
 Graph3dFileView::Graph3dFileView ()
-: m_pFileMenu(NULL), m_pViewMenu(NULL)
+  : m_pFileMenu(NULL), m_pViewMenu(NULL), m_pCanvas(NULL), m_pFrame(NULL)
 {
   m_bDoubleBuffer = true;
   m_bSmooth = true;
@@ -197,7 +192,6 @@ bool
 Graph3dFileView::OnCreate (wxDocument *doc, long WXUNUSED(flags) )
 {
   m_pFrame = CreateChildFrame(doc, this);
-  (m_pFrame);
   
   int width, height;
   m_pFrame->GetClientSize (&width, &height);
@@ -772,7 +766,6 @@ Graph3dFileView::CreateChildFrame (wxDocument *doc, wxView *view)
   
   wxMenu *help_menu = new wxMenu;
   help_menu->Append(MAINMENU_HELP_CONTENTS, "&Contents\tF1");
-  help_menu->Append(MAINMENU_HELP_TOPICS, "&Topics\tCtrl-H");
   help_menu->Append(MAINMENU_HELP_ABOUT, "&About");
   
   wxMenuBar *menu_bar = new wxMenuBar;
@@ -784,23 +777,18 @@ Graph3dFileView::CreateChildFrame (wxDocument *doc, wxView *view)
   subframe->SetMenuBar(menu_bar);
   
   subframe->Centre(wxBOTH);
-  
-  wxAcceleratorEntry accelEntries[12];
-  accelEntries[0].Set (wxACCEL_CTRL, static_cast<int>('O'), wxID_OPEN);
-  accelEntries[1].Set (wxACCEL_CTRL, static_cast<int>('H'), MAINMENU_HELP_TOPICS);
-  accelEntries[2].Set (wxACCEL_CTRL, static_cast<int>('P'), MAINMENU_FILE_CREATE_PHANTOM);
-  accelEntries[3].Set (wxACCEL_CTRL, static_cast<int>('F'), MAINMENU_FILE_CREATE_FILTER);
-  accelEntries[4].Set (wxACCEL_NORMAL, WXK_F1, MAINMENU_HELP_CONTENTS);
-  accelEntries[5].Set (wxACCEL_CTRL, static_cast<int>('R'), GRAPH3D_VIEW_SURFACE);
-  accelEntries[6].Set (wxACCEL_CTRL, static_cast<int>('L'), GRAPH3D_VIEW_COLOR);
-  accelEntries[7].Set (wxACCEL_CTRL, static_cast<int>('G'), GRAPH3D_VIEW_LIGHTING);
-  accelEntries[8].Set (wxACCEL_CTRL, static_cast<int>('M'), GRAPH3D_VIEW_SMOOTH);
-  accelEntries[9].Set (wxACCEL_CTRL, static_cast<int>('E'), GRAPH3D_VIEW_SCALE_MINMAX);
-  accelEntries[10].Set (wxACCEL_CTRL, static_cast<int>('A'), GRAPH3D_VIEW_SCALE_AUTO);
-  accelEntries[11].Set (wxACCEL_CTRL, static_cast<int>('U'), GRAPH3D_VIEW_SCALE_FULL);
-  wxAcceleratorTable accelTable (12, accelEntries);
+
+  wxAcceleratorEntry accelEntries[7];
+  accelEntries[0].Set (wxACCEL_CTRL, static_cast<int>('R'), GRAPH3D_VIEW_SURFACE);
+  accelEntries[1].Set (wxACCEL_CTRL, static_cast<int>('L'), GRAPH3D_VIEW_COLOR);
+  accelEntries[2].Set (wxACCEL_CTRL, static_cast<int>('G'), GRAPH3D_VIEW_LIGHTING);
+  accelEntries[3].Set (wxACCEL_CTRL, static_cast<int>('M'), GRAPH3D_VIEW_SMOOTH);
+  accelEntries[4].Set (wxACCEL_CTRL, static_cast<int>('E'), GRAPH3D_VIEW_SCALE_MINMAX);
+  accelEntries[5].Set (wxACCEL_CTRL, static_cast<int>('A'), GRAPH3D_VIEW_SCALE_AUTO);
+  accelEntries[6].Set (wxACCEL_CTRL, static_cast<int>('U'), GRAPH3D_VIEW_SCALE_FULL);
+  wxAcceleratorTable accelTable (7, accelEntries);
   subframe->SetAcceleratorTable (accelTable);
-  
+
   return subframe;
 }