X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=src%2Fctsim.cpp;h=2595e76681fe41ee18a6c340d8c4db30ffea0d7d;hb=57ae061f45865e1019c895d3351fcde281bd675d;hp=b8a1154e56a005e7e79820cb3b32375bef05a0f0;hpb=c6cda8844a491b71759e5dd5edba830d0b809cfd;p=ctsim.git diff --git a/src/ctsim.cpp b/src/ctsim.cpp index b8a1154..2595e76 100644 --- a/src/ctsim.cpp +++ b/src/ctsim.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2000 Kevin Rosenberg ** -** $Id: ctsim.cpp,v 1.26 2001/01/06 15:33:15 kevin Exp $ +** $Id: ctsim.cpp,v 1.29 2001/01/13 10:14:06 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 @@ -61,9 +61,7 @@ #endif #endif -static const char* rcsindent = "$Id: ctsim.cpp,v 1.26 2001/01/06 15:33:15 kevin Exp $"; - -class CTSimApp* theApp = NULL; +static const char* rcsindent = "$Id: ctsim.cpp,v 1.29 2001/01/13 10:14:06 kevin Exp $"; struct option CTSimApp::ctsimOptions[] = { @@ -94,7 +92,8 @@ CTSimApp::OnInit() #ifdef HAVE_SETPRIORITY setpriority (PRIO_PROCESS, 0, 15); // set to low scheduling priority #endif - + + g_bRunningWXWindows = true; // process options while (1) { int c = getopt_long (argc, argv, "", ctsimOptions, NULL); @@ -123,11 +122,8 @@ CTSimApp::OnInit() m_docManager = new wxDocManager; new wxDocTemplate (m_docManager, "ImageFile", "*.if", "", "if", "ImageFile doc", "ImageFile View", CLASSINFO(ImageFileDocument), CLASSINFO(ImageFileView)); - new wxDocTemplate (m_docManager, "ProjectionFile", "*.pj", "", "pj", "ProjectionFile doc", "ProjectionFile View", CLASSINFO(ProjectionFileDocument), CLASSINFO(ProjectionFileView)); - new wxDocTemplate (m_docManager, "PhantomFile", "*.phm", "", "phm", "Phantom doc", "Phantom View", CLASSINFO(PhantomDocument), CLASSINFO(PhantomView)); - new wxDocTemplate (m_docManager, "PlotFile", "*.plt", "", "plt", "Plot doc", "Plot View", CLASSINFO(PlotFileDocument), CLASSINFO(PlotFileView)); //// Create the main frame window @@ -142,10 +138,22 @@ CTSimApp::OnInit() wxString filename = argv [i - 1]; m_docManager->CreateDocument (filename, wxDOC_SILENT); } - + + setIconForFrame (m_pFrame); + return true; } +void +CTSimApp::setIconForFrame(wxFrame* pFrame) +{ +#if defined(__WXMSW__) + wxIcon iconApp (wxString("ICON_APP"), wxBITMAP_TYPE_ICO_RESOURCE); + if (iconApp.Ok()) + pFrame->SetIcon (iconApp); +#endif +} + void CTSimApp::usage(const char* program) {