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.13 2000/12/25 21:54:26 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
115 bool getSetModifyNewDocs() const
\r
119 wxDocManager* m_docManager;
122 void usage (const char* program);
124 static struct option ctsimOptions[];
126 enum { O_HELP, O_VERSION };
129 DECLARE_APP(CTSimApp)
131 extern class CTSimApp* theApp;
135 MAINMENU_HELP_ABOUT = 500,
136 MAINMENU_HELP_CONTENTS,
137 MAINMENU_FILE_CREATE_PHANTOM,
139 IFMENU_FILE_PROPERTIES,
140 PJMENU_FILE_PROPERTIES,
141 PHMMENU_FILE_PROPERTIES,
142 PJMENU_PROCESS_RECONSTRUCT,
\r
145 IFMENU_VIEW_SCALE_AUTO,
146 IFMENU_VIEW_SCALE_MINMAX,
\r
147 IFMENU_COMPARE_IMAGES,
\r
148 IFMENU_COMPARE_ROW,
\r
149 IFMENU_COMPARE_COL,
\r
150 PHMMENU_PROCESS_RASTERIZE,
151 PHMMENU_PROCESS_PROJECTIONS,
\r
152 PLOTMENU_VIEW_SCALE_MINMAX,
\r
153 PLOTMENU_VIEW_SCALE_AUTO,
154 MAINMENU_WINDOW_BASE,