** This is part of the CTSim program
** Copyright (C) 1983-2000 Kevin Rosenberg
**
-** $Id: ctsim.h,v 1.1 2000/07/13 07:01:59 kevin Exp $
+** $Id: ctsim.h,v 1.8 2000/12/16 06:12: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
#ifndef __CTSIMH__
#define __CTSIMH__
-#include "wx/docview.h"
-
-class wxDocManager;
-class MainFrame;
-class CTSimApp: public wxApp
-{
-public:
- CTSimApp(void);
- bool OnInit(void);
- int OnExit(void);
- MainFrame* getMainFrame(void) const
- { return m_pFrame; }
-
-protected:
- wxDocManager* m_docManager;
- MainFrame* m_pFrame;
-};
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+#ifdef HAVE_DMALLOC
+#include <dmalloc.h>
+#endif
-DECLARE_APP(CTSimApp)
+class wxMenu;
+class wxDocument;
+#include "wx/docview.h"\r
-// Define a new frame
+// Define a new frame for main window
class MainFrame: public wxDocParentFrame
{
DECLARE_CLASS(MainFrame)
+private:
+ wxTextCtrl* m_pLog;
+ wxMenu* m_pWindowMenu;
+
+ enum { MAX_WINDOW_MENUITEMS = 20 };
+ wxMenuItem* m_apWindowMenuItems[MAX_WINDOW_MENUITEMS];
+ wxDocument* m_apWindowMenuData[MAX_WINDOW_MENUITEMS];
public:
MainFrame(wxDocManager *manager, wxFrame *frame, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, const long type);
void OnAbout (wxCommandEvent& event);
+ void OnHelpContents (wxCommandEvent& event);
+ void OnCreatePhantom (wxCommandEvent& event);
void OnExit (wxCommandEvent& event);
+ void OnUpdateUI (wxUpdateUIEvent& event);
+
+ wxTextCtrl* getLog()
+ { return m_pLog; }
+
+ void OnWindowMenu0 (wxCommandEvent& event);
+ void OnWindowMenu1 (wxCommandEvent& event);
+ void OnWindowMenu2 (wxCommandEvent& event);
+ void OnWindowMenu3 (wxCommandEvent& event);
+ void OnWindowMenu4 (wxCommandEvent& event);
+ void OnWindowMenu5 (wxCommandEvent& event);
+ void OnWindowMenu6 (wxCommandEvent& event);
+ void OnWindowMenu7 (wxCommandEvent& event);
+ void OnWindowMenu8 (wxCommandEvent& event);
+ void OnWindowMenu9 (wxCommandEvent& event);
+ void OnWindowMenu10 (wxCommandEvent& event);
+ void OnWindowMenu11 (wxCommandEvent& event);
+ void OnWindowMenu12 (wxCommandEvent& event);
+ void OnWindowMenu13 (wxCommandEvent& event);
+ void OnWindowMenu14 (wxCommandEvent& event);
+ void OnWindowMenu15 (wxCommandEvent& event);
+ void OnWindowMenu16 (wxCommandEvent& event);
+ void OnWindowMenu17 (wxCommandEvent& event);
+ void OnWindowMenu18 (wxCommandEvent& event);
+ void OnWindowMenu19 (wxCommandEvent& event);
+
+ void DoWindowMenu (int iMenuPosition, wxCommandEvent& event);
+
DECLARE_EVENT_TABLE()
};
-extern MainFrame *GetMainFrame(void);
+
+class wxDocManager;
+class CTSimApp: public wxApp
+{
+public:
+ CTSimApp();
+ bool OnInit();
+ int OnExit();
+ MainFrame* getMainFrame() const
+ { return m_pFrame; }
+ wxTextCtrl* getLog()
+ { return m_pFrame->getLog(); }
+ wxDocManager* getDocManager()
+ { return m_docManager; }
+
+ wxString getUntitledFilename();
+
+private:
+ wxDocManager* m_docManager;
+ MainFrame* m_pFrame;
+
+ void usage (const char* program);
+
+ static struct option ctsimOptions[];
+
+ enum { O_HELP, O_VERSION };
+};
+
+DECLARE_APP(CTSimApp)
+
+extern class CTSimApp* theApp;
enum {
MAINMENU_HELP_ABOUT = 500,
+ MAINMENU_HELP_CONTENTS,
+ MAINMENU_FILE_CREATE_PHANTOM,
MAINMENU_FILE_EXIT,
IFMENU_FILE_PROPERTIES,
PJMENU_FILE_PROPERTIES,
- PJMENU_FILE_RECONSTRUCT,
+ PHMMENU_FILE_PROPERTIES,
+ PJMENU_PROCESS_RECONSTRUCT,
+ IFMENU_VIEW_SCALE_AUTO,
+ IFMENU_VIEW_SCALE_MINMAX,
+ PHMMENU_PROCESS_RASTERIZE,
+ PHMMENU_PROCESS_PROJECTIONS,
+ MAINMENU_WINDOW_BASE,
};
#endif