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.12 2000/12/22 04:18:00 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 ******************************************************************************/
40 class ImageFileDocument;
\r
43 #include "wx/docview.h"
\r
45 // Define a new frame for main window
46 class MainFrame: public wxDocParentFrame
48 DECLARE_CLASS(MainFrame)
51 wxMenu* m_pWindowMenu;
53 enum { MAX_WINDOW_MENUITEMS = 20 };
54 wxMenuItem* m_apWindowMenuItems[MAX_WINDOW_MENUITEMS];
55 wxDocument* m_apWindowMenuData[MAX_WINDOW_MENUITEMS];
58 MainFrame(wxDocManager *manager, wxFrame *frame, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, const long type);
60 void OnAbout (wxCommandEvent& event);
61 void OnHelpContents (wxCommandEvent& event);
62 void OnCreatePhantom (wxCommandEvent& event);
63 void OnExit (wxCommandEvent& event);
65 void OnUpdateUI (wxUpdateUIEvent& event);
70 void OnWindowMenu0 (wxCommandEvent& event);
71 void OnWindowMenu1 (wxCommandEvent& event);
72 void OnWindowMenu2 (wxCommandEvent& event);
73 void OnWindowMenu3 (wxCommandEvent& event);
74 void OnWindowMenu4 (wxCommandEvent& event);
75 void OnWindowMenu5 (wxCommandEvent& event);
76 void OnWindowMenu6 (wxCommandEvent& event);
77 void OnWindowMenu7 (wxCommandEvent& event);
78 void OnWindowMenu8 (wxCommandEvent& event);
79 void OnWindowMenu9 (wxCommandEvent& event);
80 void OnWindowMenu10 (wxCommandEvent& event);
81 void OnWindowMenu11 (wxCommandEvent& event);
82 void OnWindowMenu12 (wxCommandEvent& event);
83 void OnWindowMenu13 (wxCommandEvent& event);
84 void OnWindowMenu14 (wxCommandEvent& event);
85 void OnWindowMenu15 (wxCommandEvent& event);
86 void OnWindowMenu16 (wxCommandEvent& event);
87 void OnWindowMenu17 (wxCommandEvent& event);
88 void OnWindowMenu18 (wxCommandEvent& event);
89 void OnWindowMenu19 (wxCommandEvent& event);
91 void DoWindowMenu (int iMenuPosition, wxCommandEvent& event);
98 class CTSimApp: public wxApp
104 MainFrame* getMainFrame() const
107 { return m_pFrame->getLog(); }
108 wxDocManager* getDocManager()
109 { return m_docManager; }
111 wxString getUntitledFilename();
113 void getCompatibleImages (const ImageFileDocument* pIFDoc, std::vector<ImageFileDocument*>& vecIF);
\r
116 wxDocManager* m_docManager;
119 void usage (const char* program);
121 static struct option ctsimOptions[];
123 enum { O_HELP, O_VERSION };
126 DECLARE_APP(CTSimApp)
128 extern class CTSimApp* theApp;
132 MAINMENU_HELP_ABOUT = 500,
133 MAINMENU_HELP_CONTENTS,
134 MAINMENU_FILE_CREATE_PHANTOM,
136 IFMENU_FILE_PROPERTIES,
137 PJMENU_FILE_PROPERTIES,
138 PHMMENU_FILE_PROPERTIES,
139 PJMENU_PROCESS_RECONSTRUCT,
\r
142 IFMENU_VIEW_SCALE_AUTO,
143 IFMENU_VIEW_SCALE_MINMAX,
\r
144 IFMENU_COMPARE_IMAGES,
\r
145 IFMENU_COMPARE_ROW,
\r
146 IFMENU_COMPARE_COL,
\r
147 PHMMENU_PROCESS_RASTERIZE,
148 PHMMENU_PROCESS_PROJECTIONS,
\r
149 PLOTMENU_VIEW_SCALE_MINMAX,
\r
150 PLOTMENU_VIEW_SCALE_AUTO,
151 MAINMENU_WINDOW_BASE,