** This is part of the CTSim program
** Copyright (C) 1983-2000 Kevin Rosenberg
**
-** $Id: views.cpp,v 1.60 2001/01/12 21:53:27 kevin Exp $
+** $Id: views.cpp,v 1.66 2001/01/18 21:30:22 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
ImageFileView::CreateChildFrame(wxDocument *doc, wxView *view)
{
#if CTSIM_MDI
- wxMDIChildFrame *subframe = new wxMDIChildFrame(theApp->getMainFrame(), -1, "ImageFile Frame", wxPoint(-1, -1), wxSize(0, 0), wxDEFAULT_FRAME_STYLE);
+ wxMDIChildFrame *subframe = new wxMDIChildFrame (theApp->getMainFrame(), -1, "ImageFile Frame", wxPoint(-1, -1), wxSize(0, 0), wxDEFAULT_FRAME_STYLE);
#else
- wxDocChildFrame *subframe = new wxDocChildFrame(doc, view, theApp->getMainFrame(), -1, "ImageFile Frame", wxPoint(-1, -1), wxSize(0, 0), wxDEFAULT_FRAME_STYLE);
+ wxDocChildFrame *subframe = new wxDocChildFrame (doc, view, theApp->getMainFrame(), -1, "ImageFile Frame", wxPoint(-1, -1), wxSize(0, 0), wxDEFAULT_FRAME_STYLE);
#endif
-
+ theApp->setIconForFrame (subframe);
+
wxMenu *file_menu = new wxMenu;
- file_menu->Append(MAINMENU_FILE_CREATE_PHANTOM, "Cr&eate Phantom...");
- file_menu->Append(MAINMENU_FILE_CREATE_FILTER, "Create &Filter...");
- file_menu->Append(wxID_OPEN, "&Open...");
- file_menu->Append(wxID_SAVE, "&Save");
+ file_menu->Append(MAINMENU_FILE_CREATE_PHANTOM, "Cr&eate Phantom...\tCtrl-P");
+ file_menu->Append(MAINMENU_FILE_CREATE_FILTER, "Create &Filter...\tCtrl-F");
+ file_menu->Append(wxID_OPEN, "&Open...\tCtrl-O");
+ file_menu->Append(wxID_SAVE, "&Save\tCtrl-S");
file_menu->Append(wxID_SAVEAS, "Save &As...");
file_menu->Append(wxID_CLOSE, "&Close");
file_menu->Append(wxID_PREVIEW, "Print Pre&view");
wxMenu *view_menu = new wxMenu;
- view_menu->Append(IFMENU_VIEW_SCALE_MINMAX, "Display Scale &Set...");
- view_menu->Append(IFMENU_VIEW_SCALE_AUTO, "Display Scale &Auto...");
- view_menu->Append(IFMENU_VIEW_SCALE_FULL, "Display &Full Scale");
+ view_menu->Append(IFMENU_VIEW_SCALE_MINMAX, "Display Scale S&et...\tCtrl-E");
+ view_menu->Append(IFMENU_VIEW_SCALE_AUTO, "Display Scale &Auto...\tCtrl-A");
+ view_menu->Append(IFMENU_VIEW_SCALE_FULL, "Display F&ull Scale\tCtrl-U");
wxMenu* filter_menu = new wxMenu;
filter_menu->Append (IFMENU_FILTER_INVERTVALUES, "&Invert Values");
analyze_menu->Append (IFMENU_COMPARE_COL, "Compare &Column");
wxMenu *help_menu = new wxMenu;
+ help_menu->Append(MAINMENU_HELP_CONTENTS, "&Contents\tF1");
+ help_menu->Append(MAINMENU_HELP_TOPICS, "&Topics\tCtrl-T");
help_menu->Append(MAINMENU_HELP_ABOUT, "&About");
wxMenuBar *menu_bar = new wxMenuBar;
subframe->Centre(wxBOTH);
+ wxAcceleratorEntry accelEntries[9];
+ accelEntries[0].Set (wxACCEL_CTRL, static_cast<int>('O'), wxID_OPEN);
+ accelEntries[1].Set (wxACCEL_CTRL, static_cast<int>('S'), wxID_SAVE);
+ accelEntries[2].Set (wxACCEL_CTRL, static_cast<int>('T'), MAINMENU_HELP_TOPICS);
+ accelEntries[3].Set (wxACCEL_CTRL, static_cast<int>('P'), MAINMENU_FILE_CREATE_PHANTOM);
+ accelEntries[4].Set (wxACCEL_CTRL, static_cast<int>('F'), MAINMENU_FILE_CREATE_FILTER);
+ accelEntries[5].Set (wxACCEL_NORMAL, WXK_F1, MAINMENU_HELP_CONTENTS);
+ accelEntries[6].Set (wxACCEL_CTRL, static_cast<int>('A'), IFMENU_VIEW_SCALE_AUTO);
+ accelEntries[7].Set (wxACCEL_CTRL, static_cast<int>('U'), IFMENU_VIEW_SCALE_FULL);
+ accelEntries[8].Set (wxACCEL_CTRL, static_cast<int>('E'), IFMENU_VIEW_SCALE_MINMAX);
+ wxAcceleratorTable accelTable (9, accelEntries);
+ subframe->SetAcceleratorTable (accelTable);
+
return subframe;
}
#else
wxDocChildFrame *subframe = new wxDocChildFrame(doc, view, theApp->getMainFrame(), -1, "Phantom Frame", wxPoint(10, 10), wxSize(256, 256), wxDEFAULT_FRAME_STYLE);
#endif
+ theApp->setIconForFrame (subframe);
wxMenu *file_menu = new wxMenu;
wxMenu *help_menu = new wxMenu;
help_menu->Append(MAINMENU_HELP_CONTENTS, "&Contents");
+ help_menu->Append(MAINMENU_HELP_TOPICS, "&Topics");
help_menu->Append(MAINMENU_HELP_ABOUT, "&About");
wxMenuBar *menu_bar = new wxMenuBar;
m_dDefaultFilterParam = 1.;
#if HAVE_FFTW
m_iDefaultFilterMethod = ProcessSignal::FILTER_METHOD_RFFTW;
- m_iDefaultFilterGeneration = ProcessSignal::FILTER_GENERATION_DIRECT;
+ m_iDefaultFilterGeneration = ProcessSignal::FILTER_GENERATION_INVERSE_FOURIER;
#else
m_iDefaultFilterMethod = ProcessSignal::FILTER_METHOD_CONVOLUTION;
m_iDefaultFilterGeneration = ProcessSignal::FILTER_GENERATION_DIRECT;
#else
wxDocChildFrame *subframe = new wxDocChildFrame(doc, view, theApp->getMainFrame(), -1, "Projection Frame", wxPoint(10, 10), wxSize(0, 0), wxDEFAULT_FRAME_STYLE);
#endif
+ theApp->setIconForFrame (subframe);
wxMenu *file_menu = new wxMenu;
wxMenu *help_menu = new wxMenu;
help_menu->Append(MAINMENU_HELP_CONTENTS, "&Contents");
- help_menu->AppendSeparator();
+ help_menu->Append(MAINMENU_HELP_TOPICS, "&Topics");
help_menu->Append(MAINMENU_HELP_ABOUT, "&About");
wxMenuBar *menu_bar = new wxMenuBar;
#else
wxDocChildFrame *subframe = new wxDocChildFrame(doc, view, theApp->getMainFrame(), -1, "Plot Frame", wxPoint(10, 10), wxSize(500, 300), wxDEFAULT_FRAME_STYLE);
#endif
+ theApp->setIconForFrame (subframe);
wxMenu *file_menu = new wxMenu;
wxMenu *help_menu = new wxMenu;
help_menu->Append(MAINMENU_HELP_CONTENTS, "&Contents");
- help_menu->AppendSeparator();
+ help_menu->Append(MAINMENU_HELP_TOPICS, "&Topics");
help_menu->Append(MAINMENU_HELP_ABOUT, "&About");
wxMenuBar *menu_bar = new wxMenuBar;