X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=src%2Fctsim.h;h=c013a34df4a4b8f56eadbac2e0c195be7c58fd28;hb=c4af77faf7f216b936f0782e918634d34980c63f;hp=db4d7c354ff623614b1af03de06992d9275b6f88;hpb=1fd4f7cc977b9f1499716de10d15656bd50f4816;p=ctsim.git diff --git a/src/ctsim.h b/src/ctsim.h index db4d7c3..c013a34 100644 --- a/src/ctsim.h +++ b/src/ctsim.h @@ -9,7 +9,7 @@ ** 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.4 2000/07/23 01:49:03 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 @@ -29,9 +29,35 @@ #define __CTSIMH__ #include "wx/docview.h" +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif +#ifdef HAVE_DMALLOC +#include +#endif + +// Define a new frame +class MainFrame: public wxDocParentFrame +{ + DECLARE_CLASS(MainFrame) +private: + wxTextCtrl* m_pLog; + +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); + + wxTextCtrl* getLog() + { return m_pLog; } + + DECLARE_EVENT_TABLE() +}; class wxDocManager; -class MainFrame; class CTSimApp: public wxApp { public: @@ -40,37 +66,42 @@ public: int OnExit(void); MainFrame* getMainFrame(void) const { return m_pFrame; } + wxTextCtrl* getLog(void) + { return m_pFrame->getLog(); } + wxDocManager* getDocManager() + { return m_docManager; } -protected: + wxString getUntitledFilename(void); + +private: wxDocManager* m_docManager; MainFrame* m_pFrame; -}; - -DECLARE_APP(CTSimApp) -// Define a new frame -class MainFrame: public wxDocParentFrame -{ - DECLARE_CLASS(MainFrame) + void usage (const char* program); -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 OnExit (wxCommandEvent& event); + static struct option ctsimOptions[]; - DECLARE_EVENT_TABLE() + enum { O_HELP, O_VERSION }; }; -extern MainFrame *GetMainFrame(void); +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_WINDOW_AUTO, + IFMENU_VIEW_WINDOW_MINMAX, + PHMMENU_PROCESS_RASTERIZE, + PHMMENU_PROCESS_PROJECTIONS, }; #endif