1 /*****************************************************************************
5 ** Purpose: Top-level routines for CTSim program
6 ** Programmer: Kevin Rosenberg
7 ** Date Started: July 2000
9 ** This is part of the CTSim program
10 ** Copyright (C) 1983-2000 Kevin Rosenberg
12 ** $Id: ctsim.h,v 1.6 2000/09/07 01:28:33 kevin Exp $
14 ** This program is free software; you can redistribute it and/or modify
15 ** it under the terms of the GNU General Public License (version 2) as
16 ** published by the Free Software Foundation.
18 ** This program is distributed in the hope that it will be useful,
19 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
20 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 ** GNU General Public License for more details.
23 ** You should have received a copy of the GNU General Public License
24 ** along with this program; if not, write to the Free Software
25 ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26 ******************************************************************************/
31 #include "wx/docview.h"
42 // Define a new frame for main window
43 class MainFrame: public wxDocParentFrame
45 DECLARE_CLASS(MainFrame)
48 wxMenu* m_pWindowMenu;
50 static const int MAX_WINDOW_MENUITEMS = 20;
51 wxMenuItem* m_apWindowMenuItems[MAX_WINDOW_MENUITEMS];
52 wxDocument* m_apWindowMenuData[MAX_WINDOW_MENUITEMS];
55 MainFrame(wxDocManager *manager, wxFrame *frame, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, const long type);
57 void OnAbout (wxCommandEvent& event);
58 void OnHelpContents (wxCommandEvent& event);
59 void OnCreatePhantom (wxCommandEvent& event);
60 void OnExit (wxCommandEvent& event);
62 void OnUpdateUI (wxUpdateUIEvent& event);
67 void OnWindowMenu0 (wxCommandEvent& event);
68 void OnWindowMenu1 (wxCommandEvent& event);
69 void OnWindowMenu2 (wxCommandEvent& event);
70 void OnWindowMenu3 (wxCommandEvent& event);
71 void OnWindowMenu4 (wxCommandEvent& event);
72 void OnWindowMenu5 (wxCommandEvent& event);
73 void OnWindowMenu6 (wxCommandEvent& event);
74 void OnWindowMenu7 (wxCommandEvent& event);
75 void OnWindowMenu8 (wxCommandEvent& event);
76 void OnWindowMenu9 (wxCommandEvent& event);
77 void OnWindowMenu10 (wxCommandEvent& event);
78 void OnWindowMenu11 (wxCommandEvent& event);
79 void OnWindowMenu12 (wxCommandEvent& event);
80 void OnWindowMenu13 (wxCommandEvent& event);
81 void OnWindowMenu14 (wxCommandEvent& event);
82 void OnWindowMenu15 (wxCommandEvent& event);
83 void OnWindowMenu16 (wxCommandEvent& event);
84 void OnWindowMenu17 (wxCommandEvent& event);
85 void OnWindowMenu18 (wxCommandEvent& event);
86 void OnWindowMenu19 (wxCommandEvent& event);
88 void DoWindowMenu (int iMenuPosition, wxCommandEvent& event);
95 class CTSimApp: public wxApp
101 MainFrame* getMainFrame() const
104 { return m_pFrame->getLog(); }
105 wxDocManager* getDocManager()
106 { return m_docManager; }
108 wxString getUntitledFilename();
111 wxDocManager* m_docManager;
114 void usage (const char* program);
116 static struct option ctsimOptions[];
118 enum { O_HELP, O_VERSION };
121 DECLARE_APP(CTSimApp)
123 extern class CTSimApp* theApp;
127 MAINMENU_HELP_ABOUT = 500,
128 MAINMENU_HELP_CONTENTS,
129 MAINMENU_FILE_CREATE_PHANTOM,
131 IFMENU_FILE_PROPERTIES,
132 PJMENU_FILE_PROPERTIES,
133 PHMMENU_FILE_PROPERTIES,
134 PJMENU_PROCESS_RECONSTRUCT,
135 IFMENU_VIEW_SCALE_AUTO,
136 IFMENU_VIEW_SCALE_MINMAX,
137 PHMMENU_PROCESS_RASTERIZE,
138 PHMMENU_PROCESS_PROJECTIONS,
139 MAINMENU_WINDOW_BASE,